Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
how to zoom on a chart with its rightmost datapoint still visible
posted

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

Parents
No Data
Reply
  • 138253
    Offline posted

    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.

Children