0👍
Should be like this to work properly and if you want to include all data for a given date:
options: {
tooltips: {
mode: 'index',
intersect: false,
callbacks: {
label: function(tooltipItem, data) {
var value = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
var label = data.datasets[tooltipItem.datasetIndex].label;
return label + ': ' + value;
}
}
},
}
- [Chartjs]-Horizontal bar chart in chart.js
- [Chartjs]-Chart.js dataset controller 'null' when chart drawn
Source:stackexchange.com