Page 1 of 1

Selecting a range of points with the mouse

Posted: Thu Apr 05, 2007 11:09 am
by 9337510
I am using a chart with tpointseries - what I would like to do is be able to select a range of points by dragging and then move then into another series. {D2007, Chart pro}

I have several groups of data defined which are plotted as separate series. I need to be able to let the user change which groups the data belong to graphically.

I can do it point by point using a Chartlistbox

if series <> form2.ChartListBox1.SelectedSeries then
begin
TempX:= series.XValue[ValueIndex];
TempY:= Series.YValue[ValueIndex];
form2.ChartListBox1.SelectedSeries.AddXY(tempX, TempY);
Series.Delete(ValueIndex);
end;

Posted: Thu Apr 05, 2007 11:26 am
by narcis
Hi Richard,

You could try doing something as the options discussed in this thread. It is a TeeChart for .NET topic but the same principles are applicable to TeeChart Pro VCL.

Posted: Thu Apr 05, 2007 3:02 pm
by 9337510
Thanks for that - I have got it working now - it took a while to realise that != is <> in delphi!

Posted: Thu Apr 05, 2007 3:05 pm
by narcis
Hi Richard,

You're welcome. I'm glad to hear that helped.

In case you have problems translating C# code to Delphi you can try using Borland's Babel Client.