I have plot one serie in a chart and want to get all the points under one region defined by a rectangle.
Can you help me?
how can i capture points in a selected region of the chart?
Hi queija,
Please, take a look at the code that Narcís posted here. It's a NET example but you shouldn't find many problems translating it.
In a few words, having the Rect and the series, you should look around the series points and see if they are in the rect or not. Basically, the most important functions you should use are, first, to retrieve each point position in pixels:
And having each point and the rect, you could use a delphi function (this is not present in NET)
Please, take a look at the code that Narcís posted here. It's a NET example but you shouldn't find many problems translating it.
In a few words, having the Rect and the series, you should look around the series points and see if they are in the rect or not. Basically, the most important functions you should use are, first, to retrieve each point position in pixels:
Code: Select all
Series1.CalcXPos(Index)
Series1.CalcYPos(Index)
Code: Select all
function PtInRect(const Rect: TRect; const P: TPoint): Boolean;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |