title: how to manipulate with the y-axis values in chartjs
body: <p>Hi there to all of you,</p>
  <p>How can I control the Y-axis values in Chart.js library? The data are displayed different in each chart, even though the code is the same for each chart.</p>
  <p>The data in the first chart are shown like this
  <a href="https://i.stack.imgur.com/6Nc6Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Nc6Y.png" alt="enter image description here" /></a></p>
  <p>while in the second chart the data are like this
  <a href="https://i.stack.imgur.com/rzKcz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rzKcz.png" alt="enter image description here" /></a></p>
  <p>How can I make in that way that each chart has values +5, like 5, 10, 20, 25 because I never have values with type float.</p>
  <p>Code looks like this:</p>
  <pre><code>const ctx = document.getElementById('myChart').getContext('2d');
  const myChart = new Chart(ctx, {
      type: 'bar',
      data: {
          labels: data.map(x =&gt; moment(x.date).format(&quot;MMM Do&quot;)),
          datasets: [{
              data: data.map(x =&gt; x.premium),
              backgroundColor: '#ffec87',
              borderColor: &quot;#ffec87&quot;,
              borderWidth: 2,
              borderStyle: 'dotted'
          }]
      },
    options: {
      scales: {
        xAxis: { grid: { display: false } },
        yAxis: { grid: { borderDash: [3, 5] } }
      }
    }
  });
  </code></pre>
  <p>Thanks a lot.</p>