have 5 charts lined up next to each other (left to right). (scales are set to the same values - left all the same and right all the same). would like to have only the left axis on the left chart and the right axis on the right chart visible. have figured out how to show and hide the labels/axis on the charts. problem is when i set either LeftAxis->Labels or LeftAxis->Axis to false, it also hides the horizontal "grid" lines. is there a way to accomplish this (no axis and/or labels, but showing gridlines)?
thanks.
hide/remove axis labels but not chart lines
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi rperkins,
Yes, you can do something like the code below where chart elements are hidden and labels are set to a blank space in the OnGetAxisLabel event.
Hope this helps!
Yes, you can do something like the code below where chart elements are hidden and labels are set to a blank space in the OnGetAxisLabel event.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
With Chart1.Axes.Left do
begin
Axis.Visible:=false;
MinorTicks.Visible:=false;
Ticks.Visible:=false;
end;
end;
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
if Sender=Chart1.Axes.Left then
LabelText:=' ';
end;
Best Regards,
Narcís Calvet / 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 |