Now I have prepared an example which shows several problems I do have with the zoom .Case 1: Zoomed area does not exactly match the actual mouse zoomed area
To reproduce start the attached example and press button "Test Zoom 1 Series" and zoom with the mouse the following range:
now the resulting plot starts with Y=800 instead with Y=900:
- the problem exists also when Series.InflateMargins=false
- This problem exists only if the zoom starts in the "extra margin" Y area of the plot (that means start zoom at Y >1100)
=> how can I avoid this behaviour ?
When Series.InflateMargins=true, a problem exists when zoom is applied to the lower Inflated Margin of the Y range:
Apply a mouse zoom like:
=> the resulting plot starts at Y= 0 instead of Y=-90:Case 2: Similar to Case 1 - but now with Logarithmic Scale
To reproduce the problem, restart the project and press button "LogarithmicScale"
Now try the same like Case 1 and zoom starting within the extra margin area => now an additional problem occures:
oChart.Axis(StandardAxis.PrimaryY).PagingView.Enabled; returns false instead of true !!
(to see this, set a break at "// Case 2: Set break here and check bolYZoomActive" in frmMain.cs-On_DataZoom-EndDrag
=> when the zoom starts somewhere in the middle and not within the extra margin area, it works ok though.Case 3: How to set zoom for logarithmic 2nd Y axis properly ?
Unfortunatly, I could not get the zoom-setting of the Y2-axis working properly.
Please start the project and press button "LogarithmicScale", then zoom like:
=> the left Y-axis looks ok, but the right Y2-axis is not scaled properly - probably my approach is wrong:
// compute the new range based on factor
NRange1DD axisContentRange = axis.ViewRange;
double rangeLength = axisContentRange.End - axisContentRange.Begin;
double begin = axisContentRange.Begin + beginFactor * rangeLength;
double end = axisContentRange.Begin + endFactor * rangeLength;
=> please see On_DataZoom_EndDrag-method of the attached example code.
Thanks very much for your help !