开发者

Flex line weight of linechart

开发者 https://www.devze.com 2022-12-23 03:02 出处:网络
I want to keep default color of lines and change line weight in Flex LineChart. How can I implement it?

I want to keep default color of lines and change line weight in Flex LineChart. How can I implement it?

Alte开发者_StackOverflowrnatively, if there any method for setting line weight or line color without using LineStroke?

Thanks.


Are you sure you can't do this by declaring something like

<mx:Stroke id="anID" weight="3"/> 

without a color property, and then referencing that in your LineStroke? That works for me.


Try doing something like

for each (var series: LineSeries in chart.series) {
    (series.stroke as Stroke).weight = 2;
}

somewhere in commitProperties() or whatever like that.


I'm doing something similar in my application. Here's how to just change the stroke, and keep all other existing properties:

for each (var series: LineSeries in this.lineChart.series) {
    var series_stroke:Stroke = series.getStyle('lineStroke') as Stroke;
    series_stroke.weight = 10;
    series.setStyle('lineStroke', series_stroke);
}

Sorry it's a bit late!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号