pchart pie chart legend and graph not correlating
- by madphp
Hi,
I have ten values in the dataset, numbers 1 - 10 and corresponding values. Some of the values are coming back as zero, so they are not added to the chart, BUT, the legend is still listing 1 - 10. Because theres values missing in the chart, the colour coding is knocked off. ie
Item 1, has a value of zero, its passed over in the chart, the colour in the legend is red,
Item 2, has a value of 4, the percentage is calculated, and the chart gives it the colour red which is the colour for item 1 in the legend.
Hope that makes sense.
How can I print the legend just for the values that are displayed in the chart?
--Mark