0 Replies Latest reply on May 12, 2010 12:48 PM by C LAB

    Stacked/100% Area Chart - zero value last series Spark bug?

    C LAB

      Is there a way to have a value of 0 in the last series of a stacked or 100% AreaChart using a Spark application?   When there is a zero it breaks the rules of this AreaChart type and the series makes a "beeline" to the 0 on the y axis.  Zero values are ok in the other series (just not the top most). 


      This example works when starting a Flex 3.5 project only and using this for the application:

           <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">


      and <mx:Script> tags instead of <fx:Script>


      Thanks for any help!


      <!-- CODE BELOW -->

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" >

                  import mx.collections.ArrayCollection;


                  public var expenses:ArrayCollection = new ArrayCollection([

                      {Month:"Jan", Profit:2000, Expenses:1500, Amount:450},

                      {Month:"Feb", Profit:1000, Expenses:0, Amount:600},

                      {Month:"Mar", Profit:1500, Expenses:33, Amount:300},

                      {Month:"Apr", Profit:1500, Expenses:50, Amount:300}


          <mx:AreaChart id="myChart" dataProvider="{expenses}" showDataTips="true" type="100%">
                  <mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"/>
                  <mx:AreaSeries yField="Profit" displayName="Profit" />
                  <mx:AreaSeries yField="Expenses" displayName="Expenses" />