How to display data points in Flex linechart
沧海依粟 @ 2009-12-01 23:39:35 | 类归于: Flex | 0 条评论 | 186次阅读
Flex linechart is a very useful chart control, but the default behavior is not perfection. when we using it, we have to hover over parts of the line to see the data points, is there a way to change the rendering of each point and have them always displayed? The answer is YES, it is easy, do like this:
<mx:LineSeries yField="yField" itemRenderer="mx.charts.renderers.CircleItemRenderer">
<mx:lineStroke>
<mx:Stroke color="#A5BC4E" weight="2" alpha="0.6" />
</mx:lineStroke>
<mx:stroke>
<mx:Stroke color="#A5BC4E" weight="1" />
</mx:stroke>
</mx:LineSeries>
I think you are using <mx:LineSeries>, too. You can set the itemRenderer property(like the blue code) to display the data points, and the red code is for the data point’s style, like color, weight and so on.