Hi, I looked off the dashboard sample that came packaged with Flex 2 for the radial gradient fills. In there example the gradient fills were hard coded into the mxml file - and once the number of series exceeds predefined number of fills it loops. SO now your pie chart has multiple slices being the same color.
Has anyone externalized the radial gradient fills? Is there a simple
way to do this?
For some charts I may have up to 25 different slices. It would be
insane to hard code the 25 color gradients into each and every mxml
file I have! ...not to mention the management would be a pita.
Im looking for a way to externalize this and add more colors to it...
<mx:fills>
<mx:Array>
<mx:RadialGradient>
<mx:entries>
<mx:Array>
<mx:GradientEntry
color="#EF7651" ratio="0"/>
<mx:GradientEntry
color="#994C34" ratio="1"/>
</mx:Array>
</mx:entries>
</mx:RadialGradient>
<mx:RadialGradient>
<mx:entries>
<mx:Array>
<mx:GradientEntry
color="#E9C836" ratio="0"/>
<mx:GradientEntry
color="#AA9127" ratio="1"/>
</mx:Array>
</mx:entries>
</mx:RadialGradient>
<mx:RadialGradient>
<mx:entries>
<mx:Array>
<mx:GradientEntry
color="#6FB35F" ratio="0"/>
<mx:GradientEntry
color="#497B54" ratio="1"/>
</mx:Array>
</mx:entries>
</mx:RadialGradient>
<mx:RadialGradient>
<mx:entries>
<mx:Array>
<mx:GradientEntry
color="#A1AECF" ratio="0"/>
<mx:GradientEntry
color="#47447A" ratio="1"/>
</mx:Array>
</mx:entries>
</mx:RadialGradient>
<mx:RadialGradient>
<mx:entries>
<mx:Array>
<mx:GradientEntry
color="#BA9886" ratio="0"/>
<mx:GradientEntry
color="#AE775B" ratio="1"/>
</mx:Array>
</mx:entries>
</mx:RadialGradient>
</mx:Array>
</mx:fills>
Any help would be much appreciated.
-phil

