Radar charts


How could I change RadarLinesSeries using Action Script?


[Fran M said:]
Hello, first sorry my english level.
I'm attempting to change the radarChart's RadarLineSeries at runtime with action Script. I have only one RadarChar component and i would like to asign it series depending on the case of use that the user select. The first time I create specific RadarLineSeries and push into the array that asign to radarchart.series, all is ok and the radarchart show the series.But the second time when a create other series to reasign into radarchart.series, the radarchart became white and lock all the components in screen. Please, somone can help me?, is very important for my job.
This is the source code i use, i invoke it several times, the first one all is ok, the other ones all is locked.
...
var datosRadarCaso1:ArrayCollection=new ArrayCollection();
datosRadarCaso1=httpService.lastResult.actuacion.indicadores.indicador;
angulos.categoryField="descBreve";
var rls1:RadarLineSeries = new RadarLineSeries();
var rls2:RadarLineSeries = new RadarLineSeries();
rls1.id ="sValor";
rls2.id = "sCalidad";
rls1.dataField = "valor";
rls2.dataField = "calidad";
rls1.displayName="% Cumplimiento";
rls2.displayName="Calidad del Dato";
var ls1:Stroke = new Stroke();
ls1.weight=3;
ls1.color = 0xE48701;
rls1.setStyle("lineStroke",ls1);
var ls2:Stroke = new Stroke();
ls2.weight=2;
ls2.color = 0xA5BC4E;
rls2.setStyle("lineStroke",ls2);
var arraySeries:Array= [];
arraySeries.push(rls1);
arraySeries.push(rls2);
graficoRadar.dataProvider=datosRadarCaso1;
graficoRadar.series=arraySeries;
...
The component radar:
<ilog:RadarChart id="graficoRadar" height="100%" width="100%" showDataTips="true" fontStyle="italic" textAlign="left" alpha="1.0" includeInLayout="true" itemClick="radarItemClickAccion(event)">
<ilog:angularAxis>
<ilog:AngularAxis id="angulos"/>
</ilog:angularAxis>
<ilog:angularAxisRenderers>
<ilog:AngularAxisRenderer>
<ilog:axisStroke>
<mx:Stroke weight = "1" color = "#c0c0c0" alpha="0.5"/>
</ilog:axisStroke>
</ilog:AngularAxisRenderer>
</ilog:angularAxisRenderers>
<ilog:radialAxis>
<mx:LinearAxis maximum="100" minimum="-1"/>
</ilog:radialAxis>
<ilog:radialAxisRenderers>
<mx:AxisRenderer id="hAxis" horizontal="true" visible="true"/>
</ilog:radialAxisRenderers>
</ilog:RadarChart>
Thank you !
[dmandrioli said:]
Hi,
With the provided code, I can't reproduce your problem. The following sample shows how to changes series at runtime using Action Script.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"<br /> xmlns:ilog="http://www.ilog.com/2007/ilog/flex">
<mx:Script>
<![CDATA[<br /> import mx.graphics.Stroke;
import ilog.charts.series.RadarLineSeries;
import mx.collections.ArrayCollection;
[Bindable]
public var temperature:ArrayCollection = new ArrayCollection([{Month: "January", London: 39, Sydney: 71.8, Beijing: 23.7}, {Month: "February", London: 39.6, Sydney: 71.8, Beijing: 28.8}, {Month: "March", London: 42.3, Sydney: 69.8, Beijing: 40.5}, {Month: "April", London: 47.3, Sydney: 65.1, Beijing: 56.5}, {Month: "May", London: 53.4, Sydney: 59.5, Beijing: 68}, {Month: "June", London: 59.4, Sydney: 55.2, Beijing: 75.9}, {Month: "July", London: 62.6, Sydney: 53.6, Beijing: 78.8}, {Month: "August", London: 61.9, Sydney: 55.8, Beijing: 76.5}, {Month: "September", London: 57.6, Sydney: 59.5, Beijing: 67.6}, {Month: "October", London: 50.5, Sydney: 63.9, Beijing: 54.7}, {Month: "November", London: 43.9, Sydney: 67.1, Beijing: 39}, {Month: "December", London: 40.6, Sydney: 70.2, Beijing: 27.3}]);
private function setSeries(flag:Boolean):void
{
angulos.categoryField = "Month";
var rls1:RadarLineSeries = new RadarLineSeries();
rls1.dataField = flag ? "London" : "Sydney";
rls1.id = "sValor";
var ls1:Stroke = new Stroke();
ls1.weight = 3;
ls1.color = 0xE48701;
rls1.setStyle("lineStroke", ls1);
var rls2:RadarLineSeries = new RadarLineSeries();
rls2.dataField = !flag ? "London" : "Sydney";
rls2.id = "sCalidad";
var ls2:Stroke = new Stroke();
ls2.weight = 2;
ls2.color = 0xA5BC4E;
rls1.setStyle("lineStroke", ls2);
var arraySeries:Array = [];
arraySeries.push(rls1);
arraySeries.push(rls2);
radar.dataProvider = temperature;
radar.series = arraySeries;
}
]]>
</mx:Script>
<mx:Panel width="100%"<br /> height="100%"
title="Radar Line Series Example"
layout="vertical"
horizontalAlign="center">
<ilog:RadarChart id="radar"<br /> height="100%"
width="100%"
showDataTips="true"
fontStyle="italic"
textAlign="left"
alpha="1.0"
includeInLayout="true">
<ilog:angularAxis>
<ilog:AngularAxis id="angulos"/>
</ilog:angularAxis>
<ilog:angularAxisRenderers>
<ilog:AngularAxisRenderer>
<ilog:axisStroke>
<mx:Stroke weight="1"<br /> color="#c0c0c0"
alpha="0.5"/>
</ilog:axisStroke>
</ilog:AngularAxisRenderer>
</ilog:angularAxisRenderers>
<ilog:radialAxis>
<mx:LinearAxis maximum="100"<br /> minimum="-1"/>
</ilog:radialAxis>
<ilog:radialAxisRenderers>
<mx:AxisRenderer id="hAxis"<br /> horizontal="true"
visible="true"/>
</ilog:radialAxisRenderers>
</ilog:RadarChart>
<mx:Button label="Set First Series"<br /> click="setSeries(true)"/>
<mx:Button label="Set Second Series"<br /> click="setSeries(false)"/>
</mx:Panel>
</mx:Application>
If you are still encountering this problem, please post a minimal working sample which reproduce your issue (including sample data).
Hope this helps,
SystemAdmin
110000D4XK
‏2009-05-21T17:33:36Z
[dmandrioli said:]
Hi,
With the provided code, I can't reproduce your problem. The following sample shows how to changes series at runtime using Action Script.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"<br /> xmlns:ilog="http://www.ilog.com/2007/ilog/flex">
<mx:Script>
<![CDATA[<br /> import mx.graphics.Stroke;
import ilog.charts.series.RadarLineSeries;
import mx.collections.ArrayCollection;
[Bindable]
public var temperature:ArrayCollection = new ArrayCollection([{Month: "January", London: 39, Sydney: 71.8, Beijing: 23.7}, {Month: "February", London: 39.6, Sydney: 71.8, Beijing: 28.8}, {Month: "March", London: 42.3, Sydney: 69.8, Beijing: 40.5}, {Month: "April", London: 47.3, Sydney: 65.1, Beijing: 56.5}, {Month: "May", London: 53.4, Sydney: 59.5, Beijing: 68}, {Month: "June", London: 59.4, Sydney: 55.2, Beijing: 75.9}, {Month: "July", London: 62.6, Sydney: 53.6, Beijing: 78.8}, {Month: "August", London: 61.9, Sydney: 55.8, Beijing: 76.5}, {Month: "September", London: 57.6, Sydney: 59.5, Beijing: 67.6}, {Month: "October", London: 50.5, Sydney: 63.9, Beijing: 54.7}, {Month: "November", London: 43.9, Sydney: 67.1, Beijing: 39}, {Month: "December", London: 40.6, Sydney: 70.2, Beijing: 27.3}]);
private function setSeries(flag:Boolean):void
{
angulos.categoryField = "Month";
var rls1:RadarLineSeries = new RadarLineSeries();
rls1.dataField = flag ? "London" : "Sydney";
rls1.id = "sValor";
var ls1:Stroke = new Stroke();
ls1.weight = 3;
ls1.color = 0xE48701;
rls1.setStyle("lineStroke", ls1);
var rls2:RadarLineSeries = new RadarLineSeries();
rls2.dataField = !flag ? "London" : "Sydney";
rls2.id = "sCalidad";
var ls2:Stroke = new Stroke();
ls2.weight = 2;
ls2.color = 0xA5BC4E;
rls1.setStyle("lineStroke", ls2);
var arraySeries:Array = [];
arraySeries.push(rls1);
arraySeries.push(rls2);
radar.dataProvider = temperature;
radar.series = arraySeries;
}
]]>
</mx:Script>
<mx:Panel width="100%"<br /> height="100%"
title="Radar Line Series Example"
layout="vertical"
horizontalAlign="center">
<ilog:RadarChart id="radar"<br /> height="100%"
width="100%"
showDataTips="true"
fontStyle="italic"
textAlign="left"
alpha="1.0"
includeInLayout="true">
<ilog:angularAxis>
<ilog:AngularAxis id="angulos"/>
</ilog:angularAxis>
<ilog:angularAxisRenderers>
<ilog:AngularAxisRenderer>
<ilog:axisStroke>
<mx:Stroke weight="1"<br /> color="#c0c0c0"
alpha="0.5"/>
</ilog:axisStroke>
</ilog:AngularAxisRenderer>
</ilog:angularAxisRenderers>
<ilog:radialAxis>
<mx:LinearAxis maximum="100"<br /> minimum="-1"/>
</ilog:radialAxis>
<ilog:radialAxisRenderers>
<mx:AxisRenderer id="hAxis"<br /> horizontal="true"
visible="true"/>
</ilog:radialAxisRenderers>
</ilog:RadarChart>
<mx:Button label="Set First Series"<br /> click="setSeries(true)"/>
<mx:Button label="Set Second Series"<br /> click="setSeries(false)"/>
</mx:Panel>
</mx:Application>
If you are still encountering this problem, please post a minimal working sample which reproduce your issue (including sample data).
Hope this helps,
More...
[Fran M said:]
First all thanks for your answer !
My problem go on.
Every time there is an update of data from dataProvider, I invoke the same function that updates the series to take the new data from the dataProvider. The first time you call this function, everything works correctly, but when I called a second time,it is blocked.
So, the problem is produced when dataprovider's radar data changes , then i create new series and set "radar.series= arraySeries", at this point the code is blocked.
If I replace this line of code :
"radar.series= arraySeries"
by the other way:
if (firstTime)
{
firstTime=false;
radar.series= arraySeries
}
else
{
//Do nothing
}
, everything works fine!.
I really do not understand how it works, because this variable (arraySeries) has a local scope and I do not know why it is updated with the new series if we do not get assigned to radar the next times after first one.
I hope you can help me whith this new explanation.
thank you a lot
Fran
SystemAdmin
110000D4XK
‏2009-05-29T18:30:13Z
[Fran M said:]
First all thanks for your answer !
My problem go on.
Every time there is an update of data from dataProvider, I invoke the same function that updates the series to take the new data from the dataProvider. The first time you call this function, everything works correctly, but when I called a second time,it is blocked.
So, the problem is produced when dataprovider's radar data changes , then i create new series and set "radar.series= arraySeries", at this point the code is blocked.
If I replace this line of code :
"radar.series= arraySeries"
by the other way:
if (firstTime)
{
firstTime=false;
radar.series= arraySeries
}
else
{
//Do nothing
}
, everything works fine!.
I really do not understand how it works, because this variable (arraySeries) has a local scope and I do not know why it is updated with the new series if we do not get assigned to radar the next times after first one.
I hope you can help me whith this new explanation.
thank you a lot
Fran
More...
[dmandrioli said:]
Hi Fran,
I'm not sure to understand your issue.
Can you create a minimal sample that reproduces the issue so that we can investigate wether it's a bug in the product.
Thanks,
SystemAdmin
110000D4XK
‏2009-05-29T20:02:58Z
[dmandrioli said:]
Hi Fran,
I'm not sure to understand your issue.
Can you create a minimal sample that reproduces the issue so that we can investigate wether it's a bug in the product.
Thanks,
More...
[Fran M said:]
Hi,
I'll try to prepare an example. I hope to have it ready next week.
best regards,
Fran

Related Links

Radar Chart Hide Effect
How to use showDataEffect in AS generated Radar?
Radar chart in the dotted line
Data Label
Can I set the MAX value in each category axis of radarchart?
Radar Chart of IBM ILOG Trial Version
Glow Effect on Radar Chart Line
Need help adding dynamic series to Radar Chart
Start at 90 not 0
Obtaining radar chart Linear Axis coordinates
Negative values ?
Disable datatip for some of the series...
Error updating radarchart
Change the orientation of the category label
Labels size
Customizing radar charts angular axis labels

Categories

DW
Sterling Commerce
AIX and Linux
Spark on z/OS
IBM FileNet Records Ma...
IBM Content Manager
zSecure suite
IBM Mobile & device me...
CustomerInsight
Cloud DevOps
Facilities Management ...
Jazz for Service Manag...
General Discussion
Customizations
Fixlet Authoring
Lifecycle Management
IBM SPSS Data Collection
Java Programmability f...
RDi - Rational Develop...
RDz - Rational Develop...
Cognos BI 10
Cognos Series 7
Cognos Planning 10
Eventos en Latinoamérica
TSM FastBack Latinoamé...
Linux
Rational DOORS DXL
Unified Modeling Langu...
Rational DOORS integra...
Build and Release Mana...
Service Virtualization
db2
Test Forum for Alberto
Mainframe Brasil
AIX and Linux on POWER
Wholesale
IBM LanguageWare Resou...
Partnerworld blogs
IBM University
Tivoli
Networking
IBM Research Labs
Eserver
APL2 Programming Language
Information Architectu...
IBM DB2 Express-C Forum
InfoSphere DataStage
IBM InfoSphere Guardium
IBM Content Integrator
Objrepos - AIX ユーザー・コミ...
WebSphere Application ...
IBM Support Assistant ...
IBM HTTP Server
IBM Web Experience Fac...
IBM Visual Configurati...
Policy Tester
Security Access Manage...
General
QRadar Vulnerability M...
OM Mobile Framework
Sterling Information B...
Mapping / Translation
Gentran Server for Unix
Connect:Express
Sterling Secure Proxy
Customer Order Managem...
Mobile Store Channel
Connect:Enterprise Mai...
Your Selling System So...
C3 Replenishment
C3 Analyzer Installation
ROI Issues
E-Commerce/EDI/XML Cou...
Shipping
Location Inventory Tra...
Internationalization a...
RCP Framework
Interoperability
EGL
Constraint Programming
General BRMS Discussion
Treemap
IBM Image Construction...
IBM Client Application...
Tivoli Application Dep...
IBM Enterprise Asset M...
IBM License Metric Tool
IBM Whole-system Analy...
IBM i
IBM i Access for Linux
Communications Server ...
IBM SCORE
Web 2.0 Apps
Lotus Web Content Mana...
XForms technology forum
IBM Java Runtimes and ...
Client-side Java progr...
JSF for nonbelievers f...
Web Services Technical

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile