I'm having a real hard time adding RadarColumnSeries to my Radar Chart using ActionScript. I've been messing with this for so long that I'm not sure I'm even on the right track anymore. Help PLEASE, Thank you --
Here's what I'm working with in Flex4:
Chart:
<ilog:RadarChart id="newChart" width="100%" height="100%"
showDataTips="true" dataProvider="{xmlDataSource}"
type="circular"
columnWidthRatio="0.8" >
<ilog:angularAxis>
<ilog:AngularAxis dataProvider="{months}" displayName="Month" categoryField="fullDate" />
</ilog:angularAxis>
</ilog:RadarChart>
Months Array:
[January 2011, February 2011, March 2011, April 2011]
xmlDataSource:
<root>
<series id="Americas" name="Americas">
<item total="2" year="2011" month="April" fullDate="April 2011"/>
<item total="3" year="2011" month="February" fullDate="February 2011"/>
<item total="2" year="2011" month="March" fullDate="March 2011"/>
</series>
<series id="Asia-Pacific" name="Asia-Pacific">
<item total="2" year="2011" month="April" fullDate="April 2011"/>
<item total="1" year="2011" month="January" fullDate="January 2011"/>
<item total="1" year="2011" month="March" fullDate="March 2011"/>
</series>
<series id="EMEIA" name="EMEIA">
<item total="1" year="2011" month="April" fullDate="April 2011"/>
<item total="1" year="2011" month="February" fullDate="February 2011"/>
<item total="3" year="2011" month="March" fullDate="March 2011"/>
</series>
<series id="Global" name="Global">
<item total="3" year="2011" month="April" fullDate="April 2011"/>
<item total="3" year="2011" month="March" fullDate="March 2011"/>
</series>
</root>
ActionScript:
private function createSeries():void {
var s:RadarSeries;
for each (var x:XML in xmlDataSource.series) {
var o:Object=new Object();
s = new RadarColumnSeries();
for each (var c:XML in x.item) {
s = new RadarColumnSeries();
//trace(x.@name + ": " + c.@total + " - " + c.@month + " - " + c.@year + " - " + c.@fullDate);
o = {name:x.@name, total:[email protected](), month:c.@month, year:c.@year, fullDate:c.@fullDate};
dataSource.addItem(o);
s.dataProvider = o;
s.dataField = "total";
s.displayName = o.name;
}
columnSeries.push(s);
RadarColumnSeries(s).columnWidthRatio=0.80;
}
newChart.series = columnSeries;
}
Here's a link to the solution