Margin auto-adjustment with custom axes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AndrewP
Newbie
Newbie
Posts: 20
Joined: Tue May 12, 2009 12:00 am

Margin auto-adjustment with custom axes

Post by AndrewP » 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);

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Margin auto-adjustment with custom axes

Post by Narcís » Tue Sep 15, 2009 7:50 am

Hi AndrewP,

No, this is not done automatically with custom axes. However, Yeray posted an example on how to do that here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply