How to separate left axis labels from left axis title on .NET 5

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

How to separate left axis labels from left axis title on .NET 5

Post by bairog » Thu Sep 29, 2022 12:33 pm

Hello.
I'm using latest Steema.TeeChart.NET 4.2022.9.26 in a .NET 5 Windows Forms application on Windows 10 21H2.
Sometimes left axis title overlaps left axis labels:
Image
How to separate left axis labels from left axis title to get rid of this overlapping? I didn't find any property for axis title position.

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

Re: How to separate left axis labels from left axis title on .NET 5

Post by Christopher » Mon Oct 03, 2022 7:26 am

Hello,

What is most likely happening here is that a performance optimization to not recalculate label sizes is on—you can turn it off by setting FixedLabelSize to false, e.g.

Code: Select all

    private void InitializeChart()
    {
      var bar = new Bar(tChart1.Chart);
      bar.FillSampleValues();

      tChart1.Axes.Left.Title.Text = "Left Title";
      //tChart1.Axes.Left.Title.CustomSize = 80;
      //tChart1.Axes.Left.Labels.CustomSize = 80;
      tChart1.Axes.Left.FixedLabelSize = false;
    }
The two CustomSize properties will change the size of the space either side of the Title, as you will be able to see.
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