6๐
โ
If you want to add %
after the values of the Y-Axis you can do it using scales in your chart configuration. Your code will look like this:
var myBarChart = new Chart($("#myCanvas"), {
type: 'bar',
data: data,
maintainAspectRatio: false,
options: {
scales: {
yAxes: [{
ticks: {
// Create scientific notation labels
callback: function(value, index, values) {
return value + ' %';
}
}
}]
}
}
});
Fiddle updated with the %
: Fiddle
And if you want to modify the text displayed in the tooltips you can easily change it using callback. You can find more information here Tooltip Callbacks
Source:stackexchange.com