Hi,
I'm going to draw a rectangle on the chart to select a specific area of the chart and then get the data value of the start and end point and pass into another method. I can now get the coordination of start point and end point, but I don't know how to get the data value by using those point.
Could you please give me some sample or points of how to get the data value from a point coordination?
Thanks
Kevin
Hi Kevin,
I'm not sure how you went about getting to this point but I'm curious if you've checked out the ChartInteraction samples? The WinChart has an AddMouseDownTool(IInteractionTool) method and there are several examples in the Chart samples that show the interaction tools in principle. That might simplify how to get to where you are currently... but hard to say without more information about how you got to this point.
Back to your main question... the value is really going to come from a primitive at that point which if you already have you can just query the primitive for it's value once you cast it into the type you were looking for in the first place. Did you already have a primitive when you spit back your coordinates of the start value?
Hello Kevin,
If I understand well your scenario with rectangle, coordinates, composite chart and looking at your previous forum threads http://es.infragistics.com/community/forums/p/85416/427934.aspx#427934 maybe one possible solution you could find in attached sample and video file.
Let me know if you think that I misunderstood your requirements or if you have any questions.
Regards
Here is the sample
Hi Georgi,
Thanks for your sample. Actually what I want to achieve is I want to be able to draw a rectangle on a composite chart to select a range of values (both x-axis and y-axis) and then pass into another method to proceed. So far what I can do is to get the location(e.Location) in the mouse event, but this location (X,Y) only gives me the coordination of the mouse pointer. My question is how can I use this location to get the corresponding data values (label) on the x and y axis.
Thanks for the feedback. If you have any further questions, feel free to write us