@@ -41,21 +41,6 @@ The following options are available:
41
41
42
42
{{"demo": "ZoomOptionsNoSnap.js", "hideToolbar": true, "bg": "playground"}}
43
43
44
- ## Controlled zoom
45
-
46
- You can control the zoom state by setting the ` zoom ` and ` onZoomChange ` props.
47
- This way, you can control the zoom state from outside the chart.
48
-
49
- The ` onZoomChange ` prop is a function that receives the new zoom state.
50
-
51
- While the ` zoom ` prop is an array of objects that define the zoom state for each axis with zoom enabled.
52
-
53
- - ** axisId** : The id of the axis to control.
54
- - ** start** : The starting percentage of the axis range.
55
- - ** end** : The ending percentage of the zoom range.
56
-
57
- {{"demo": "ZoomControlled.js"}}
58
-
59
44
## Zoom filtering
60
45
61
46
You can make the zoom of an axis affect one or more axes extremums by setting the ` zoom.filterMode ` prop on the axis config.
@@ -66,3 +51,20 @@ You can make the zoom of an axis affect one or more axes extremums by setting th
66
51
See how the secondary axis adapts to the visible part of the primary axis in the following example.
67
52
68
53
{{"demo": "ZoomFilterMode.js"}}
54
+
55
+ ## External zoom management
56
+
57
+ You can manage the zoom state by two means:
58
+
59
+ - By defining an initial state with the ` initialZoom ` prop.
60
+ - By imperatively set a zoom value with the ` setZoomData ` method of the public api.
61
+
62
+ In addition, the ` onZoomChange ` prop is a function that receives the new zoom state.
63
+
64
+ The ` zoom ` state is an array of objects that define the zoom state for each axis with zoom enabled.
65
+
66
+ - ** axisId** : The id of the axis to control.
67
+ - ** start** : The starting percentage of the axis range.
68
+ - ** end** : The ending percentage of the zoom range.
69
+
70
+ {{"demo": "ZoomControlled.js"}}
0 commit comments