Page 1 of 1

Custom draggable marks with auto-scaling axis

Posted: Fri Sep 03, 2010 7:18 am
by 10547025
I am using Delphi 2007 and TeeChart Pro 8.06. I wish to position marks to the right of each point in a LineSeries (rather than above) and then allow them to be draggable. I clearly cannot use a Chart.OnAfterDraw event as this will be triggered whenever I try to drag the marks and reset them to the default position.

LineSeries.OnAfterAdd event (with a call to Chart.Draw) also doesn't work because subsequent data can change the axis scales, so the marks get drawn incorrectly.

I feel that the Chart.OnAddSeries event might be the place to do the mark positionsing but I don't seem to be able to get it to work - some conflict between TCustomChartSeries and TChartSeries !!! Any suggestions?

Thanks and regards

Errol

Re: Custom draggable marks with auto-scaling axis

Posted: Mon Sep 06, 2010 9:03 am
by yeray
Hi Errol,

Here it is an example of how you could use two arrays, one to store the Angles and one to store the Lengths of each mark in the chart. These arrays could be updated in the DragMarks tool OnDragging event, for example.

http://www.steema.us/files/public/suppo ... _marks.zip