Sha256: 78872491dd47f7726aee4593b19103e0b2bfaffb254878c69e69bd5a8ad3786c
Contents?: true
Size: 525 Bytes
Versions: 17
Compression:
Stored size: 525 Bytes
Contents
<div class="chart-wrapper"> <canvas id="chart"></canvas> </div> <%= javascript_tag nonce: true do %> const chartData = <%== chart_data.to_json %>; const ctx = document.getElementById('chart').getContext('2d'); const chart = new Chart(ctx, { type: 'line', data: { labels: chartData.labels, datasets: chartData.datasets }, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true } } } }); <% end %>
Version data entries
17 entries across 17 versions & 1 rubygems