This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello We want to reset the zoom state of our graph after each time we zoom in. So when we zoom in again the e.XZoom and e.YZoom will not be based on the earlier zoom state. The reason why we want to do this is that we use our own interpolation method and thus retrieve new, more accurate data, for each data series. How can we achieve this? //Nicklas |
|
|
Hello Nicklas Resetting the zoom can be done by setting the ActualMinimum/ActualMaximum properties of every axis to be the Minimum/Maximum property values. A quick way of doing this is to trigger the ResetZoom command in code like this:
This is the only way for the zooming event arguments to reset because they are directly based on the percentage of the viewport within the full axis range. I'm not sure if this is exactly what you want though. When you retrieve the more accurate data, do you retrieve the full minimum to maximum range of the data and then replace the items source with that? If so, I would have thought that the zoom values in the event arguments would still help getting the appropriate level of interpolation without needing to reset it each time, and the viewport of the chart shouldn't need to change. So keep in mind that in order to reset the zoom values of the event args, the viewport is reset back to 100% zoom. If this is not what you want, rather than resetting the zoom, you may need to adjust how you use the zoom values to get the appropriate interpolation level, or calculate and use the difference between the zoom values across each zoom operation. Let me know if you have further questions to help you implement this. -Jason Fauchelle |
|