amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flex Components: amCharts Bundle Flex Components


#1 2010-03-14 21:53:05

DanTheMan
Member

Coloring radar chart

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:

http://www.aia-aerospace.org/images/uploads/EEIC%20Standards%20Radar%20Chart.gif


Any help or hints are highly appreciated.

Thx in advance.... Dan

Offline

 

#2 2010-03-15 02:11:09

marcelionis
Administrator

Offline

 

#3 2010-03-15 16:57:32

DanTheMan
Member

Re: Coloring radar chart

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:

Code:

<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

 

#4 2010-03-15 17:10:05

marcelionis
Administrator

Re: Coloring radar chart

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

 

#5 2010-03-15 17:14:14

DanTheMan
Member

Re: Coloring radar chart

Thank you very much!

This is topic is now resolved!

Offline

 

© amCharts | Forum engine: PunBB