I just found this little mistake when I wanted to show one single point using a line chart. I do not know why this did not make sense. Here is a screenshot:

This is how I created my object:
avg_payment = { labels: ["Jan"] datasets: [ { label: "Average_payment" fillColor: "rgba(220,220,220,0.5)" strokeColor: "rgba(220,220,220,0.8)" highlightFill: "rgba(220,220,220,0.75)" highlightStroke: "rgba(220,220,220,1)" data: [65] } ] }
This is my current workaround, although it still gives me the same result:
if avg_payment.labels.length is 1 max_val = Math.max(avg_payment.datasets[0].data) opt = { scaleOverride : true scaleSteps : 2 scaleStepWidth : 1 scaleStartValue : max_val - 1 } myLineChart = new Chart(ctx1).Line(avg_payment, opt)
Is there any workaround?
source share