Skip navigation
Currently Being Moderated

Keep color index in piechart

May 16, 2012 7:15 AM

Tags: #actionscript #colors #checkbox #piechart



I have a Piechart working with an ArrayCollection, and i control the showing slices of the PieChart with its respective Checkbox.


I can set my custom colors for each slice and they show correcly. But when i erase a slice from the chart with the checkbox (erasing the respective data from the ArrayCollection), the index color of the slices regroup, and what was a blue slice now its another color.




Lets say that the data of the pie chart its:



the colors for each data is:



And if i delete the element [two] wich color its [yellow], the colors now change to:



Is there a way to hardcode the color of each slice so that they dont fix when a data its erased? i create this piechart via ActionScript:


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points