I would like to add a drawline with marks on the line acting as a ruler. Is there a way to get at the ondraw event of a drawline tool and add a scale there?
thanks
Sean.
Drawline tool
Hi Sean,
no, this cannot be done easily, but with hard code it could be simulated (using the Canvas techniques (TextOut) in OnAfterDraw event). using similar code like this :
no, this cannot be done easily, but with hard code it could be simulated (using the Canvas techniques (TextOut) in OnAfterDraw event). using similar code like this :
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var i : integer;
begin
if Charttool1.Lines.Count > 0 then
for i := 0 to ChartTool1.Lines.Count -1 do
begin
Chart1.Canvas.TextOut(Chart1.Axes.Bottom.CalcXPosValue(Round(ChartTool1.Lines.Line[i].X0)),
Chart1.Axes.Left.CalcYPosValue(Round(ChartTool1.Lines.Line[i].Y0)),'0');
Chart1.Canvas.TextOut(Chart1.Axes.Bottom.CalcXPosValue(Round(ChartTool1.Lines.Line[i].X1)),
Chart1.Axes.Left.CalcYPosValue(Round(ChartTool1.Lines.Line[i].Y1)),'1');
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com