Chart.js #5304

by Akihiko Kusanagi

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.js"></script>
<canvas id="myChart"></canvas>

JavaScript

var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
  type: 'bar',
  data: {
    labels: ['2017-07-10', '2017-07-12', '2017-07-11', '2017-07-13'],
    datasets: [{
      data: [1, 2, 3, 4]
    }]
  },
  options: {
    title: {
      display: true,
      text: '1. offset: true (unorderd labels)'
    },
    scales: {
      xAxes: [{
      }],
      yAxes: [{
        ticks: { beginAtZero: true, max: 2, min: 0, stepSize: 0.2 }
      }]
    }
  }
});