calcuate text width for Gant Series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
gkobler
Newbie
Newbie
Posts: 4
Joined: Fri Mar 07, 2025 12:00 am

calcuate text width for Gant Series

Post by gkobler » Tue Jul 29, 2025 9:05 am

Hello

My problem are i try to calculate the text width of a Gant series.

Follow a demo of my program, to show my problem. At the moment, i have mutch free space between the right border and the end of the text. (see Attached file).

But i need the gap, because sometimes the text are mutch longer than at the example.

So my goal are to calculate the text with, and setup the margin automaticly.

May somebody has me a hint.

Thanks in advanced
Gregor
Attachments
zTIUMgIn0I.png
zTIUMgIn0I.png (85.51 KiB) Viewed 51 times

Yeray
Site Admin
Site Admin
Posts: 9722
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: calcuate text width for Gant Series

Post by Yeray » Fri Aug 01, 2025 7:41 am

Hello,

This looks more a matter of calculating the width of the axis label than the gantt series.
I'd suggest you to take a look a the PlaceAxis method I implemented time ago (here). It should allow you to set the margin your axis labels require.

If you still find problems with it, please don't hesitate to arrange a simple example project we can run as-is to reproduce the situation here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply