0 Replies Latest reply on Jul 26, 2007 10:29 PM by rsnere

    Stacked charts

    rsnere
      I want to create a stacked column chart with both negative and posotive values. but i m not able to plot it.
      Can anybody suggest something on this. how shud i

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">

      <mx:Script>
      <![CDATA[

      private var plotData =
      [{Month: "Jan 03", sales:200, purchase:800},
      {Month: "Feb 03", sales:392, purchase:385},
      {Month: "Mar 03", sales:-820, purchase:-383},
      {Month: "Apr 03", sales:-540, purchase:-827}]
      ]]>
      </mx:Script>

      <mx:ColumnChart type="stacked" dataProvider="{plotData}" width="100%" height="100%">
      <mx:horizontalAxis>
      <mx:CategoryAxis dataProvider="{plotData}" categoryField="Month" />
      </mx:horizontalAxis>

      <mx:series>
      <mx:Array>
      <mx:ColumnSeries yField="sales" />
      <mx:ColumnSeries yField="purchase" />
      </mx:Array>
      </mx:series>
      </mx:ColumnChart>

      </mx:Application>