Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkel committed Sep 4, 2023
1 parent 176780e commit c86f8f1
Showing 1 changed file with 15 additions and 1 deletion.
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

0 comments on commit c86f8f1

Please sign in to comment.