Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Victory Container events don't work with a non-standalone chart #539

Closed
jamieparkinson opened this issue Mar 23, 2017 · 9 comments
Closed
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@jamieparkinson
Copy link

jamieparkinson commented Mar 23, 2017

The active state doesn't get 'switched on' consistently when using VictoryVoronoiContainer for a VictoryChart with standalone={false} like this: https://jsfiddle.net/pzkofefm/2/. It seems like it only registers when the cursor is hovering over the elements in the chart - an issue I never had when using the old VictoryVoronoi.

Have I missed something in terms of other props that need to be set?

@boygirl
Copy link
Contributor

boygirl commented Mar 23, 2017

@jamieparkinson You're right, this is not operating as expected. I'll look into it today.

@boygirl boygirl added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Mar 23, 2017
@boygirl boygirl assigned boygirl and unassigned boygirl Mar 23, 2017
@chrisbolin
Copy link
Contributor

chrisbolin commented Mar 26, 2017

hmm, I saw something similar to this while working on FormidableLabs/victory-chart#453 and trying/breaking things to experiment. I'll take a look, too

@chrisbolin
Copy link
Contributor

it seems like it fails if you simply wrap the <VictoryChart> in an svg, regardless of what the standalone prop is

@chrisbolin
Copy link
Contributor

Ahh, I think I found the problem @boygirl. When the containerComponent prop is added, standalone seems to be overridden: even with standalone=false VictoryChart still renders a wrapping svg, so you have two: one in user-land (that's why it was standalone=false) and one added by the container component.

@chrisbolin
Copy link
Contributor

chrisbolin commented Mar 27, 2017

I added some logging to VictoryZoomContainer and can confirm that the container's defaultEvents eventHandlers (for target "parent") don't fire as they should...
mar-27-2017 15-04-12

@jamieparkinson
Copy link
Author

@chrisbolin nice bug-hunting! I am working my way into the victory codebase so I can try to help with stuff like this myself 🙂

@chrisbolin chrisbolin changed the title Possible issue using VictoryVoronoiContainer with a non-standalone chart Victory Container events don't work with a non-standalone chart Apr 22, 2017
@chrisbolin
Copy link
Contributor

This affects all "evented" containers (VictoryVoronoiContainer, VictoryBrushContainer, VictorySelectionContainer, and VictoryZoomContainer) so I updated the title

@jellyninjadev
Copy link

Any updates on this one? Still having issues on Victory Group Cursor wrapped with Svg

@boygirl
Copy link
Contributor

boygirl commented May 17, 2019

This one is a wontfix. Evented containers only work with standalone={true}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior
Projects
None yet
Development

No branches or pull requests

4 participants