Y Axis Title overlaps Labels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Tim Yen
Newbie
Newbie
Posts: 2
Joined: Thu Sep 27, 2018 12:00 am

Y Axis Title overlaps Labels

Post by Tim Yen » Thu Nov 15, 2018 12:54 am

On my code I have the Y Axis Title overlapping the labels sometimes. It depends on the size of the labels.
What is the recommended way of fixing this?
I am using the latest TeeChart from nuget version 4.2018.10.27.
Attachments
Y Axis Title Overlap.jpg
Y Axis Title Overlap.jpg (28.08 KiB) Viewed 7906 times

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

Re: Y Axis Title overlaps Labels

Post by Christopher » Thu Nov 15, 2018 8:29 am

Hello -

yes, this behaviour is by design and can be modified by setting the FixedLabelSize property to false, as in the following example:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Line)).FillSampleValues();

      tChart1.Axes.Left.Title.Text = "YAxis Title";
      tChart1.Axes.Left.Title.Angle = 90;
    }

    private void button2_Click(object sender, EventArgs e)
    {
      int count = tChart1[0].Count;
      tChart1[0].Clear();

      Random rnd = new Random();

      for (int i = 0; i < count; i++)
      {
        tChart1[0].Add(rnd.Next(100000, 1000000));
      }

      //tChart1.Axes.Left.FixedLabelSize = false;
    }
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

Tim Yen
Newbie
Newbie
Posts: 2
Joined: Thu Sep 27, 2018 12:00 am

Re: Y Axis Title overlaps Labels

Post by Tim Yen » Fri Nov 16, 2018 2:21 am

Thank you it fixed it. :D

Post Reply