I am creating some charts and assigning colors to the series in actionscript like this:
var col:uint = new uint(new Number("0x0000CC"));
// col value is now 204
var stroke:Stroke = new Stroke();
stroke.color = col;
But when I try to convert the color back to the 0x format later, I get:
var num:Number = lineSeries.getStyle("color");
// num value is now 734012
trace(item.label, "0x"+num.toString(16).toUpperCase()); // output is 0xB333C
So how doe I get it back to the original 0x0000CC ?
Note that "color" and "lineStroke" are two different styles.
Good point. The problem is that this getStyle call has to work for all kinds of series, not just LineSeries. So I can't just use "getLineStroke" unless I do things class by class and then check. Is there no generic "color" for series? I can also do it via the LegendItem color as well.