![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Hi,
I am trying to plot some points on the Plot Chart. I want to show the Text as my x-axis, so I am using <mx:horizontalAxis> <mx:CategoryAxis id="a1" dataProvider="{expenses}" categoryField="Month" /> </mx:horizontalAxis> in my code for x-axis. Now I want to plot all y-axis items under the same x-axis one if they are from the same 'Month' (used for horizontal axis). If I try to do this, I am getting more values on the x-axis that have same 'Month' name. Is there any way I can fix this problem? Any help would be of great help. I am also attaching the sample example. <?xml version="1.0"?> <!-- charts/DisableAxisLines.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script><![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:"Jan", Profit:2000, Expenses:1500, Amount:450}, {Month:"Feb", Profit:1000, Expenses:200, Amount:600}, {Month:"March", Profit:1500, Expenses:500, Amount:300}, {Month:"Jan", Profit:1000, Expenses:1500, Amount:450}, {Month:"Feb", Profit:2000, Expenses:200, Amount:600}, {Month:"March", Profit:800, Expenses:500, Amount:300}, {Month:"Jan", Profit:200, Expenses:1500, Amount:450}, {Month:"Feb", Profit:100, Expenses:200, Amount:600}, {Month:"March", Profit:150, Expenses:500, Amount:300} ]); ]]></mx:Script> <mx:Panel title="Plot Chart" width="100%" height="100%"> <mx:PlotChart id="myChart" dataProvider="{expenses}" showDataTips="true" width="100%" height="100%"> <mx:horizontalAxis> <mx:CategoryAxis id="a1" dataProvider="{expenses}" categoryField="Month" /> </mx:horizontalAxis> <mx:series> <mx:PlotSeries yField="Profit" displayName="Profit" /> </mx:series> </mx:PlotChart> </mx:Panel> </mx:Application> |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise