victory icon indicating copy to clipboard operation
victory copied to clipboard

[Nextjs 15] Getting Cannot read properties of undefined (reading 'props') when using containerComponent alongside VictoryLegend

Open MuMaestro opened this issue 4 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Victory version

^37.3.6

Code Sandbox link

https://codesandbox.io/p/devbox/ecstatic-glitter-y4ccd6

Bug report

Wherever I use victory chat with `containerComponent` and a `vitoryLegend` child, with Nextjs 15+, the following error is thrown:

`Cannot read properties of undefined (reading 'props')`

When `containerComponent` or `victoryLegend` is removed from the example, the error is not thrown

Steps to reproduce

1. Go to sandbox
2. Erro is thrown rightaway

Expected behavior

Its expected that the use os containerComponents do not affect the use of legends, as the zoom is for the contents of the graph, and not the graph itself.

Actual behavior


Environment

- Device: Desktop
- OS: Linux, (Ubuntu 22 localhost, diferent distros for deployment)
- Node: 22
- Browser: Chrome
- version: 37

MuMaestro avatar Oct 20 '25 11:10 MuMaestro

For what it's worth, I am also encountering the identical issue in Next v16

princefishthrower avatar Nov 05 '25 11:11 princefishthrower

@MuMaestro - did you ever find a workaround for this?

princefishthrower avatar Nov 05 '25 11:11 princefishthrower

@MuMaestro - did you ever find a workaround for this?

Unfortunatly we decided to move along and change our lib. Currently we are using recharts, and it works perfectly

MuMaestro avatar Nov 07 '25 10:11 MuMaestro