Set ZoomAndPan Range on load

4 posts, 0 answers
  1. Terry
    Terry avatar
    19 posts
    Member since:
    Feb 2014

    Posted 23 Mar 2014 Link to this post

    I have a chart that loads with both PanAndZoom enabled. I am experimenting with zoom and in my constructor I am setting zoom as follows:

    myRadCartesianChart.Zoom = new Size(10, 1);

    When I do this, the pan and zoom bar is always on the far left side by default. Is there a way I can set the initial PanAndZoom so that it is set from the right? So if my X-axis is a continuous datetime, I want the panandzoom bar to initialize from the latest datetime to some earlier period of time.

    See attached images. Currently it loads as zoombarload. I want zoombardesired.png. 

    Also, in the event where there are a lot of dates along the the X-axis, there X-axis gets crowded. Is there a setting so that the interval of dates displayed are appropriately chosen and spaced to avoid crowding?

    Thanks.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 25 Mar 2014 Link to this post

    Hi Terry,

    I suggest you do not use the Zoom property, but instead use the HorizontalZoomRangeStart and HorizontalZoomRangeEnd properties of the chart. They work in relative units, from 0 to 1.

    Regards,
    Petar Marchev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Terry
    Terry avatar
    19 posts
    Member since:
    Feb 2014

    Posted 26 Mar 2014 Link to this post

    Thanks.

    how about the second part? Auto-adjusting the labels on the x-axis so when there are lots of x-items fewer are displayed automatically.

  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 27 Mar 2014 Link to this post

    Hello Terry,

    I apologize for overlooking the second question. Unfortunately, we do not have such an autimatic-step built-in funcionality, that will change the step of the axis based on its size. Perhaps you can use one of our LabelFitModes. You can set the LabelFitMode of the axis and see which mode best suits your needs. You can also set a LabelFormat to make the label shorter, or set a label template to have a two-row label, if this would fulfill your requirements. 

    Let me know if there is anything else I can help you with. 

    Regards,
    Petar Marchev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top