Radar charts


Need help adding dynamic series to Radar Chart


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
{ trace(xmlDataSource.toXMLString()); var s:RadarColumnSeries;
for each (var c:XML in xmlDataSource.series)
{
//trace("C \n" + c.item.toXMLString()); s =
new RadarColumnSeries(); s.dataField = c.item.#total; s.displayName = c.#name; s.dataProvider = c; var tmp:Array = newChart.series; tmp.push(s); newChart.series = tmp; newChart.invalidateSeriesStyles();
/* fillStyles[s] = s.getStyle("areaFill"); s.setStyle("areaFill", emptyColor); s.filterData = false; s.setStyle('stroke', new Stroke(0xaaaaaa, 1, 0.7)); RadarColumnSeries(s).columnWidthRatio=0.95; */
//trace("\n");
}
}
I'm getting closer. It's displaying the columns now but only for the last month. So I'm guessing my loops are off, but I'm blurry eyed now so I'd really appreciate a second pair of eyes on this.
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:c.#total.toString(), 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;
}
MarkCP
27000369KJ
‏2011-05-12T18:36:43Z
I'm getting closer. It's displaying the columns now but only for the last month. So I'm guessing my loops are off, but I'm blurry eyed now so I'd really appreciate a second pair of eyes on this.
<pre class="jive-pre">
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:c.#total.toString(), 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;
}
</pre>
More...
Hi,
Sorry for the late reply. Please look at the following sample which solve your issue.
<?xml version=
"1.0" encoding=
"utf-8"?> <s:Application xmlns:fx=
"http://ns.adobe.com/mxml/2009" xmlns:s=
"library://ns.adobe.com/flex/spark" xmlns:mx=
"library://ns.adobe.com/flex/mx" creationComplete=
"application1_creationCompleteHandler(event)" xmlns:ilog=
"http://www.ilog.com/2007/ilog/flex"> <fx:Script> <![CDATA[
import ilog.charts.chartClasses.RadarSeries;
import ilog.charts.series.RadarColumnSeries;
import mx.collections.ArrayCollection;
import mx.events.FlexEvent; [Bindable]
private var xmlDataSource:XML = <root> <series id=
"Americas" name=
"Americas"> <item total=
"2" year=
"2011" month=
"January" fullDate=
"January 2011"/> <item total=
"3" year=
"2011" month=
"February" fullDate=
"February 2011"/> <item total=
"4" year=
"2011" month=
"March" fullDate=
"March 2011"/> <item total=
"5" year=
"2011" month=
"April" fullDate=
"April 2011"/> <item total=
"6" year=
"2011" month=
"May" fullDate=
"May 2011"/> <item total=
"7" year=
"2011" month=
"June" fullDate=
"June 2011"/> </series> <series id=
"Asia-Pacific" name=
"Asia-Pacific"> <item total=
"7" year=
"2011" month=
"January" fullDate=
"January 2011"/> <item total=
"6" year=
"2011" month=
"February" fullDate=
"February 2011"/> <item total=
"5" year=
"2011" month=
"March" fullDate=
"March 2011"/> <item total=
"4" year=
"2011" month=
"April" fullDate=
"April 2011"/> <item total=
"3" year=
"2011" month=
"May" fullDate=
"May 2011"/> <item total=
"2" year=
"2011" month=
"June" fullDate=
"June 2011"/> </series> </root>; [Bindable]
private var months:Array = [
"January",
"February",
"March",
"April",
"May",
"June"];
protected function application1_creationCompleteHandler(event:FlexEvent):
void
{ var s:RadarColumnSeries; var dataSource:ArrayCollection; var columnSeries:Array = [];
for each (var x:XML in xmlDataSource.series)
{ dataSource =
new ArrayCollection(); var o:Object=
new Object(); s =
new RadarColumnSeries(); s.dataField =
"total"; s.categoryField =
"month"; s.displayName = o.name;
for each (var c:XML in x.item)
{ o =
{name:x.#name, total:c.#total.toString(), month:c.#month, year:c.#year, fullDate:c.#fullDate
}; dataSource.addItem(o);
} s.dataProvider = dataSource; columnSeries.push(s);
} newChart.series = columnSeries;
} ]]> </fx:Script> <ilog:RadarChart id=
"newChart" width=
"100%" height=
"100%" showDataTips=
"true" dataProvider=
"{xmlDataSource}" type=
"circular" columnWidthRatio=
"0.8" > <ilog:angularAxis> <ilog:AngularAxis displayName=
"Month" dataProvider=
"{months}"/> </ilog:angularAxis> </ilog:RadarChart> </s:Application>
Hope this helps,
Damien
SystemAdmin
110000D4XK
‏2011-05-18T08:31:09Z
Hi,
Sorry for the late reply. Please look at the following sample which solve your issue.
<pre class="jive-pre">
<?xml version=
"1.0" encoding=
"utf-8"?> <s:Application xmlns:fx=
"http://ns.adobe.com/mxml/2009" xmlns:s=
"library://ns.adobe.com/flex/spark" xmlns:mx=
"library://ns.adobe.com/flex/mx" creationComplete=
"application1_creationCompleteHandler(event)" xmlns:ilog=
"http://www.ilog.com/2007/ilog/flex"> <fx:Script> <![CDATA[
import ilog.charts.chartClasses.RadarSeries;
import ilog.charts.series.RadarColumnSeries;
import mx.collections.ArrayCollection;
import mx.events.FlexEvent; [Bindable]
private var xmlDataSource:XML = <root> <series id=
"Americas" name=
"Americas"> <item total=
"2" year=
"2011" month=
"January" fullDate=
"January 2011"/> <item total=
"3" year=
"2011" month=
"February" fullDate=
"February 2011"/> <item total=
"4" year=
"2011" month=
"March" fullDate=
"March 2011"/> <item total=
"5" year=
"2011" month=
"April" fullDate=
"April 2011"/> <item total=
"6" year=
"2011" month=
"May" fullDate=
"May 2011"/> <item total=
"7" year=
"2011" month=
"June" fullDate=
"June 2011"/> </series> <series id=
"Asia-Pacific" name=
"Asia-Pacific"> <item total=
"7" year=
"2011" month=
"January" fullDate=
"January 2011"/> <item total=
"6" year=
"2011" month=
"February" fullDate=
"February 2011"/> <item total=
"5" year=
"2011" month=
"March" fullDate=
"March 2011"/> <item total=
"4" year=
"2011" month=
"April" fullDate=
"April 2011"/> <item total=
"3" year=
"2011" month=
"May" fullDate=
"May 2011"/> <item total=
"2" year=
"2011" month=
"June" fullDate=
"June 2011"/> </series> </root>; [Bindable]
private var months:Array = [
"January",
"February",
"March",
"April",
"May",
"June"];
protected function application1_creationCompleteHandler(event:FlexEvent):
void
{ var s:RadarColumnSeries; var dataSource:ArrayCollection; var columnSeries:Array = [];
for each (var x:XML in xmlDataSource.series)
{ dataSource =
new ArrayCollection(); var o:Object=
new Object(); s =
new RadarColumnSeries(); s.dataField =
"total"; s.categoryField =
"month"; s.displayName = o.name;
for each (var c:XML in x.item)
{ o =
{name:x.#name, total:c.#total.toString(), month:c.#month, year:c.#year, fullDate:c.#fullDate
}; dataSource.addItem(o);
} s.dataProvider = dataSource; columnSeries.push(s);
} newChart.series = columnSeries;
} ]]> </fx:Script> <ilog:RadarChart id=
"newChart" width=
"100%" height=
"100%" showDataTips=
"true" dataProvider=
"{xmlDataSource}" type=
"circular" columnWidthRatio=
"0.8" > <ilog:angularAxis> <ilog:AngularAxis displayName=
"Month" dataProvider=
"{months}"/> </ilog:angularAxis> </ilog:RadarChart> </s:Application>
</pre>
Hope this helps,
Damien
More...
Thanks again for your help Damien. Once again you came thru for me.
Appreciate it!
-Mark

