为什么当 LineSeries 的 lineStroke 属性更改时,FLEX 4 LineChart Legend 停止显示颜色?
我正在 FLEX 4 中实现折线图。我的图表运行良好,但我不喜欢默认颜色并且无法使用它们,因为它们与我的数据关系不太好。例如,橙色对于我的数据列“室外温度”来说并不是一个很好的默认颜色。如果可能的话,我宁愿覆盖它并使用绿色。
当我显式指定 SolidColorStroke 时,就像这样,这会破坏 LineChart 图例:
<mx:SolidColorStroke id = "s1" color="haloGreen" weight="2"/>
<mx:LineSeries yField="v1" form="curve" displayName="Indoor Temp" lineStroke="{s1}"/>
^ 使用此代码,LineChart 图例将停止显示该特定 LineSeries 的颜色,并且仅以黑色显示。
如何覆盖 LineSeries 描边颜色并将这些颜色保留到图例的显示中?
这是 FLEX 4 的错误吗?我注意到在 FLEX 3 示例中(甚至在 Adobe 的 FLEX 3 帮助网站上)您可以覆盖描边颜色,并且它会保留到图表图例中。
任何帮助表示赞赏!
I am implementing a LineChart in FLEX 4. I have the chart working well except I do not like the default colors and cannot use them, as they do not relate to my data very well. For instance, Orange is not a great default color for my data column "Outdoor temperature". I would rather override it and use a green color if possible.
When I explicitly specify the SolidColorStroke, like so, this breaks the LineChart Legend:
<mx:SolidColorStroke id = "s1" color="haloGreen" weight="2"/>
<mx:LineSeries yField="v1" form="curve" displayName="Indoor Temp" lineStroke="{s1}"/>
^ With this code, The LineChart Legend stops displaying the color for that specific LineSeries, and only displays in black.
How can I override the LineSeries stroke color and persist those colors to the Legend's display?
Is this a FLEX 4 bug? I noticed in FLEX 3 examples (even on Adobe's FLEX 3 Help website) you can override the stroke colors and it persists to the Chart Legend.
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然(据我所知),这是 FLEX 4 中的一个已知错误,显然 Adobe 正在努力在下一个版本中修复此问题。跛脚,我知道。
要解决此问题,您必须使用已弃用的“Stroke”对象,该对象会在 FLEX 4 中生成编译器警告。
Apparently (from what I can gather), this is a known bug in FLEX 4, and apparently Adobe is working on fixing this in their next release. Lame, I know.
To fix this, you must use the deprecated "Stroke" object, which produces compiler warnings in FLEX 4.