Skip navigation
Currently Being Moderated

How to combine line chart and stacked column chart?

Jan 23, 2011 11:30 AM

Hi All,

 

I need to create a chart that will look like this:

 

pic1.png

 

This chart is composed of stacked chart and line chart.  I found how to combine regular column charts and line graphs but did not find how to combine stacked comlumn charts with line graphs.

 

Can anyone help me or refere me to somewhere?

 

Thanks in advance,

Lior

 
Replies
  • Currently Being Moderated
    Jul 31, 2013 10:52 PM   in reply to Lior Bruder

    Hi lior,

    You can use catesian chart as base chart .

    try this sample

     

    <mx:CartesianChart id="myChart" dataProvider="{expenses}" showDataTips="true">

            <mx:horizontalAxis>

               <mx:CategoryAxis

                    dataProvider="{expenses}"

                    categoryField="Month"

               />

            </mx:horizontalAxis>

           <mx:series>

                <mx:ColumnSet type="stacked" allowNegativeForStacked="true">

                    <mx:series>

                        <mx:ColumnSeries

                            xField="Month"

                            yField="Profit"

                            displayName="Profit"

                        />

                        <mx:ColumnSeries

                            xField="Month"

                            yField="Expenses"

                            displayName="Expenses"

                        />

                    </mx:series>

                </mx:ColumnSet>   

                <mx:LineSeries xField="Month"

                            yField="Expenses"

                            displayName="Expenses"/> 

                <mx:LineSeries

                xField="Month"

                yField="Profit"

                displayName="Profit"

            />  

            </mx:series>

           

         </mx:CartesianChart>

        

      </mx:Panel>

    Output:

    Capture.JPG

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points