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
280
Change interval on zooming
posted

Hi,

Is there any option (event?) to change the interval for an axis when the zoom is changed?

I want define one big interval when the zoom is out (months) a middle interval for middle zoom (days) and a fine interval when zoom is in (days).

Thanks in advanced

Parents
  • 30692
    Verified Answer
    Offline posted

    Hi,

    Some of the axes already implement this kind behavior, and will adjust the interval as you zoom based on the available space to display labels and gridlines.

    If you want more finer grained control over the intervals used, you can listen to the WindowRectChanged event:

    http://help.infragistics.com/NetAdvantage/DV/2010.3/CLR4.0/?page=InfragisticsSL4.Controls.Charts.XamDataChart.v10.3~Infragistics.Controls.Charts.XamDataChart~WindowRectChanged_EV.html

    Which allows you to listen for when the chart's zoom level changes. The window rectangle is initially:

    new Rect(0, 0, 1, 1)

    which is the full range of the axes. The left of the window rectange is a value from 0 to 1 representing the position of the left of the visible window, the top is a value from 0 to 1 representing the position of the top of the visible window. The width and height of the window rectangle are values from 0 to 1 that represent what percentage of the full width and height of the axes are in view.

    For example:

    new Rect(.5, .5, .5, .5) whould show you just the lower righthand quadrant of the entire chartspace. For your case, you can examine the width and height of the window rectangle to know how far the user has zoomed into the chart.

    Hope this helps!

    -Graham

Reply Children