Marks at the axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Marks at the axis

Post by moelski » Fri Dec 07, 2007 12:25 pm

Hi support,

a user asked me the following question ...
Is it possible to have little marks direktly at the Y Axis to show the actual cursor position?

Here you can find a userpic. The small marks are painted into the chart by the user.

http://www.putfile.com/pic.php?img=7230890

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 07, 2007 1:01 pm

Hi Dominik,

You can do that directly drawing on the chart's canvas, something like this:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var i: Integer;
begin
  Chart1.Draw;

  Chart1.Canvas.Pen.Width:=2;
  for i:=0 to Chart1.CustomAxes.Count -1 do
  begin
    Chart1.Canvas.Line(Chart1.CustomAxes[i].PosAxis -2, Y,
                        Chart1.CustomAxes[i].PosAxis +5, Y);
  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
Image Image Image Image Image Image
Instructions - How to post in this forum

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Fri Dec 07, 2007 1:15 pm

Hi Narcis,

I will try this. Thx for your help !

Amazing support ! :D

Post Reply