You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `modifierKey` | `'ctrl'`\|`'alt'`\|`'shift'`\|`'meta'` | `null` | Modifier key required for panning with mouse
35
38
| `overScaleMode` | `'x'`\|`'y'`\|`'xy'` | `undefined` | Which of the enabled panning directions should only be available when the mouse cursor is over a scale for that axis
36
-
| `rangeMin` | `{x: any, y: any}` | `undefined` | Minimum pan range allowed for the axes. Value type depends on the scale type
37
-
| `rangeMax` | `{x: any, y: any}` | `undefined` | Maximum pan range allowed for the axes. Value type depends on the scale type
38
39
| `speed` | `number` | `20` | Factor for pan velocity on **category scale**
39
40
| `threshold` | `number` | `10` | Mimimal pan distance required before actually applying pan
| `overScaleMode` | `'x'`\|`'y'`\|`'xy'` | `undefined` | Which of the enabled zooming directions should only be available when the mouse cursor is over a scale for that axis
59
-
| `rangeMin` | `{x: any, y: any}` | `undefined` | Minimum zoom range allowed for the axes. Value type depends on the scale type
60
-
| `rangeMax` | `{x: any, y: any}` | `undefined` | Maximum zoom range allowed for the axes. Value type depends on the scale type
61
60
| `speed` | `number` | `0.1` | Factor of zoom speed via mouse wheel.
| `wheelModifierKey` | `'ctrl'`\|`'alt'`\|`'shift'`\|`'meta'` | `null` | Modifier key required for zooming with mouse
@@ -69,3 +68,22 @@ const chart = new Chart('id', {
69
68
| `onZoom` | `{chart}` | Called while the chart is being zoomed
70
69
| `onZoomComplete` | `{chart}` | Called once zooming is completed
71
70
| `onZoomRejected` | `{chart,event}` | Called when zoom is rejected due to missing modifier key. `event` is the a [hammer event](https://hammerjs.github.io/api#event-object) that failed
71
+
72
+
## Limits
73
+
74
+
Limits options define the limits per axis for pan and zoom.
75
+
76
+
### Limit options
77
+
78
+
| Name | Type | Description
79
+
| ---- | -----| -----------
80
+
| `x` | [`ScaleLimits`](#scale-limits) | Limits for x-axis
81
+
| `y` | [`ScaleLimits`](#scale-limits) | Limits for y-axis
82
+
83
+
#### Scale Limits
84
+
85
+
| Name | Type | Description
86
+
| ---- | -----| -----------
87
+
| `min` | `number` | Minimun allowed value for scale.min
88
+
| `max` | `number` | Maximum allowed value for scale.max
89
+
| `minRange` | `number` | Minimum allowed range (max - min). This defines the max zoom level.
0 commit comments