Daniel Kim wrote:
> I'm sorry for the noob question, but how would I change the color of a column 
> in a ColumnChart when the column is clicked?
>
> I have a function tied to the itemClick handler and I'm guessing the 
> additional code could go in there. 
There are multiple ways to tackle this problem.  However, I can't think
of any off the top of my that are as easy as just assigning a new color.

What I would do is set some sort of flag on the data in itemClick saying
that the data has been selected, and set the new color there.  I would
couple that with a custom column renderer that displays a different
color based on the e.g. chartItem.item.color property.

For an example of creating your own column chart renderer, have a look
at Ely's charting code.  He's the master of Flex charting, and his
examples are wonderful to learn from.

http://www.quietlyscheming.com/blog/charts/chart-sampler/

Specially, take a look at the demo app here:
http://demo.quietlyscheming.com/ChartSampler/app.html

Expand "Customization" and click "Per Column Colors" to get an idea of
what you might need to do.  The complete source code is available.  It
doesn't directly solve your problem, but should get you close.

-d

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4578
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to