chart.js Radar shows 0 when value is 12

Viewed 152

https://jsfiddle.net/uL9jm103/

I've got a problem with chart.js: When the first data value is set to 12, it isn't shown on the graph. It is just 0. When the second is also 12, it isn't shown either. But when I change the first value to 11, both are shown.

var ctx = document.getElementById('myChart');

  var myChart = new Chart(ctx, {
    type: 'radar',
        data: {
      labels: ['Running','Swimming','Eating','Cycling'],
      datasets: [{
        data: [12,12,20,30]
      }]
        },
    options: {
        legend: {
            display: false
        }
    }
});
1 Answers

BeginAtZero is set to false per default. Just add

options: {
    scale: {
        ticks: {
            beginAtZero: true
        }
    }
}

and you're fine.

Related