Thanks Brendan,
Just found out that
peopleCol.setStyle("fill", _peopleColColor);
works, too, even if _peopleColColor is a simple String… Flex is… flexible!
Rgds
-Ralf
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brendan
Meutzner
Sent: Dienstag, 20. Februar 2007 00:03
To: [email protected]
Subject: Re: [flexcoders] How to programmatically change fill color (Flex
Charting)
Hey,
peopleCol.setStyle("fill", new SolidColor(_peopleColColor, 1));
Brendan
On 2/19/07, Private Romeo <[EMAIL PROTECTED]> wrote:
I have a SolidColor fill for a ColumnSeries object:
<mx:ColumnSeries displayName="Staff" yField="People" id="peopleCol">
<mx:fill>
<mx:SolidColor id="peopleColColor"
color="{_peopleColColor}" />
</mx:fill>
</mx:ColumnSeries>
In an ActionScript function I'd like to change the color of this fill, however
neither data binding seems to work, nor directly accessing the property:
function changeColor()
{
peopleColColor.color = 0xffff00; // DOES NOT WORK
_peopleColColor = 0xffff00; // DOES NOT WORK (and is bindable)
}
Any hint?
--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca