How to put in line origins of coordinates?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
starnov
Newbie
Newbie
Posts: 7
Joined: Wed Jun 03, 2009 12:00 am

How to put in line origins of coordinates?

Post by starnov » Wed Jul 15, 2009 2:18 pm

Good day, could you help me. I need to put in line several 2-D charts so that origins of charts will be in line. How can I do it?
see screenshot in attach
Attachments
scr.JPG
scr.JPG (25.4 KiB) Viewed 6824 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to put in line origins of coordinates?

Post by Yeray » Thu Jul 16, 2009 8:39 am

Hi starnov,

This happens because the chart is aligned automatically depending on the maximum label width of the chart. So to align different charts, you could find the max label width for all the charts and assign it to them:

Code: Select all

            int maxLabelWidth = Math.Max(tChart1.Axes.Left.MaxLabelsWidth(), tChart2.Axes.Left.MaxLabelsWidth());
            maxLabelWidth = Math.Max(maxLabelWidth, tChart3.Axes.Left.MaxLabelsWidth());

            tChart1.Axes.Left.Labels.CustomSize = maxLabelWidth;
            tChart2.Axes.Left.Labels.CustomSize = maxLabelWidth;            
            tChart3.Axes.Left.Labels.CustomSize = maxLabelWidth;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

starnov
Newbie
Newbie
Posts: 7
Joined: Wed Jun 03, 2009 12:00 am

Re: How to put in line origins of coordinates?

Post by starnov » Thu Jul 16, 2009 8:49 am

Yeray
thank you very much

Post Reply