Using the chartjs lib ( link ) Is there any simple way to make a pie chart, display the percentage of each color, or at least allow the insertion of the character "%" after displaying the number in the tooltip, because in that case I can calculate the percentages before rendering the graphics.
Follow the code used so far:
var data = [
{
value: 83,
color: "#2DB45C",
highlight: "#FF5A5E",
label: "Masculino"
},
{
value: 181,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Feminino"
}
];
var pie = new Chart(document.getElementById("pie-chart").getContext("2d")).Pie(data, {});
When you hover the mouse, in the area of each color, it displays the number passed in the "value" parameter, in the "configuration" array. As I mentioned, I can easily transform this value into a percentage, but the lack of the character (%) will make it harder for the user to understand whether that is a percentage. Is there any solution in this case? Or you can suggest me some other free lib, which does + - the same as this, but without these "limitations."