Open dylan666 opened 8 years ago
Calculate percentage within your MySQL query and then use that value in chart after that in chart use formatter to add "%" sign -
formatter: function (y) { return y+"%"}
Reference to MySQL query - http://stackoverflow.com/questions/20532187/how-to-calculate-percent-of-total-within-group-by-statement
I'm creating a donut chart with using this query:
SELECT type as ItemName, count(type) as TotalItems FROM myTable group by type
So I can display the ItemName and the quantity of each specific item. But I can't have the percentage of each (I have the graphical representation but not the number).
Is it possibile to add a option to display also the numerical value of percentage?
Thanks