TChartGrid column width

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Herman
Newbie
Newbie
Posts: 56
Joined: Tue Dec 07, 2004 5:00 am

TChartGrid column width

Post by Herman » Fri May 27, 2005 9:39 am

I connect chart grid width a tchart. Add some series on the chart.
For each of the series, i give a different title name.
How to set the column width of chart grid, in order to make all the title text can be visible? What if i change the windows text dpi, how to recalculate the column width for different text dpi, text name, etc?

Thank you

Pep
Site Admin
Site Admin
Posts: 3298
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun Jun 05, 2005 9:30 am

Hi Herman,

you can do :

Code: Select all

Series1.Title := 'My Title';
chartgrid1.ColWidths[2]:=25+Chart1.Canvas.TextWidth(Series1.Title); // default 25 - for symbol,..

Post Reply