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

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
PowerVM
IBM Tivoli Monitoring ...
dW China
Cognos
Germany
ibm_ru
University
Information Management
Spark on z/OS
LPM (Live Partition Mo...
IBM Connections Social...
IBM Connections Cloud ...
IBM FileNet IDM Deskto...
IBM Kenexa CompAnalyst...
IBM Kenexa Onboard on ...
Campaign
Cloud resilience
IBM SmartCloud Applica...
Facilities Management ...
Server Automation
Labs (BigFix Labs)
Endpoint Protection
Cast Iron Runtime Appl...
WebSphere Cast Iron Ex...
IBM SPSS Statistics Ge...
WebSphere ILOG Busines...
Cognos Enterprise BI
AIX и UNIX
Rational Publishing En...
Installing/Configuring...
websphere
powerarchitecture
architecture
db2
Test tivoli forum
Solaris to Linux Migra...
Automotive
Pattern Modeling and A...
HeapAnalyzer
IBM Web Server Plug-in...
All blogs
Tivoli
IBM developer solutions
APL2 Programming Language
InfoSphere QualityStage
Optim LUW
IBM DB2 Recovery Exper...
Informix developer and...
IBM Content Integrator
IBM Toolbox for Java a...
Socially Integrated
Part 3 - Challenge #08...
BigFix App for QRadar ...
WAPL and SOE - Workloa...
Digital Advertising
IBM Business Process M...
WebSphere Portal
IBM Integration Design...
IBM Web Experience Fac...
WebSphere Application ...
AppScan Source
VA & Scanners / Assets...
Transportation Managem...
Web Services
Performance / Scaling
Gentran Integration Su...
Connect:Enterprise
Connect:Direct (Educat...
Performance Tuning
JSP Webpages in GIS
Gentran Windows upgrad...
General Discussion
Connect:Direct for iSe...
Connect:Enterprise UNIX
How Are You Using Sell...
Reporting and Analysis
SDK General
Comergent Security
Internationalization (...
Delivery and Service S...
Security
RCP Framework
WebSphere
IBM ILOG Elixir General
Business/IT challenges...
Constraint Programming
BRMS Trial Support
OPL using CPLEX Optimizer
General BRMS Discussion
Форумы WebSphere
HeapRoots
Replication Monitoring...
Programming Contest Ce...
Netcool OMNIbus
Maximo and process aut...
Performance Management...
SmartCloud Analytics -...
IBM SCORE
Using developerWorks
General Parallel File ...
HPC Central Technical ...
IBM Flex Systems
System i Hardware Mana...
Lotus Forms
IBM Customer Experienc...
developerWorks XML zon...
Java security
Java filter
Enterprise Application...
Best Practices for SOA...
Linux tech support forum
Linux for Power Archit...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile