简体   繁体   English

Flex图表-如何在过渡时更改chartItem的颜色?

[英]Flex Charts — How can I change the color of a chartItem on rollover?

Is there a way to set a rollover color for each series in a chart? 有没有一种方法可以为图表中的每个系列设置过渡颜色?

For instance, I have a column chart with two series: one series is set to blue and the second series is set to gold. 例如,我有一个包含两个系列的柱形图:一个系列设置为蓝色,第二个系列设置为金色。

When the user mouses over the blue series, I would like the blue to turn to bright blue. 当用户将鼠标悬停在蓝色系列上时,我希望蓝色变为亮蓝色。 And when the user mouses over the gold series, I would like the gold to turn to bright gold. 当用户将鼠标悬停在黄金系列上时,我希望黄金变成亮金。

Also, is it possible to change the color of the chart item when a chart item is clicked? 另外,单击图表项时是否可以更改图表项的颜色?

Thanks, 谢谢,

Lacy 花边的

quietlyscheming has a lot of excellent examples. 安静地计划有很多很好的例子。 Basically you need to create your own itemRenderer for the series and trap the mouse moving over it and change states or colours at it does. 基本上,您需要为该系列创建自己的itemRenderer,并捕获鼠标在其上移动并更改其状态或颜色。 This is a very well documented path. 这是一个非常有据可查的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM