CalcPosPoint and log scale

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
amjoao
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

CalcPosPoint and log scale

Post by amjoao » Fri Mar 30, 2007 3:10 am

I'm usind Builder 5 and TeeChart 5.02.

In the chart, I draw some custom lines with Canvas->MoveTo and LineTo, I can move the lines in the chart using the MouseMove event and CalcPosPoint to redraw the line on the new position. This works fine.

The problem is when I am using the log scale in the Axis, like Chart1->LeftAxis->Logarithmic. If I try to move the line, the slope changes as I move the mouse.

Thanks for any help.

Joao Medeiros

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 Mar 30, 2007 8:42 am

Hi Joao,

Have you tried using DrawLine tool for drawing lines in a chart instead of custom drawing on the canvas? DrawLine tool also allows dragging its lines.
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

amjoao
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Post by amjoao » Sat Mar 31, 2007 6:42 am

Hi Narcís,

Thanks for the answer.

I really need my own lines, because the users of the program draw some objects (which are a block of lines) in the chart.

I have found my mistake. After call CalcPosPoint I have some values, I need do some additions with these values for the new line position.

I used the procedure to fix the problem.

1) Get the values using CalcPosPoint
2) Take the Log of the values
3) Do the additions
4) Take the pow of the results

Post Reply