Skip to content

Commit aa30b6d

Browse files
authored
Improve readme and samples (#210)
1 parent 5a77423 commit aa30b6d

File tree

7 files changed

+6
-42
lines changed

7 files changed

+6
-42
lines changed

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ To configure the zoom and pan plugin, you can simply add new config options to y
7777

7878
Programmatically resets the zoom to the default state. See [samples/zoom-time.html](samples/zoom-time.html) for an example.
7979

80-
## To-do Items
81-
The following features still need to be done:
82-
* Pan limits. We should be able to set limits for all axes or for a single axis, identified by ID, that are the maximum and minimum values, in data values, that can be panned to.
83-
* Zoom limits. Similar to pan limits but for zooming
84-
* Panning of category scales (the ones that use strings as labels)
85-
* Zooming of category scales (the ones that use strings as labels)
86-
8780
## Installation
8881

8982
To download a zip, go to the chartjs-plugin-zoom.js on Github

samples/pan-bar.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@
7676
},
7777
zoom: {
7878
enabled: true,
79-
mode: 'y',
80-
limits: {
81-
max: 10,
82-
min: 0.5
83-
}
79+
mode: 'y'
8480
},
8581
scales: {
8682
xAxes: [{

samples/zoom-bar-x.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@
7575
zoom: {
7676
enabled: true,
7777
mode: 'x',
78-
sensitivity: 3,
79-
limits: {
80-
max: 10,
81-
min: 0.5
82-
}
78+
sensitivity: 3
8379
},
8480
scales: {
8581
xAxes: [{

samples/zoom-bar.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@
7474
},
7575
zoom: {
7676
enabled: true,
77-
mode: 'y',
78-
limits: {
79-
max: 10,
80-
min: 0.5
81-
}
77+
mode: 'y'
8278
},
8379
scales: {
8480
xAxes: [{

samples/zoom-log.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,13 @@
178178
pan: {
179179
enabled: true,
180180
mode: 'xy',
181-
limits: {
182-
xmin: 1e-4,
183-
ymin: -50,
184-
ymax: 10
185-
},
186181
xScale0: {
187182
max: 1e4
188183
}
189184
},
190185
zoom: {
191186
enabled: true,
192-
mode: 'xy',
193-
limits: {
194-
max: 10,
195-
min: 0.5
196-
}
187+
mode: 'xy'
197188
}
198189
}
199190
});

samples/zoom-time.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@
107107
zoom: {
108108
enabled: true,
109109
drag: true,
110-
mode: 'x',
111-
limits: {
112-
max: 10,
113-
min: 0.5
114-
}
110+
mode: 'x'
115111
}
116112
}
117113
};

samples/zoom.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,7 @@
133133
},
134134
zoom: {
135135
enabled: true,
136-
mode: 'xy',
137-
limits: {
138-
max: 10,
139-
min: 0.5
140-
}
136+
mode: 'xy'
141137
},
142138
onClick: function(e) {
143139
// eslint-disable-next-line no-alert

0 commit comments

Comments
 (0)