Skip to content

feat: Dual y-axis support in cartesian charts#198

Closed
pan-kot wants to merge 2 commits intomainfrom
feat/cartesian-dual-axis
Closed

feat: Dual y-axis support in cartesian charts#198
pan-kot wants to merge 2 commits intomainfrom
feat/cartesian-dual-axis

Conversation

@pan-kot
Copy link
Copy Markdown
Member

@pan-kot pan-kot commented Mar 30, 2026

Description

A clone of #182, including:

  1. Fixed merge conflict with main
  2. Fixed axisId propagation to legend (the prop was not correctly passed and failed new unit tests)

API: EWhLAhOTR7dr

How has this been tested?

  • New unit tests (only props propagation from cartesian chart and new test utils are tested, the rest was already covered when the dual axis was introduced to core);
  • New test page covered by VR tests.
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Anthony Benites and others added 2 commits March 30, 2026 12:55
Allow CartesianChart to render two Y axes by passing a tuple to the
yAxis prop. The second axis is automatically set to opposite (right side).
Series can reference the secondary axis with yAxis: 1.

Changes:
- Add yAxis?: number to BaseCartesianSeriesOptions
- Accept yAxis as single or [primary, secondary] tuple in CartesianChartProps
- Pass yAxis through all series transform functions
- Auto-set opposite: true on the secondary axis
- Add unit tests and demo page
@pan-kot pan-kot force-pushed the feat/cartesian-dual-axis branch from 1d3c530 to 4cb8cbc Compare March 30, 2026 10:56
@pan-kot pan-kot changed the title Feat/cartesian dual axis feat: Dual y-axis support in cartesian charts Mar 30, 2026
@pan-kot pan-kot requested a review from gethinwebster March 30, 2026 12:02
@pan-kot pan-kot marked this pull request as ready for review March 30, 2026 12:02
@pan-kot pan-kot requested a review from a team as a code owner March 30, 2026 12:02
@pan-kot
Copy link
Copy Markdown
Member Author

pan-kot commented Mar 30, 2026

Closed in favour of the original PR which now includes all fixes, too: #182

@pan-kot pan-kot closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant