What I'd like to be able to do with the xamDataChart is highlight a section within the currently visible region of the chart and NOT zoom to that region automatically.
The goal is to allow the user to highlight a section and create, say, a vertical infostrip using the coordinates of the data.
For instance, the chart shows an scatterlineseries of sales over time. I'd like the user to be able to highlight an area where the series dips down or spikes or is flat for a time and then create an infostrip with an explanation (e.g., Spike in sales due to reason X).
It doesn't seem like I have the ability to just highlight via the mouse click and drag without zooming.
Any ideas how to accomplish this?
Thanks,
Matt
I think the solution is to attach a Behavior to the XamDataChart and then handle the PreviewMouseLeftButtonDown, MouseMove and MouseLeftButtonUp events.
Along with that, there's got to be some sort of "indicator" that I'm wanting to draw the region rather than zoom.
I can check for a Keyboard.Modifier such as the Ctrl key being pressed on the PreviewMouseLeftButtonDown event and then switch into "draw a region" mode if that's pressed.
Then to draw the region I can grab the geometry during the three events and make a Path object that is drawn in some highlighting color.
Not sure how to create an InfoStrip on the fly though. All the examples look like they are static things.
Hello,
Thank you for your post.
I have been looking into it. The only way to bind the InfoStrips is by using StaticResource, because they doesn't inherit from the VisualTree's DataContext. You can take a look at the following forum thread: http://ko.infragistics.com/community/forums/t/77095.aspx , It will be great if you could share a sample project that illustrates the behavior.
Please do not hesitate to let me know if you have any further questions on this matter.