Extending TCursorTool to display over Custom Axes.
Extending TCursorTool to display over Custom Axes.
I want the vertical line of the TCursorTool to also extend across my custom axes. I want the tool to be assiged to Series1, but to display over other Series on custom axes. I figure I can spend some time coding this but do you folk have a quick method I can use.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Extending TCursorTool to display over Custom Axes.
Hi Phineas,
The easiest solution I can think of now is using a TColorLineTool for that, for example:
Hope this helps!
The easiest solution I can think of now is using a TColorLineTool for that, for example:
Code: Select all
procedure TForm1.ChartTool1Change(Sender: TCursorTool; x, y: Integer;
const XValue, YValue: Double; Series: TChartSeries; ValueIndex: Integer);
begin
ColorLine.Value:=ChartTool1.XValue;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
ColorLine:=TColorLineTool.Create(Self);
ColorLine.Axis:=Series2.GetHorizAxis;
ColorLine.Pen.Color:=ChartTool1.Pen.Color;
ColorLine.Value:=ChartTool1.XValue;
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 |