Title names and axis variable names out of the chart with TeeChart for .Net

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
David N.
Newbie
Newbie
Posts: 8
Joined: Wed May 17, 2023 12:00 am

Title names and axis variable names out of the chart with TeeChart for .Net

Post by David N. » Thu Jun 22, 2023 8:56 am

Hello,

When I plot data in the chart, the title name goes out of the chart and you can not read it.
Image

The same happens with the variables or labels assigned to the axis.
Image

Is there any way to make TeeChart to respect the text adapting the chart size to it in order to fit everything and make it readable?

Thank you.
Attachments
tChartMain.png
tChartMain.png (15.8 KiB) Viewed 12578 times
image-20230620-123457.png
image-20230620-123457.png (32.01 KiB) Viewed 12578 times

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

Re: Title names and axis variable names out of the chart with TeeChart for .Net

Post by Christopher » Thu Jun 22, 2023 4:26 pm

Hello,
David N. wrote:
Thu Jun 22, 2023 8:56 am
When I plot data in the chart, the title name goes out of the chart and you can not read it.
By turning off a default speed optimization to stop the unnecessary recalculation of label sizes, I think you can achieve what you want, e.g.

Code: Select all

        public Form1()
        {
            InitializeComponent();

            var bar = new Bar(tChart1.Chart);

            bar.Add(1, "A long label for bar one");
            bar.Add(10, "A long label for bar one");

            tChart1.Axes.Bottom.FixedLabelSize = false;
        }


        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Axes.Bottom.Labels.Angle = 45;
        }
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