Margin auto-adjustment with custom axes
Posted: Mon Sep 14, 2009 9:58 pm
I'm working with the Silverlight version of the chart and I've got a question about custom axes.
Is there some way to get a custom axis to adjust the chart panel margin according to the axis title and labels, similar to the way default axes do? The default axis will adjust panel automatically to make room for the axis labels and title but it seems that only the default axis does this.
For example, if I assign series to a vertical axis like so:
Axis axis = new Axis(false, false, chart.Chart);
axis.Title.Angle = 90;
Series series = new Line();
series.FillSampleValues();
series.CustomVertAxis = axis;
chart.Series.Add(series);
the margins are different than if I use the default left axis:
Series series = new Line()
series.FillSampleValues();
chart.Series.Add(series);
Is there some way to get a custom axis to adjust the chart panel margin according to the axis title and labels, similar to the way default axes do? The default axis will adjust panel automatically to make room for the axis labels and title but it seems that only the default axis does this.
For example, if I assign series to a vertical axis like so:
Axis axis = new Axis(false, false, chart.Chart);
axis.Title.Angle = 90;
Series series = new Line();
series.FillSampleValues();
series.CustomVertAxis = axis;
chart.Series.Add(series);
the margins are different than if I use the default left axis:
Series series = new Line()
series.FillSampleValues();
chart.Series.Add(series);