How to keep grid squares on grid constant on Zooming?

4 posts, 0 answers
  1. Coder
    Coder avatar
    8 posts
    Member since:
    Jan 2014

    Posted 18 Feb 2014 Link to this post

    Hi,

    I have a grid designed as shown in the first image when my Zoom is at say, Zoom="16, 5":

    I have implemented a zoom button that when clicked, will increase the zoom width and height in increments of 6 and 1 respectively.

    When I increment to  say, "28, 7" the grid now looks like that in the second image.

    Is there any way for me to force the grid to maintain the same height/size proportion when zomming?

    Thanks.
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 21 Feb 2014 Link to this post

    Hello,

    Thank you for contacting us on that matter. I can understand your scenario.

    However, the RadCartesianChart is designed so that the grid lines always snap to the ticks of the axes. Since this is core functionality of the charting component there is no way to change it.


    Regards,
    Martin
    Telerik
  3. UI for WPF is Visual Studio 2017 Ready
  4. Coder
    Coder avatar
    8 posts
    Member since:
    Jan 2014

    Posted 21 Feb 2014 in reply to Martin Link to this post

    Hi,

    well, is there a way, using Behaviors to intercept and recalculate the grid spacing as the zoom is changed, so as to keep the x to y grid widths fixed in proportion at least?

    If I can't have the same size squares, can I  have them at least as squares instead of rectangular?

    The attached photos show two extreme cases befor and after zooming. This is simply not acceptable. Is there a work around?
  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 26 Feb 2014 Link to this post

    Hi Coder,

    Could you please take a look at the attached screenshot and draw grid line everywhere you think there must be one? This will help us better understand your requirement.

    Also please note that the grid lines of the ChartView snap to the ticks of the axes. The goal of this behavior is to produce better visual representation of the lines.

    Regards,
    Martin
    Telerik
Back to Top