My question is simple. How do I display (or get the value of) the percentages of each item in a pie graph? (Doesn't matter if it happens on click or it displays them in labels on render). Is there a way of displaying percentages so that they dynamically change when an item disappears by clicking on the legend?
I've read similar questions, but it seems like everyone just keeps saying, "just use renderer", which is fine and all but my problem isn't really displaying the percentage as much as it is getting the values themselves.
Have you tried using the iteminfo interaction? Check out the Pie example.
Thanks for you answer mitchellsimoens.
I have used iteminfo as it is an excellent way of displaying information about the item. But, that is exactly my problem. I don't know how to GET the percentages in the first place. If I were to find the sum of the values stored and simply apply: (item value/ total sum) * 100%, it would simply give me the percentage of the item as long as all items are visible.
However, when clicking on an item in the legend, the item now occupies a different percentage of the total as it becomes invisible. The iteminfo should take this into account and display a different percentage. How is this done?
For example: I have a pie with... red:50%, yellow:25%, blue: 25%. Now I click on red in the legend... I should have yellow:50%, blue:50%. My question is, what function can I use or what Sencha field is available so that I may CALCULATE or GET the percentage dynamically?