Skip to content

Conversation

@adamhari
Copy link

@adamhari adamhari commented Aug 7, 2025

Description

Victory Native's containers are not forwarding props from their respective hooks to the VictoryContainer component.

This causes the svg to get clipped because the viewBox is being set to 0 0 undefined undefined.

The native implementation spreads the object returned from the hook as-is, but the hook returns props and children as separate properties on the object, so they should be de-structured first like they are for the web implementation.

Fixes #2895
Fixes #3063

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I investigated the issue using the lead from this comment and this Expo Snack.

I did not test the native implementation using a fixture in this repo.

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

@changeset-bot
Copy link

changeset-bot bot commented Aug 7, 2025

🦋 Changeset detected

Latest commit: ff71290

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

@vercel
Copy link

vercel bot commented Aug 7, 2025

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

Name Status Preview Updated (UTC)
victory ✅ Ready (Inspect) Visit Preview Aug 7, 2025 5:59pm

@adamhari adamhari marked this pull request as ready for review August 7, 2025 16:36
@adamhari adamhari changed the title fix(native): fix voronoi container prop forwarding fix(native): fix container prop forwarding Aug 7, 2025
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.

Updating version to 37.1.1 - viewBox issue VictoryCursorContainer broken

1 participant