Page 1 of 1

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

Posted: Thu Sep 29, 2022 12:33 pm
by 15685014
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.

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

Posted: Mon Oct 03, 2022 7:26 am
by Christopher
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.