Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Aug 18, 2020
2 parents d121332 + ec3eaa8 commit 9fdf214
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ChartJSEnhancements.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ export default class ChartJSEnhancements {
let j = 0;
for (let i = 0; i < this.datasets.length; ++i) {
let dataset = this.datasets[i];
for (let index = 0; index < this.datasets.length; ++index) {
let datum = this.datasets[index];
for (let index = 0; index < dataset.data.length; ++index) {
let datum = dataset.data[index];
const is_inside = datum.x <= x_min_max_data.max && datum.x >= x_min_max_data.min &&
datum.y <= y_min_max_data[dataset.yAxisID].max && datum.y >= y_min_max_data[dataset.yAxisID].min;
datum.index = index;
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ mouse_buttons = {
*/
```

### Default behavior

- Click, hold and drag on the plot area to create a select region;
- Double click on canvas to reset zoom and pan;
- Use the mouse wheel to zoom;
- Hold shift and drag the chart to pan.

### Methods:

```javascript
Expand All @@ -46,3 +53,7 @@ resetZoom(update, update_options); //boolean that says if the chart is going to
removeEventListeners(); //removes all event listeners added by this plugin
destroy(); //remove all external references
```

### Limitations

- For now, this plugin only works for linear x axis type.
Loading

0 comments on commit 9fdf214

Please sign in to comment.