Answered by:
How to produce Stacked Column chart ?

Question
-
I'm trying to produce a Stacked Column chart
I have table data containing information thus:
Date = 22/11/2008, Payee = HCF, Amount = $75.00
Date = 22/11/2008, Payee = Misc, Amount = $20.00
Date = 22/11/2008, Payee = Rest, Amount 35.00
and many more transactions for different dates.
For the specific date, the total amount is (75 + 20 + 35) = 130.
What I'm getting is a bar showing the label of greatest amount (75.00) with
the other amounts labelled within this bar i.e. the bar contents are not additive.
How do I get each bar showing each Payee's transactions stacked one above the other?
I'm retrieving the data from a database via a LINQ query.
Monday, December 1, 2008 4:12 AM
Answers
-
To display stacked data you need to create 3 data series and add 75, 20, 35 as data points. Here what it should look like:
Series 1 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=75
Series 2 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=20
Series 3 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=35
Check Chart Sample Framework for more information...
Alex.- Proposed as answer by Alex GorevMicrosoft employee Monday, December 1, 2008 3:44 PM
- Marked as answer by Alex GorevMicrosoft employee Tuesday, December 2, 2008 1:23 AM
Monday, December 1, 2008 3:44 PM
All replies
-
To display stacked data you need to create 3 data series and add 75, 20, 35 as data points. Here what it should look like:
Series 1 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=75
Series 2 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=20
Series 3 (Stacked Column)
DataPoint 1 X=22/11/2008 Y=35
Check Chart Sample Framework for more information...
Alex.- Proposed as answer by Alex GorevMicrosoft employee Monday, December 1, 2008 3:44 PM
- Marked as answer by Alex GorevMicrosoft employee Tuesday, December 2, 2008 1:23 AM
Monday, December 1, 2008 3:44 PM -
Alex: thanks. I'll follow your template.Tuesday, December 2, 2008 12:54 AM
-
Alex: thinking further about this, I can't predict how many different Payees (Ys) there might be for any one transaction date (Xs) so I don't know how many Y data series to create. The number of Payees will vary between transaction dates. So for each X, there may be many Ys.
How would one tackle this?
In fact this will be a problem for any chart type I wish to create.
Tuesday, December 2, 2008 3:57 AM -
In order to plot the data in stacked chart you will need the data in the above format... You can either change your query or process your data after binding.
Alex.Tuesday, December 2, 2008 4:45 AM -
Mmmm, I'll have to think about that!Tuesday, December 2, 2008 5:17 AM