Charting Control Issue with Axis Label Angling

The .NET charting control is cool, but I've run into a variety of unique situations, and because of the newness of the control and lack of documentation, there wasn't a really good answer.  The Y Axis labels became slanted for one of my bar charts.  The issue was my InnerPlotPosition was too big for the chart, something like:

<InnerPlotPosition X="5" Y="5" Height="90" Width="90" />

If you don't know where this is defined, this property is a child of the ChartArea object that defines the region of the chart, where the chart will live.  Because of this specific chart and the way the legend was rendering, this was a little too wide, forcing my labels to be crooked.  The solution was to increase this to a bigger size of X/Y to 10 and Height/Width to 85.  By making it bigger, it straightened out the Y axis labels.

I thought this may be a setting, because you can control the X and Y axis labels in the AxisX and AxisY settings, through the LabelStyle.Angle property (LabelStyle exists underneath the AxisX and AxisY objects, which sit underneath the ChartArea.

Published Sunday, March 22, 2009 11:26 PM by bmains
Filed under: ,

Comments

No Comments