chartjs / chartjs-plugin-zoom

Zoom and pan plugin for Chart.js
MIT License
579 stars 322 forks source link

Add a function for getting zoom range #780

Open joshkel opened 10 months ago

joshkel commented 10 months ago

This adds a function, getZoomedScaleBounds, to act as a counterpart to getInitialScaleBounds (getting the scale ranges after zoom rather than before) and zoomScale (reading, rather than writing, each scale's zoom).

A question for code review: Is it okay to return the internal object directly, or should I return a new object to ensure that it can't be mutated?