Flex柱形图定制
当我通过重写 updateDisplayList 函数在 Flex 中自定义 ColumnChart 时,图例中的颜色不再显示。如下图所示:
http://i41.tinypic.com/mim35d.png
我错过了什么吗?
谢谢。
When I customized the ColumnChart in Flex by overrided updateDisplayList function, colors in legend no longer display. As you will see in the below picture:
http://i41.tinypic.com/mim35d.png
Does I missed anything?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想查看源代码,这就是我所做的。
覆盖受保护的功能
updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
In case you want to look into the source code, here is what I did.
override protected function
updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
您可以使用 legendMarkerRenderer 设置图例标记的格式。本文向您展示如何走向底部:
http://livedocs.adobe.com/flex/ 3/html/help.html?content=charts_formatting_13.html
您还可以通过创建自己的 LegendItem 来进一步自定义 LegendItem:
http://livedocs.adobe.com/flex/3/ langref/mx/charts/LegendItem.html
自定义图例的示例:
如何排除图例中的系列 (Flex)
You can format the legend markers by using legendMarkerRenderer. This article shows you how towards the bottom:
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_13.html
You can also customize your LegendItem's even more by creating your own LegendItem's:
http://livedocs.adobe.com/flex/3/langref/mx/charts/LegendItem.html
Example to customize your Legend:
How to exclude series in legend (Flex)