I want to be able to set the min and max values for both axis on a XamDataChart and zoom into those values (without redrawing the chart). I do not know if it is even possible.
I was able to get the information from the ViewPort when I do a zoom to selection, but I could not reverse the process. Meaning that if I want to zoom into a specific area of the chart by selecting it with the mouse I was able. Now I want to set the values in my app and apply zoom to them. This is what I still could resolve.
Could you help me with this issue?
Only numeric axes have ActualMinimumValue and ActualMaximumValue properties that force the chart to render plot area within specified axis range. So unless you are using Scatter Series (which use two numeric axis) then you cannot be setting these axes properties. Also, setting these properties will prevent end-user from zooming out outside of the specified axes range. Instead, I recommend you using the following properties to zoom the chart to specified region of plot area:
DataChart.WindowPositionVerticalDataChart.WindowPositionHorizontal DataChart.WindowScaleVertical DataChart.WindowScaleHorizontal
Or just single property which is equivalent to above properties
Note that these chart's properties will work with any type of axes/series combination.
The Chart Navigation sample provides an example (in code-behind) how to use above properties. In addition you can find more information about these properties in this help topic.
Let me know if you have question about chart zooming.
Do you have other questions about zooming the chart control in code-behind?
It has been a while since your last post and my answer and I would like know if you have more questions about Data Chart?