Page 1 of 1

Hide Axis Labels

Posted: Thu Jun 08, 2006 2:49 pm
by 9343260
Hello,

Is it possible to have only the graduation of an axis, and not the labels ? I would like to hide the labels or customize them without touching the graduation.

This would be an exemple of what i would like to do :

Image

Posted: Fri Jun 09, 2006 10:24 am
by Pep
Hi,

one way to do this would be to make invisible the non desired axis labels using the OnGetAxisLabel event, using similar code to the following :

Code: Select all

    procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
        Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
    begin
        if Sender = Chart1.axes.left then
            Labeltext := ' '
    end;
Here you can customize which ones can be showed,.. or simply hide all and then use the Canvas TextOut methid to display the labels you want.

Posted: Mon Jun 12, 2006 2:51 pm
by 9343260
Thanks, I didn't find this method. 8)