2 Replies Latest reply on Feb 10, 2011 10:14 AM by igor1986

    Flex Column Chart: not dispsplaying columns with the same labels.

    igor1986

      Hello! I'am using flex colum chart to display some reports, and when i have equal items in dataprovider, the chart not displaying all column, just one. Wnen i change labels in my dataprovider, chart display all columns. It is possible there are property that turns on\off this feature, or somethnig like this? Thank you for any feedback.09.02.png

        • 1. Re: Flex Column Chart: not dispsplaying columns with the same labels.
          Pablo Souza Level 3

          Hello,

           

          All "Hair Cuts" information are being displayed in the same bar (the last one).

           

          Take a look at the code below, if I use the label "Month" as the categoryField in the horizontal axis, the chart will render all data stacked in the same bar, because "January" is being repeated 3 times.

           

          {Month:"January", Profit:2000, Expenses:1500, Amount:450},
          {Month:"January", Profit:2300, Expenses:1530, Amount:420},
          {Month:"January", Profit:3200, Expenses:1503, Amount:430},

           

          <?xml version="1.0"?>
          <!-- charts/ArrayConvertedToArrayCollection.mxml -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
              <mx:Script><![CDATA[
                  import mx.collections.ArrayCollection;
                  
                  private var expenses:Array = [
                      {Month:"January", Profit:2000, Expenses:1500, Amount:450},
                      {Month:"January", Profit:2300, Expenses:1530, Amount:420},
                      {Month:"January", Profit:3200, Expenses:1503, Amount:430},
                      {Month:"February", Profit:1000, Expenses:200, Amount:600},
                      {Month:"March", Profit:1500, Expenses:500, Amount:300},
                      {Month:"April", Profit:500, Expenses:300, Amount:500},
                      {Month:"May", Profit:1000, Expenses:450, Amount:250},
                      {Month:"June", Profit:2000, Expenses:500, Amount:700}
                  ];
                  
                  [Bindable]
                  public var expensesAC:ArrayCollection = 
                      new ArrayCollection(expenses);
                  
              ]]></mx:Script>
              
              <mx:Panel title="Column Chart">
                  <mx:ColumnChart id="myChart" dataProvider="{expensesAC}" showDataTips="true">
                      <mx:horizontalAxis>
                          <mx:CategoryAxis
                              dataProvider="{expensesAC}"
                              categoryField="Month"
                              />
                      </mx:horizontalAxis>
                      <mx:series>
                          <mx:ColumnSeries
                              xField="Month"
                              yField="Profit"
                              displayName="Profit"
                              />
                          <mx:ColumnSeries
                              xField="Month"
                              yField="Expenses"
                              displayName="Expenses"
                              />
                      </mx:series>
                  </mx:ColumnChart>
                  <mx:Legend dataProvider="{myChart}"/>
              </mx:Panel>
          </mx:Application>
          
          

           

           

          It seems you are facing the same issue.

           

           

          Greets,

          Pablo Souza

          • 2. Re: Flex Column Chart: not dispsplaying columns with the same labels.
            igor1986 Level 1

            Hello Pablo. Thank you for response. Yes, exactly the same issue.