Draw chart grid lines crossing points
Draw chart grid lines crossing points
Hello, is it possible to draw the crossing points of the axes grid lines only?
Re: Draw chart grid lines crossing points
Hello,
You could draw it manually at the
You could draw it manually at the
OnBeforeDrawSeries
event as follows:
Code: Select all
procedure TForm1.Chart1BeforeDrawSeries(Sender:TObject);
var i, j: Integer;
begin
Chart1.Canvas.AssignVisiblePen(Chart1.Axes.Left.Grid);
Chart1.Canvas.Pen.Style:=psSolid;
for i:=0 to Length(Chart1.Axes.Left.Tick)-1 do
for j:=0 to Length(Chart1.Axes.Bottom.Tick)-1 do
begin
Chart1.Canvas.HorizLine3D(Chart1.Axes.Bottom.Tick[j]-2, Chart1.Axes.Bottom.Tick[j]+2, Chart1.Axes.Left.Tick[i], Chart1.Width3D);
Chart1.Canvas.VertLine3D(Chart1.Axes.Bottom.Tick[j], Chart1.Axes.Left.Tick[i]-2, Chart1.Axes.Left.Tick[i]+2, Chart1.Width3D);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Draw chart grid lines crossing points
Thank you for the code, it works fine!