Sign in to follow this  
chris7197

Multi Series Stacked Column Chart

Recommended Posts

Hi,

 

I am trying to make a multi series column chart, where one column in each category will be split to a stack. Here is my XML:

 

<chart caption='Depot Breakdown' yAxisMin='0' xAxisMin='0' xAxisName='Depot' yAxisName='Value' showValues='0' numberPrefix='£'>
<categories>
<category label='B ' />
<category label='J ' />
<category label='R ' />
<category label='S ' />
<category label='T ' />
<category label='W ' />
<category label='X ' />
<category label='Y ' />
</categories>

<dataset seriesName='Sales'>
<set value='78488.83' />
<set value='22988.96' />
<set value='81950.60' />
<set value='203828.76' />
<set value='101022.07' />
<set value='28384.96' />
<set value='9026.19' />
<set value='85995.00' />
</dataset>

<dataset seriesName='Costs'>
<dataset seriesName='Sub-contractor' includeInLegend='0'>
<set value='7025.22' />
<set value='1293.18' />
<set value='11864.97' />
<set value='60935.50' />
<set value='16603.35' />
<set value='5159.69' />
<set value='590.00' />
<set value='14498.00' />
</dataset>

<dataset seriesName='Variable - Fuel' includeInLegend='0'>
<set value='11394.51' />
<set value='4962.00' />
<set value='11899.34' />
<set value='17077.88' />
<set value='12805.10' />
<set value='4966.58' />
<set value='1919.93' />
<set value='10547.08' />
</dataset>

<dataset seriesName='Variable - Wages' includeInLegend='0'>
<set value='9426.45' />
<set value='4216.18' />
<set value='6616.56' />
<set value='22401.36' />
<set value='11454.24' />
<set value='7143.20' />
<set value='1698.69' />
<set value='10684.37' />
</dataset>

<dataset seriesName='Fixed - Standard' includeInLegend='0'>
<set value='7596.62' />
<set value='3120.48' />
<set value='6931.48' />
<set value='12676.79' />
<set value='8926.74' />
<set value='3188.05' />
<set value='2557.67' />
<set value='6844.12' />
</dataset>

<dataset seriesName='Fixed - Maintenance' includeInLegend='0'>
<set value='676.12' />
<set value='257.48' />
<set value='380.96' />
<set value='1427.34' />
<set value='641.98' />
<set value='461.82' />
<set value='78.76' />
<set value='714.63' />
</dataset>

<dataset seriesName='Inter-depot' includeInLegend='0'>
<set value='21160.37' />
<set value='4891.65' />
<set value='24437.24' />
<set value='45217.24' />
<set value='26373.20' />
<set value='5605.82' />
<set value='1727.65' />
<set value='22003.01' />
</dataset>

</dataset>

<dataset seriesName='Margin'>
<set value='22406.36' />
<set value='4248.02' />
<set value='22141.56' />
<set value='44567.30' />
<set value='24824.98' />
<set value='2335.91' />
<set value='453.56' />
<set value='20703.82' />
</dataset>

 

 

So basically the 'Sales' dataset will be just a regular column, the 'Costs' would have subdatasets to split that column into the relevant Cost types, and the Margin would be a regular column.

 

The issue with this is at the only Costs bar shows for each category - it is stacked correctly, but the Sales and Margin do not show at all. Any ideas?

 

Here is the C# code I'm using to generate this (as you can see I'm using MSStackedColumn2D.swf)

 

 

FusionCharts.RenderChart("FusionCharts/MSStackedColumn2D.swf", "", sbExpandedMargin.ToString(), "ExpandedDepotBreakdown", "800", "500",false, true, true);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this