This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Jason! My users need to draw a straight line on a chart and get information on all the points the line covers. Is this possible with the WPF Elements charts? |
|
|
Hello Leah Yes, it will be possible for you to implement this functionality for the Chart control. Essentially you just need to create a custom foreground element. You generally do this by creating a class that implements Canvas. When the class has loaded, it should look through the visual tree to find the Chart control (Or you could add a property to set it manually). Then hook into the ChartMouse... events so that you can get mouse events that include the logical plot position of the mouse. Within the event handlers you can add a line to the canvas and manipulate it based on the mouse events. Then as the line is drawn, or when the mouse is released, you can look through the data of the series that the line covers. Add an instance of this class to the Chart.ForegroundElements collection for it to take action. -Jason Fauchelle |
|