Axes labels position

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
icecream
Newbie
Newbie
Posts: 20
Joined: Thu Aug 07, 2008 12:00 am

Axes labels position

Post by icecream » Wed Mar 23, 2016 12:48 pm

Is there a way to increase bottom axis labels Y position and left axis labels X position? I want to have an area between axis and label to draw own rectangle there.
I have tried to create new AxisLabelItem and change its X,Y properties, however this does not work.
Using Winforms, TeeChart v3.5.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Axes labels position

Post by Christopher » Thu Mar 24, 2016 9:14 am

One simple way to achieve this would be with code such as the following:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(typeof(Line)).FillSampleValues();
      tChart1.Panel.MarginBottom = 20;
      tChart1.GetAxisLabel += TChart1_GetAxisLabel;
    }

    private void TChart1_GetAxisLabel(object sender, GetAxisLabelEventArgs e)
    {
      e.LabelText = Utils.NewLine + Utils.NewLine + e.LabelText;
    }
which gives me this:
Chart635944112235309793.png
Chart635944112235309793.png (13.27 KiB) Viewed 5905 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply