Page 1 of 1

Margin auto-adjustment with custom axes

Posted: Mon Sep 14, 2009 9:58 pm
by 15653258
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);

Re: Margin auto-adjustment with custom axes

Posted: Tue Sep 15, 2009 7:50 am
by narcis
Hi AndrewP,

No, this is not done automatically with custom axes. However, Yeray posted an example on how to do that here.