Flex line weight of linechart
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!
精彩评论