Skip to content

Commit

Permalink
Merge branch 'chartjs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gopal-panigrahi authored Nov 16, 2024
2 parents 990188d + 58d8a3e commit 9ac8d80
Show file tree
Hide file tree
Showing 11 changed files with 919 additions and 346 deletions.
16 changes: 15 additions & 1 deletion docs/guide/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Returns the current zoom level. If this is the same as the chart's initial scal

If the chart has been panned but not zoomed, this method will still return `1.0`.

### `chart.getInitialScaleBounds(): Record<string, {min: number, max: number}>`
### `chart.getInitialScaleBounds(): Record<string, {min: number | undefined, max: number | undefined}>`

Returns the initial scale bounds of each scale before any zooming or panning took place. This is returned in the format of an object, e.g.

Expand All @@ -38,6 +38,20 @@ Returns the initial scale bounds of each scale before any zooming or panning too
}
```

### `chart.getZoomedScaleBounds(): Record<string, {min: number, max: number}>`

Returns the updated scale bounds of each scale after any zooming or panning took place. This is returned in the format of an object, e.g.

```json
{
x: {min: 25, max: 75},
y1: {min: 60, max: 90},
y2: undefined
}
```

Scale IDs that have not been zoomed will be `undefined` within the returned object.

### `chart.isZoomedOrPanned(): boolean`

Returns whether the chart has been zoomed or panned - i.e. whether the initial scale of any axis is different to the one used currently.
Expand Down
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const istanbul = require('rollup-plugin-istanbul');
const json = require('@rollup/plugin-json');
const resolve = require('rollup-plugin-node-resolve');
const resolve = require('@rollup/plugin-node-resolve');
const builds = require('./rollup.config');
const yargs = require('yargs');
const env = process.env.NODE_ENV;
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = function(karma) {

client: {
jasmine: {
failFast: !!karma.autoWatch
stopOnSpecFailure: !!karma.autoWatch
}
},

Expand Down
Loading

0 comments on commit 9ac8d80

Please sign in to comment.