I'm programmatically creating a bar chart with 2 series. The x-axis needs to be the month but different users might have different calendar years so won't always be Jan - Dec. Not sure the best way to go about this. I had it sort of working but when there's no data for most of the months the value labels were missing or floating where they shouldn't. The x-axis was displaying correctly but the values weren't.
As I was looping through the 12 month year creating a chart item for each of the two series (current year and previous year) I was also adding a plot item like so
rcTotalsMonth.PlotArea.XAxis.Items.Add(monthItem);
where monthItem was just a string with the month abbreviation. From some other example I've seen
but that would mean needing to tie the data to it which is what I'm not sure of.
So if someone could give me a quick example of say, an x-axis going from "Apr" to "Mar" with currency y values that would be great. Thanks.
As I was looping through the 12 month year creating a chart item for each of the two series (current year and previous year) I was also adding a plot item like so
rcTotalsMonth.PlotArea.XAxis.Items.Add(monthItem);
where monthItem was just a string with the month abbreviation. From some other example I've seen
rcTotalsMonth.PlotArea.XAxis[0].TextBlock.Text = String.Format("{0:MMM}", tPrevDate);
but that would mean needing to tie the data to it which is what I'm not sure of.
So if someone could give me a quick example of say, an x-axis going from "Apr" to "Mar" with currency y values that would be great. Thanks.