Hi,
I have several series in teeChart. I'd like the user to draw a rect bound to select all the points fall into that bound. Is there any easy way I can do that?
Thanks.
Stanley
Select Points in teeChart?
Hi, Stanley.
Let's say you already defined the bounding rectangle: either by using chart OnMouseDown, onMouseMove and OnMouseUp events or by other methods. Now you have to cycle through all series points and if specific point is in defined bounding rectangle (you can use PtInRect method to test this), add series index and point index to the list of highligted points. Finally, you can use this information to change the color of selected points or alternatively, use series OnGetPointerStyle event to change the style of specific series points.
Let's say you already defined the bounding rectangle: either by using chart OnMouseDown, onMouseMove and OnMouseUp events or by other methods. Now you have to cycle through all series points and if specific point is in defined bounding rectangle (you can use PtInRect method to test this), add series index and point index to the list of highligted points. Finally, you can use this information to change the color of selected points or alternatively, use series OnGetPointerStyle event to change the style of specific series points.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Coordiates Conversion
It's almost working.
I have the rect from moue down/up. I have the points in series. But I cann't convert the x, y to screen coordiates.
Please advise.
Thanks.
I have the rect from moue down/up. I have the points in series. But I cann't convert the x, y to screen coordiates.
Please advise.
Thanks.
Yes, got it
Yes, I found the same function. Life is good again.