I am creating LineSeries objects dynamically, and I want to be able
to use the CircleItemRenderer for the legend.
I tried doing this several ways, but get an error that the renderer
cannot be cast to a type of IFactory. I tried making sure
CircleItemRenderer was imported, and using new CircleItemRenderer(),
but no dice.
I'm doing something like this.
The only line that blows up is the LegendMarkerRenderer.
My array contains series data, a display name, and a color.
for(var k:int = 0; k < ChartDataVO.arrCollSeriesArray.length - 1;
k++)
{
ls = new LineSeries();
ls.displayName = ChartDataVO.arrCollSeriesArray[k].name;
ls.yField = 'value';
ls.xField = 'time';
ls.form = "line";
ls.dataProvider = ChartDataVO.arrCollSeriesArray[k].data;
stroke = new Stroke();
stroke.color = ChartDataVO.arrCollSeriesArray[k].color;
stroke.weight = 1;
ls.setStyle("lineStroke", stroke);
ls.setStyle
("legendMarkerRenderer", "mx.charts.renderers.CircleItemRenderer");
ls.styleName = ChartDataVO.arrCollSeriesArray_AVG[k].key;
this.linechart.series[k] = ls;
}
Anyone have any insights ?
Thanks in advance !!!
Mike