the zoom behavior on XAM data chart zooms in both directions on the x axis. Is there any way to hold the zoom extent on the right portion of the chart, so that the endmost datapoint remains visible and the zoom is relative to the end mos t datapoint
Hello,
Thank you for your post. I have been looking into it and I suggest you add the following code in your XamDataChart’s AcftualWindowRectChanged event:
XamZoombar horizontal = (sender as XamDataChart).HorizontalZoombar; XamZoombar vertical = (sender as XamDataChart).VerticalZoombar; Dispatcher.BeginInvoke(new Action(() => { horizontal.Range.FromScaleScroll(horizontal.Range.Scale, horizontal.Maximum); vertical.Range.FromScaleScroll(vertical.Range.Scale, vertical.Maximum); }), System.Windows.Threading.DispatcherPriority.Background, null);
Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks a lot, Stefan.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi. Does XamDataChart support two-way binding of the WindowPositionHorizontal and WindowScaleHorizontal properties? I have bound these to my view model and I see the initial values being read, but interacting with the chart never results in calls the setters on my VM property.
Thanks
I have been looking into you requirement and I suggest you try to bind WindowRect.X Proprty instead of WindowPositionHorizontal and WindowRect.Width instead of WindowScaleHorizontal.
Hope this helps you.
Thanks Stefan. Do you have any sample code for this? I need to be able to declare a read/write binding between my View and ViewModel so that I can both set and track the visible data range.
Many thanks
Stefan, there is more information about my requirement in this post:
http://blogs.infragistics.com/forums/p/66233/334830.aspx
Cheers
I will attach a sample with the functionality you want in the other thread.