0๐
I found an answer:
var newTooltipConfig = {
//mode: "dataset",
intersect: false,
callbacks: {
title: function(tooltipItem, data) {
//Return value for title
return 'Second: ' + tooltipItem[0].xLabel;
},
label: function(tooltipItem, data) {
var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || 'Other';
var label = values[tooltipItem.index];
return datasetLabel + ': ' + label+'%';
}
}
};
linechart.options.tooltips = newTooltipConfig;
linechart.update();
- Chartjs-Chartjs: Make some ticks (Sunday, Saturday) red
- Chartjs-Django โ object is not subscriptable django charts.js" or nothing displays at all?
Source:stackexchange.com