HI,
I have a 2d line chart that needs to have labels on the x axis of weeks 1 to 52, and underneath it series labels of month name.
I have already written the follwing and I can get my row labels showing ok:
line_chart.Data.SwapRowsAndColumns = true
line_chart.Data.UseRowLabelsColumn = true
line_chart.Data.RowLabelsColumn = 3
l get row labels of weeks 1 to 52 using this code.
How do I get a series row label underneath my row labels? I have another column in my datatable with the month name for each row.
Thanks in advance.
Unfortunately, the LineChart does not allow series labels. Each line represents one row of data. Each series label also describes one row of data and therefore must somehow be specific to that particular line. Since each line spans the entire width of the chart, there is no way to tell which series label describes which series. If you need to subdivide your labels into further logical groups, I think using annotations to just put a text label below the axis labels is the best bet.
OK.. I will try annotations. Thanks
Just one question:
a.TextStyle.font properties are all readonly. I can't adjust the fontsize at runtime... any reason why this is?
Fonts are immutable, just like strings, so any time you want to change a font, you need to create a new instance of it, like so:a.TextStyle.Font = new Font(...)