Update Graph After Zoom

Oystein Bjorke fa 10 anys 0
This discussion was imported from CodePlex

kurtisharms wrote at 2013-01-29 07:54:

I am drawing functions using my own custom function generator by simply creating a new LineSeries of ~120 points and then plotting that between -10 and 10 to start with using Oxyplot's Windows 8 control. The use of my own custom function rather than a FunctionSeries is necessary because the function input has many variables and other oddities. 

 

What I would like to do is the following:

1) Detect the end of a zooming event and bind an updateGraph() function to this. I cannot find this type of event. The mouse events don't appear to do the trick, as they are either continuous and generate too many events (ie. PointerWheelChanged) or don't work as I expected (ie. ManipulationCompleted). 

2) Having detected the zooming event, updateGraph() updates the graph by creating a new LineSeries from my function that spans the new min to max displayed on the graph. I haven't successfully been able to find the new min/max displayed on the graph.

 

Any help would be greatly appreciated and thank you in advance!


objo wrote at 2013-02-07 22:37:

Can the AxisChanged event help? This will be raised after the axes have been changed (zoom or pan).
The ActualMaximum and ActualMinimum properties of the axes should also be set at this point.