Depending on how you'd like the data grouped on the y axis (ie, date or
country), then you should restructure/group your data slightly to achieve.
 For example:
Date  India  US
feb 5  20     15
feb 4  30     40


Then use

<mx:verticalAxis>
<mx:CategoryAxis categoryField="date"/>
</mx:verticalAxis>

<mx:BarSeries xField="India" yField="date" />
<mx:BarSeries xField="US" yField="date" />


Pay attention to how a BarChart and ColumnChart differ when defining
vertical vs horizontal axis values.  The following link will be helpful as
well:

http://examples.adobe.com/flex3/componentexplorer/explorer.html

Look at Datavisualization Components -> Charts -> Chart Controls -> Bar
Chart.



Hope that helps,

Brendan




On Sun, Feb 8, 2009 at 2:16 AM, Vik <vik....@gmail.com> wrote:

>   Hie
>
> I have the data like
> Date Country production
> 5-feb-09 IND 20
> 5-feb-09 US 15
> 4-Feb-09 IND 30
> 4-Feb-0 IND 40
>
> I have to show this data as a bar char.
> Where horizontal axis should be date.
> Vertical axis will show production
> and chart will show 2 pillar per date (one for ind and another for US).
>
> I tried various ways but could not get the desired results. Any suggestions
> for the required mxml for this.
> I tried like:
> <mx:BarChart id="myChart"
> width="100%" height="100%"
> showDataTips="true"
> type="clustered">
> <mx:horizontalAxis>
> <mx:CategoryAxis categoryField="date"/>
> </mx:horizontalAxis>
> <mx:series>
> <mx:BarSeries displayName="Yesterday" xField="date" yField="production" />
> <mx:BarSeries displayName="Today" xField="date" yField="production" />
> </mx:series>
> </mx:BarChart>
>
> any suggestions?
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
>  
>



-- 
Brendan Meutzner
http://www.meutzner.com/blog/

Reply via email to