Page 1 of 1

CalcPosPoint and log scale

Posted: Fri Mar 30, 2007 3:10 am
by 4206889
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

Posted: Fri Mar 30, 2007 8:42 am
by narcis
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.

Posted: Sat Mar 31, 2007 6:42 am
by 4206889
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