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
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
Thanks Graham, with this event I can determine the zoom applied, it works fine.
But, you say:
"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."
How can I do this? the axes only adjust the quantity of labels to be showed (not always correctly, sometimes overlapped), they not offer the ability to change the text in the label.
I can see also, the axes adjust the number of "minorstroke" showed between two "majorstroke". Changing "Interval" property I can change the quantity of "majorstroke", but not found the manner to change the quantity of "minor strokes", Is it possible?
Thanks for the help