1
Using the lib Chartjs(http://www.chartjs.org/) There is some simple way to make a chart of type "pie", display the percentage of each color, or at least allow the insertion of the character "%" after displaying the number in the "tooltip", because in this 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 passing 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 turn this value into a percentage, but the lack of character (%) will make it harder for the user to understand whether that is a percentage. Is there any solution in this case? Or can you suggest me some other free lib, that does +- the same as this, but without these "limitations".