Hi All
Is Stacked Bar/Column chart Supports Multiseries..?
I was trying to build a Stacked Bar chart .And add a line
series to it But when i run this I'm getting an error
like this
"ReferenceError: Error #1056: Cannot create property offset
on mx.charts.series.LineSeries."
Here is My Code
------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var netPrByQtrData:ArrayCollection=new
ArrayCollection
([
{quarter:"Q4 05", bottom:88.89, middle:11.11, top:0.00,
netPromoter:-88.89},
{quarter:"Q1 06", bottom:80.00, middle:10.00, top:10.00,
netPromoter:-70.00},
{quarter:"Q2 06", bottom:16.67, middle:50.00, top:33.33,
netPromoter:16.67},
{quarter:"Q3 06", bottom:28.57, middle:28.57, top:42.86,
netPromoter:14.29},
{quarter:"Q4 06", bottom:80.00, middle:20.00, top:0.00,
netPromoter:-80.00},
{quarter:"Q1 07", bottom:80.00, middle:0.00, top:20.00,
netPromoter:-60.00},
{quarter:"Q2 07", bottom:60.00, middle:20.00, top:20.00,
netPromoter:-40.00},
{quarter:"Q3 07", bottom:80.00, middle:0.00, top:20.00,
netPromoter:-60.00}
]);
]]>
</mx:Script>
<mx:Panel title="Net Promoter By Quarters" width="500"
height="350" x="31" y="34">
<mx:ColumnChart id="mychart"
dataProvider="{netPrByQtrData}"
showDataTips="true"
height="250"
width="450" type="stacked">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="quarter"/>
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries
yField="bottom"
xField="quarter"
displayName="Bottom" >
</mx:ColumnSeries>
<mx:ColumnSeries
yField="middle"
xField="quarter"
displayName="Middle" >
</mx:ColumnSeries>
<mx:ColumnSeries
yField="top"
xField="quarter"
displayName="Top" >
</mx:ColumnSeries>
<mx:LineSeries
yField="netPromoter"
xField="quarter"
displayName="Net Promoter" >
</mx:LineSeries>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{mychart}"
direction="horizontal"/>
</mx:Panel>
</mx:Application>
---------------------------------------------------------------------- ---
If I omit type="stacked" from
<mx:ColumnChart id="mychart"
dataProvider="{netPrByQtrData}"
showDataTips="true"
height="250"
width="450" type="stacked">
The code will work perfectly..But unfortunately its not a
Stacked Chart...
Is there any solution for this....Please reply your valuable
suggestions ASAP.....
Thanks in Advance..
Subin