Custom draggable marks with auto-scaling axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Errol
Newbie
Newbie
Posts: 10
Joined: Mon Oct 15, 2007 12:00 am

Custom draggable marks with auto-scaling axis

Post by Errol » Fri Sep 03, 2010 7:18 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Custom draggable marks with auto-scaling axis

Post by Yeray » Mon Sep 06, 2010 9:03 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply