[英]How do I set the areaStroke and areaFill properties of an AreaSeries using ActionScript?
In Flex the AreaSeries tag looks like this: 在Flex中,AreaSeries标签如下所示:
<mx:AreaSeries
yField="Profit"
displayName="Profit"
areaStroke="{s1}"
areaFill="{sc1}"
/>
I am creating an AreaChart dynamically using ActionScript and I want to set the areaStroke and areaFill properties but they don't appear to be available in ActionScript. 我正在使用ActionScript动态创建AreaChart,并且我想设置areaStroke和areaFill属性,但是在ActionScript中它们似乎不可用。
So my question is, how do I set these properties dynamically? 所以我的问题是,如何动态设置这些属性?
areaStroke and areaFill are styles, not properties of the AreaSeries. areaStroke和areaFill是样式,不是AreaSeries的属性。
In actionscript you would have to do something like this: 在动作脚本中,您将必须执行以下操作:
myAreaSeries.setStyle("areaStroke",new SolidColorStroke());
myAreaSeries.setStyle("areaFill",new LinearGradient());
Check out the docs for mx.graphics.IStroke to see what your options are and check the constructors for those classes to see what all you can set. 查看有关mx.graphics.IStroke的文档,以了解您的选择,并检查这些类的构造函数,以了解可以设置的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.