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
Copy file name to clipboardExpand all lines: docs/guide/developers.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,18 +65,18 @@ Returns whether the user is currently in the middle of a drag operation or pan o
65
65
You can extend chartjs-plugin-zoom with support for [custom scales](https://www.chartjs.org/docs/latest/developers/axes.html) by using the zoom plugin's `zoomFunctions`, `zoomRectFunctions`, and `panFunctions` members. These objects are indexed by scale types (scales' `id` members) and give optional handlers for zoom and pan functionality.
66
66
67
67
```js
68
-
import {Scale} from'chart.js';
69
-
importzoomPluginfrom'chartjs-plugin-zoom';
68
+
import {Scale} from'chart.js'
69
+
importzoomPluginfrom'chartjs-plugin-zoom'
70
70
71
71
classMyScaleextendsScale {
72
72
/* extensions ... */
73
73
}
74
-
MyScale.id='myScale';
75
-
MyScale.defaults= defaultConfigObject;
74
+
MyScale.id='myScale'
75
+
MyScale.defaults= defaultConfigObject
76
76
77
-
zoomPlugin.zoomFunctions.myScale= (scale, zoom, center, limits) =>false;
78
-
zoomPlugin.zoomRectFunctions.myScale= (scale, from, to, limits) =>false;
0 commit comments