1 Reply Latest reply on Aug 15, 2008 9:40 AM by Gregory Lafrance

    Problem with Area  Chart

    sri harsha namala Level 2
      Hi EveryOne,

      Me having problem with area chart,i have taken 3 area series to plot when me plotting the values one of the series is getting overlapped,Why its happening like this? Me attached the code
      Thanks in advance.

      <?xml version="1.0"?>

      <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:0, Expenses:0, Amount:450},
      {Month:"Feb", Profit:5, Expenses:0, Amount:600},
      {Month:"Mar", Profit:5, Expenses:5, Amount:300},
      {Month:"Mar", Profit:0, Expenses:5, Amount:300}
      ]);
      public var expenses1:ArrayCollection = new ArrayCollection([
      {Month:"Jan", Profit:0, Expenses:5, Amount:450},
      {Month:"Feb", Profit:5, Expenses:5, Amount:600},
      {Month:"Mar", Profit:5, Expenses:10, Amount:300},
      {Month:"Mar", Profit:0, Expenses:10, Amount:300}
      ]);
      public var expenses2:ArrayCollection = new ArrayCollection([
      {Month:"Jan", Profit:5, Expenses:0, Amount:450},
      {Month:"Feb", Profit:10, Expenses:0, Amount:600},
      {Month:"Mar", Profit:10, Expenses:6, Amount:300},
      {Month:"Mar", Profit:5, Expenses:6, Amount:300}
      ]);

      ]]></mx:Script>

      <mx:AreaChart id="myChart"
      showDataTips="true">


      <mx:series>
      <mx:AreaSeries id="ara" dataProvider="{expenses}"
      xField="Expenses"
      yField="Profit"

      />
      <mx:AreaSeries id="ara1" dataProvider="{expenses1}"
      xField="Expenses"
      yField="Profit"

      />
      <mx:AreaSeries id="ara2" dataProvider="{expenses2}"
      xField="Expenses"
      yField="Profit"

      />
      </mx:series>
      </mx:AreaChart>

      </mx:Application>