I have successfully displayed the value, but why is only one value displayed? I want the value in sequence
This my code
/*my datasets code*/
datasets: [{
label: 'Daily Data',
data: [730000, 1012000, 1220000, 1831000, 560000, 2012000, 890000],
borderColor: '#3f89fb',
borderWidth: 3,
fill: false
}]
/*my tooltips code*/
tooltips: {
callbacks: {
label: function(tooltipItem, chart) {
for (var i = 0; i < chart.datasets[0].data.length; i++) {
return chart.datasets[0].data[i] / 1e6 + 'M';
}
}
}
}