Repository navigation
Conversation
Make zoom public on CartesianChart and the core chart: the zoom, zoomRange and onZoomRangeChange properties, the enterZoomMode, exitZoomMode and resetZoom ref methods, the zoom labels in i18nStrings, and zoom finders in the test utils.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #288 +/- ##
==========================================
+ Coverage 93.99% 94.04% +0.05%
==========================================
Files 64 64
Lines 3529 3578 +49
Branches 1131 1139 +8
==========================================
+ Hits 3317 3365 +48
- Misses 212 213 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The public zoom method can lock chart interaction after zoom is disabled, and completing or cancelling keyboard selection with hidden zoom controls fails to restore focus to a usable element.
2 open issues
What changed in this PR
Makes the existing Cartesian chart zoom functionality public, completing the work introduced in #275, #278, and #286.
Changes:
- Exposes zoom configuration, controlled ranges, change events, and imperative methods through chart APIs.
- Adds customizable zoom labels and test utilities for zoom controls and the cursor.
- Updates tests, API snapshots, and development pages to use the public interfaces.
| File | Description |
|---|---|
test/functional/cartesian-chart.test.ts |
Uses the public reset-button selector. |
src/test-utils/dom/internal/core.ts |
Adds core zoom-control and cursor finders. |
src/test-utils/dom/cartesian-chart/index.ts |
Adds Cartesian zoom-control and cursor finders. |
src/core/internal-interfaces.ts |
Removes the internal-only zoom interfaces. |
src/core/interfaces.ts |
Exposes zoom properties, methods, types, and labels. |
src/core/i18n-utils.tsx |
Connects consumer-provided zoom labels and announcements. |
src/core/components/core-zoom-controls.tsx |
Limits the reset-button selector to its visible state. |
src/core/chart-core.tsx |
Uses the promoted core zoom types. |
src/core/chart-api/index.tsx |
Exposes imperative zoom methods. |
src/core/chart-api/chart-extra-zoom.ts |
Uses the public zoom-range type. |
src/core/chart-api/chart-extra-context.tsx |
Uses public zoom event and range types. |
src/core/__tests__/common.tsx |
Replaces internal zoom casts and custom finders. |
src/core/__tests__/chart-core-zoom.test.tsx |
Uses the public zoom-range type. |
src/core/__tests__/chart-core-rendering.test.tsx |
Checks the exposed zoom methods. |
src/cartesian-chart/interfaces.ts |
Documents and exposes the Cartesian zoom API. |
src/cartesian-chart/chart-cartesian-internal.tsx |
Forwards ref methods to the core zoom API. |
src/cartesian-chart/__tests__/cartesian-chart-zoom.test.tsx |
Tests ref methods and custom labels. |
src/__tests__/__snapshots__/documenter.test.ts.snap |
Records the expanded API documentation. |
pages/common/page-settings.tsx |
Removes internal zoom type intersections. |
pages/03-core/simple-zooming.page.tsx |
Uses the core component without a zoom-specific cast. |
Review effort: Balanced
enterZoomMode now does nothing while zoom is disabled. Turning zoom off kept the cursor stops, so the call still entered zoom mode and locked the pointer. When the built-in zoom controls are hidden, the focus goes back to the element that entered zoom mode once a range is selected or zoom mode is cancelled, instead of dropping to the page body.
srungta08
marked this pull request as ready for review
November 18, 2026 13:30
srungta08
requested review from
amanabiy and
pan-kot
and removed request for
a team and
amanabiy
November 18, 2026 13:30
The zoomRange docs now say up front that the property is optional, and that the chart keeps track of the zoomed range when it isn't set.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Makes zoom public on the cartesian chart. This is the last step towards built-in zoom, and the first one that changes the public API. The zoom properties added in #275, #278 and #286 move out of the internal interfaces into CartesianChartProps and CoreChartProps.
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.