You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the great work.
I would like to have a voronoi container around specific line graphs in my chart component. The voronoi container should only react to that and not other line graphs in my chart.
After doing some research I figured that this case is perfect for the VictoryGroup.
My idea was simply grouping the line graphs that should be handled by the VoronoiContainer in a VictoryGroup.
However that doesn't work and I can't figure out why.
Steps to reproduce
Please check the sandbox [here](https://codesandbox.io/p/sandbox/victory-v35-0-3-works-forked-qzs33q?file=%2Fsrc%2FApp.js)
The code looks like this:
<divclassName="App">
<VictoryChart> <VictoryAxis /> <VictoryAxis dependentAxis /> {/* If I put the VictoryVoronoiContainer in the VictoryChart component a few lines above everything works fine */} <VictoryGroup containerComponent={ <VictoryVoronoiContainer labels={({ datum }) => getLabel(datum)} /> } > <VictoryLine data={secondLine} style={{ data: { stroke: "red" } }} /> <VictoryLine data={firstLine} style={{ data: { stroke: "blue" } }} /> </VictoryGroup> {/* I dont want this line to be included in the voronoi container */} <VictoryLine x={() => 5} style={{ data: { strokeWidth: 0.5 } }} /> </VictoryChart></div>
### Expected behavior
```markdown
As specified in the docs, the voronoi should work as a container element for VictoryGroup as described in the docs [here](https://commerce.nearform.com/open-source/victory/docs/victory-group#containercomponent)
Actual behavior
No label is being shown and the events don't seem to be triggered.
VictoryGroup doesn't have axes here and it won't work for your code scenario . But it works when used as standalone component. Hope this resolves your issue. Please re-open the ticket if the response is unsatisfactory.
Is there an existing issue for this?
Code of Conduct
Victory version
37.0.2
Code Sandbox link
https://codesandbox.io/p/sandbox/victory-v35-0-3-works-forked-qzs33q?file=%2Fsrc%2FApp.js
Bug report
Steps to reproduce
Actual behavior
Environment
The text was updated successfully, but these errors were encountered: