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

Version Path
good_job-2.10.0 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.6 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.5 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.4 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.3 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.2 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.1 engine/app/views/good_job/shared/_chart.erb
good_job-2.9.0 engine/app/views/good_job/shared/_chart.erb
good_job-2.8.1 engine/app/views/good_job/shared/_chart.erb
good_job-2.8.0 engine/app/views/good_job/shared/_chart.erb
good_job-2.7.4 engine/app/views/good_job/shared/_chart.erb
good_job-2.7.3 engine/app/views/good_job/shared/_chart.erb
good_job-2.7.2 engine/app/views/good_job/shared/_chart.erb
good_job-2.7.1 engine/app/views/good_job/shared/_chart.erb
good_job-2.7.0 engine/app/views/good_job/shared/_chart.erb
good_job-2.6.2 engine/app/views/good_job/shared/_chart.erb
good_job-2.6.1 engine/app/views/good_job/shared/_chart.erb