本文介绍了在 Flex 折线图中显示数据点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个弹性折线图.有没有办法改变每个点的渲染并始终显示它们,而不是必须将鼠标悬停在线条的一部分上才能看到数据点的默认行为?(几乎就像一个连接点类型的视图).
I have a flex line chart. Instead of the default behavior of having 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? (almost like a connect the dots type view).
推荐答案
试试这个
<mx:LineChart>
<mx:series>
<mx:LineSeries dataProvider="{arr1}">
<mx:itemRenderer>
<mx:Component>
<mx:CrossItemRenderer/>
</mx:Component>
</mx:itemRenderer>
</mx:LineSeries>
</mx:series>
</mx:LineChart>
您可以将 CrossItemRenderer 更改为 DiamondItemRenderer 或任何其他
有关示例,请查看此页面的底部:在图表控件中使用笔画
you can change CrossItemRenderer with DiamondItemRenderer or any other
For an example look at the bottom of this page: Using strokes with chart controls
这篇关于在 Flex 折线图中显示数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!