Skip to content

Conversation

KatChaotic
Copy link

@KatChaotic KatChaotic commented Jul 31, 2025

Description

Fixes #3063

Previously, victory-native/victory-cursor-container spread the result of useVictoryCursorContainer into VictoryContainer

const props = useVictoryZoomContainer(...)
return <VictoryContainer {...props} />;

Where the return type of useVictoryZoomContainer is

{
  props: VictoryZoomContainerMutatedProps;
  children: React.ReactElement[];
}

Because VictoryContainer received the entire props object as a prop, instead of spreading its properties, values such as width and height were undefined - leading to the svg element to render with undefined values in its viewBox, e.g.

<svg viewBox="0 0 undefined undefined" ...>

thus clipping the rendered chart and brokes the functionality of this container.

Fix based on following PR #3026

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

To the react-native/demo new screen was added for manual testing.

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run all builds, tests, and linting and all checks pass
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: b68fcf5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
victory-native Patch
victory-area Patch
victory-axis Patch
victory-bar Patch
victory-box-plot Patch
victory-brush-container Patch
victory-brush-line Patch
victory-candlestick Patch
victory-canvas Patch
victory-chart Patch
victory-core Patch
victory-create-container Patch
victory-cursor-container Patch
victory-errorbar Patch
victory-group Patch
victory-histogram Patch
victory-legend Patch
victory-line Patch
victory-pie Patch
victory-polar-axis Patch
victory-scatter Patch
victory-selection-container Patch
victory-shared-events Patch
victory-stack Patch
victory-tooltip Patch
victory-vendor Patch
victory-voronoi-container Patch
victory-voronoi Patch
victory-zoom-container Patch
victory Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
victory ✅ Ready (Inspect) Visit Preview Jul 31, 2025 10:03am

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.

VictoryCursorContainer broken
1 participant