Is it possible to enable just a zero line for bottom axis and disable all other grid lines?
Imagine a chart with two horizontal bar series, stacked. One series has only negativ values (evolves to the left) and the other evolves to the right.
I only need one grid line at X axis value 0.
zero line
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi sm,
Yes, this is possible. I'd use a TColorLineTool as in the code below.
Yes, this is possible. I'd use a TColorLineTool as in the code below.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.Add(-5);
Series1.Add(5);
Series2.Add(-3);
Series2.Add(8);
Chart1.BottomAxis.Grid.Visible:=false;
With ChartTool1 do
begin
Style:=clCustom;
Value:=0;
Draw3D:=false;
Pen.Style:=psDot;
AllowDrag:=false;
DrawBehind:=true;
end;
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 |