Getting a single series column or bar chart to show legend values next to column?

Jun 9, 2014 at 2:38 PM

First up, excellent project! I found it a few hours ago and can't stop playing with it. I have a quick question that i'm hoping someone could help me with.

In some cases I have a very simple chart requirement... 1 series, but lots of columns (up to 25 columns). I'd like to see the x value of each column underneath that specific column as the legend becomes difficult to follow. My x values are really short (in fact they are just numbers). If I add each value as a series with a single SeriesData (with 1 item), then I get really thin columns.

Example Series:

X - Y
1 - 25
2 - 76
3 - 12
4 - 15

So here the X axis could have the Round Number (1,2,3,4 etc) and the Y axis would have the value (25, 76, 12, 15 etc). So there are 25 items in Round 1, 76 in Round 2 etc.

I'm trying to get this:

I gather I would need to try change some data templates and add some more properties to some classes to carry the extra data. Can anyone point me in the right direction for a column or bar chart?
Jun 9, 2014 at 3:44 PM
Ok, figured it out...

I was previously not setting the category to the same value for each Item I added to a series data. Doing the following works 100% for me.

for (int i = 1; i < 11; i++)
            ObservableCollection<TestClass> seriesData = new ObservableCollection<TestClass>();
            seriesData.Add(new TestClass() { Category = "Round", Number = i*10 });
            Series.Add(new SeriesData() { SeriesDisplayName = i.ToString(), Items = seriesData });
Nov 10, 2014 at 10:09 AM
Could you post your entire code? I'm trying to get this done and I can't figure it out.