hi, i have tried to colorize the chart programatically but the first
way is fail,my chart doesn't shows up,the second way succeed but,only
if the value of var pie1Color is defined at the first time i made it.
let's say:
[Bindable] 
private var pie1Color:uint = 0xa1aecf;
[Bindable] 
private var pie11Color:uint = 0x47447a;

but when i define it without a value, and trying to fill the value
latter,its seems like doesn't work:
[Bindable] 
private var pie1Color:uint;
[Bindable] 
private var pie11Color:uint;

then on the application creation complete i call a function like this:
...creationComplete="initApp()"
then, on the initApp() function i'm change the value of pie1Color:
private function initApp():void{
pie1Color= 0xa1aecf;
pie11Color = 0x47447a;

}

now, my chart shows totally black,only the tool tip color changed to
the color i defined.please someone help me to figure it out.sorry if
my English bad. 
Regards

> 
> <mx:GradientEntry id="pie1" color="{pie1Color}" ratio="0"/>
> <mx:GradientEntry id="pie11" color="{pie11Color}" ratio="1"/>

--- In [email protected], "jer_ela" <[EMAIL PROTECTED]> wrote:
>
> This is how to set fills programatically:
> 
> fills:Array = [];
> var fill:RadialGradient = new RadialGradient();
> var entries:Array = [];
> entries.push( new GradientEntry(color, ratio, alpha))
> entries.push( new GradientEntry(color2, ratio2, alpha2))
> //additional entries as needed
> fill.entries = entries;
> fills.push(fill);
> //additional fills as needed
> 
> series.setStyle("fills", fills);
> 
> another option would be to use a binding for the entry colors and just
> change the value of the bound var
> 
> [Bindable] private var pie1Color:uint = 0xa1aecf;
> [Bindable] private var pie11Color:uint = 0x47447a;
> 
> <mx:GradientEntry id="pie1" color="{pie1Color}" ratio="0"/>
> <mx:GradientEntry id="pie11" color="{pie11Color}" ratio="1"/>
> 

Reply via email to