Related Links

Linear Gradient as fill for RadarColumnSerie
Dragging Radar Line Series
How to change angular axis minimum and maximum?
RadarColumnSeries Remove Column Tapering on Large Values
Need to create radar chart without writing code
Radar Labels don\'t update
Radarchart gradient background
Run Time Radar Data
Rotating the angular axis
Set the chart.type="Cloumn" default
pls help me
How could I change RadarLinesSeries using Action Script?
Radar Chart - Custom Labels
Trouble with AngularAxisRenderer.labelRenderer on RadarChart
Multiple Stroke Colors for Radial Lines
could not find source for resource bundle ilogradarchart

Categories

DW
Unica
IBM TRIRIGA
Cast Iron Community
Rational Cafe
dW Korea
Italy
Brazil
University
IBM Software Defined N...
IBM Connections Docs C...
IBM CMIS for ECM
IBM OmniFind Enterpris...
IBM FileNet IDM Deskto...
IBM Content Navigator
IBM Kenexa Onboard on ...
IBM Mobile & device me...
Marketing Operations
eMessage7
Distributed Marketing
Education
R Programmability in S...
IBM Analytic Catalyst ...
HATS HotSpot
ERP
Cognos Express
Cognos Enterprise BI
Cognos Series 7
TSM FastBack Latinoamé...
Reportar contenido ina...
IBM Rational Asset Ana...
Rational DOORS General...
Rational DOORS adminis...
webservices
xml
autonomic
Java
Lotus Brasil
Government
On Demand
Partnerworld blogs
APL2 Programming Language
InfoSphere DataStage
DB2 for i
Infosphere Warehouse
IBM DB2 Analytics Acce...
Objrepos - AIX ユーザー・コミ...
The CDC (Change Data C...
Part 3 - Challenge #14...
CICS Explorer
IBM HTTP Server
IBM Visual Configurati...
WebSphere Virtual Ente...
Policy Tester
General
QRadar Extensions
General
Offense Manager & Tuning
API
Network Surveillance, ...
Web Services
Reporting
Gentran Basic, RTE, Co...
Gentran Director
Gentran Websuite
Connect:Express
Connect:Direct
Managed File Transfer
System Architecture
E-Commerce/EDI/XML Cou...
Mobile Store Channel
Gentran Integration Su...
General Discussion
Connect:Enterprise UNIX
Misc. Product Forums
Miscellaneous
Backend Systems
Troubleshooting & Debu...
SDK General
C3 Partner.com/C3 Stor...
Release 7.0
Shipping
Integration with other...
Console Framework (HTM...
WebSphere-MQ
Weblogic
.NET Visualization Pro...
Moderator Collaboration
Rules for .NET
CP Optimizer
OPL using CPLEX Optimizer
Форумы WebSphere
Форум по AIX и UNIX
Форумы Lotus
1С:Предприятие на DB2
Activities
IBM MapReduce Tools fo...
Replication Monitoring...
Full System Simulator ...
IBM Workload Automatio...
System Automation for ...
IBM License Metric Tool
SmartCloud Analytics -...
IBM i: Backup/Recovery
IBM i: iDoctor for IBM...
Communications Server ...
iPhone
Web 2.0 Apps
AIX Security
IBM Flex Systems
developerWorks XML zon...
Java security
Web Services Technical
Best Practices for SOA...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile