tags:

views:

17

answers:

1

hi,

I want to use an AreaSeries to display the content of an arrayCollection (the cell values are displayed on the y axis).

The Array collection is dataManager.tagViewTimelineModel.summedPopularity

 <mx:AreaSeries id="timeArea" styleName="timeArea" name="A"  dataProvider="dataManager.tagViewTimelineModel.summedPopularity" areaStroke="{new Stroke(0x0033CC, 2)}" areaFill="{new SolidColor(0x0033CC, 0.5)}" />

But it doesn't work, the graph is empty....

Am I doing something wrong ?

This is the full code for completeness.

mx:CartesianChart id="AllChart" dataProvider="{dataManager.tagViewTimelineModel.tags}" width="100%" height="100">

            <mx:horizontalAxis><mx:CategoryAxis id="horiz1"  dataProvider="['1','2','3','4','5','6','7','8','9','10','11','23','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']"/></mx:horizontalAxis>
            <mx:horizontalAxisRenderers><mx:AxisRenderer axis="{horiz1}"/></mx:horizontalAxisRenderers>

            <mx:verticalAxis><mx:LinearAxis id="vert1" /></mx:verticalAxis>
            <mx:verticalAxisRenderers><mx:AxisRenderer axis="{vert1}"/></mx:verticalAxisRenderers>

            <mx:series>
                <mx:AreaSeries id="timeArea" styleName="timeArea" name="A"  dataProvider="dataManager.tagViewTimelineModel.summedPopularity" areaStroke="{new Stroke(0x0033CC, 2)}" areaFill="{new SolidColor(0x0033CC, 0.5)}" />

            </mx:series> 
     </mx:CartesianChart>

thanks

A: 

I think you might need { } around your dataProvider for your AreaSeries declaration. You have it on top for your chart but you probably overrode it below.

CookieOfFortune
I think you may also need to specify a yField.
CookieOfFortune