Reputation: 436
I am creating ColumnSeries for my ColumnChart dynamically in ActionScript, but I can't seem to get a handle on how to set the colors on each ColumnSeries dynamically in ActionScript.
The columnSeries.fill=#someCOlor doesn't work in AS? Does anyone know how i can achieve this? The best approach would be defining an array with e.g 10 colors and then distributing them to the different columnSeries.
The code below displays how I create my ColumnSeries. Any help is much appriciated :)
var newSeries:Array = new Array();
var columnSeries:ColumnSeries;
for(var i:int = 0; i < list.length; i++)
{
columnSeries = new ColumnSeries();
columnSeries.dataProvider = data;
columnSeries.yField = DynDiagramData.valueKey +i;
columnSeries.xField = "genLabel";
columnSeries.displayName = "someName";
newSeries.push(columnSeries);
}
columnChart.series = newSeries;
Upvotes: 1
Views: 1177