0 Replies Latest reply on Sep 12, 2006 7:23 AM by siva_pega

    type=stacked issue in bar chart

    siva_pega
      Hi,
      below is the code that is supposed to display a stacked bar chart.
      instead it displays a single bar with no stacking.

      when i change the type attribute of bar chart to "clustered", it
      displays the clustered bar chart just fine. i don't know why it is not working when the type="stacked"

      i only changed the data source values from the adobe documented bar chart example.
      i removed values for Silver and Bronze for USA from medalsAC array collection and
      added mySilver a value >(greater than) 100.

      Any thing wrong with the below code or a bug in product? if i change the value of mySilver to <(less than 50), then it displays fine.
      -Siva


      <?xml version="1.0"?>
      <!-- Simple example to demonstrate the ColumnChart and BarChart
      controls. -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" >
      <mx:Script>
      <![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable]
      private var medalsAC:ArrayCollection = new ArrayCollection( [
      { Country: "USA", Gold: 35 },
      { Country: "China", Silver:17, mySilver:200 },
      { Country: "Russia", Bronze: 38 } ]);
      ]]>
      </mx:Script>
      <mx:Panel title="ColumnChart and BarChart Controls Example"
      height="100%" width="100%" layout="horizontal">

      <mx:BarChart id="column1" height="100%" width="100%"
      paddingLeft="5" paddingRight="5"
      showDataTips="true" dataProvider="{medalsAC}"
      type="stacked">

      <mx:verticalAxis>
      <mx:CategoryAxis categoryField="Country"/>
      </mx:verticalAxis>
      <mx:series>
      <mx:BarSeries xField="Silver" displayName="Silver"/>
      <mx:BarSeries xField="mySilver"
      displayName="mySilver"/>
      <mx:BarSeries xField="Gold" displayName="Gold"/>
      <mx:BarSeries xField="Bronze" displayName="Bronze"/>
      </mx:series>
      </mx:BarChart>

      <mx:Legend dataProvider="{column1}"/>
      </mx:Panel>
      </mx:Application>