You are not logged in.
Hi @ all,
Can anybody tell me how to assign three different colors to a radar chart.
Lets say we have a range of values from 0 to 5.
So I want the chart to be red from 0 to 2. Yellow from 2 to 4. And from 4 to 5 it shall be green.
When using the visual designer provided on the amcharts-page you can add a fill to achieve this.
Unfortunately the code it produces is either xml or html.
Since I'm using Flex I need to know how to do it using MXML-Tags or Actionscript 3.
The only thing I found that might have to do something with that is <collections:FillCollection ..... />
But I'm not sure if that's what I need or how to use it.
Just to get you a better picture of what I'm trying to do:
Any help or hints are highly appreciated.
Thx in advance.... Dan
Offline
You can do this with guides: http://extra.amcharts.com/labs/flex/radar-fills/
Source: http://extra.amcharts.com/labs/flex/rad … Fills.mxml
Offline
Hey,
thanks for the reply. That's exactly what I was looking for.
Unfortunately it is not working because Flex Builder can't resolve <amcharts:guides>...
It can find <amcharts:Guide> but apparently I'm not allowed to add a Guide directly to a ValueAxis.
So my code looks like this:
<amcharts:AmRadarChart id="chart" dataProvider="{radarChartData}" fontSize="9"
categoryField="country" x="349" y="76" startDuration="1" width="491">
<amcharts:valueAxes>
<amcharts:ValueAxis
fillAlpha="0.5"
fillColor="0x000000"
axisAlpha="0.3"
gridAlpha="0.05"
fontWeight="bold"
min="0" max="5"/>
// HERE I CAN'T OPEN A <amcharts:guides> TAGS BECAUSE FLEX BUILDER CAN'T RESOLVE IT!!!!!!
<amcharts:Guide tickLength="0" value="0" toValue="5" fillColor="0xFF0000" fillAlpha="0.6"/>
<amcharts:Guide tickLength="0" value="5" toValue="10" fillColor="0x00FF00" fillAlpha="0.6"/>
<amcharts:Guide tickLength="0" value="10" toValue="16" fillColor="0x0000FF" fillAlpha="0.6"/>
</amcharts:valueAxes>
<amcharts:graphs>
<amcharts:AmGraph
valueField="points"
bullet="round"
balloonText="Erreichte Punkte: [[value]]"/>
</amcharts:graphs>
</amcharts:AmRadarChart>I'm really grateful for any advice.
Thanks,
Dan
Offline
Guides should go within guides, and guides go within valueAxis:
<amcharts:AmRadarChart id="chart" dataProvider="{radarChartData}" fontSize="9"
categoryField="country" x="349" y="76" startDuration="1" width="491">
<amcharts:valueAxes>
<amcharts:ValueAxis
fillAlpha="0.5"
fillColor="0x000000"
axisAlpha="0.3"
gridAlpha="0.05"
fontWeight="bold"
min="0" max="5">
<amcharts:guides>
// HERE I CAN'T OPEN A <amcharts:guides> TAGS BECAUSE FLEX BUILDER CAN'T RESOLVE IT!!!!!!
<amcharts:Guide tickLength="0" value="0" toValue="5" fillColor="0xFF0000" fillAlpha="0.6"/>
<amcharts:Guide tickLength="0" value="5" toValue="10" fillColor="0x00FF00" fillAlpha="0.6"/>
<amcharts:Guide tickLength="0" value="10" toValue="16" fillColor="0x0000FF" fillAlpha="0.6"/>
</amcharts:guides>
</amcharts:ValueAxis>
</amcharts:valueAxes>
<amcharts:graphs>
<amcharts:AmGraph
valueField="points"
bullet="round"
balloonText="Erreichte Punkte: [[value]]"/>
</amcharts:graphs>
</amcharts:AmRadarChart>
Offline
Thank you very much!
This is topic is now resolved!
Offline
© amCharts | Forum engine: PunBB