Chartjs-Start y-axis from 0 in ng2-charts

0👍

For Enable Y-axis to start from 0

this.chartOptions = {
  scales: {
      yAxes: [{
         scaleLabel: {
            display: true,
            labelString: 'Y axis label'
         },
         ticks: {
            beginAtZero: true
         }
      }]
  },
  maintainAspectRatio: false
}

By Using beignAtZero inside ticks for y-axis scale, then your chart starts from 0

Chart Js version

"chart.js": "2.8.0"

Ng2-Charts Version

"ng2-charts": "2.3.0",

Leave a comment