Replies: 1 comment
-
Hi @maks-io , sorry that this issue got lost in the pile! I don't know the answers to these off the top of my head, but I am going to migrate this issue to to a Q&A discussion in an attempt to surface some of these questions you had in case other people also have the same questions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(I marked all the elements in the provided checklist with 'x' so I excluded it here for the sake of clarity)
Hi,
I am trying to render multiple (!) stacked bar charts next to each other and make it possible for users to highlight certain elements (that belong together semantically) via external button clicks.
I have built a quick example on codesandbox.io.
The buttons there should highlight data of a given person across multiple days and multiple projects.
I have read through the documentation regarding externalEventMutations etc., but still cannot get my head around how to correctly implement this. What I don't quite get are the following parts:
My hierarchical structure of one given chart (I render multiple of those next to each other!) looks like this:
externalEventMutations
prop on theVictoryChart
component?className
value on the mutation (in myhighlight()
method)? Right now it cannot work in my example - see line number 56 - current value isTODO
.Note: I want my
VictoryBar
s to change their styles, which are actually 3 levels below theVictoryChart
.VictoryGroup
andVictoryStack
), or do I have to propagate events or something?events
prop defined - neither onVictoryChart
nor on any other component. DoesexternalEventMutations
require events to be defined? If yes - how, and on what component(s)?VictoryBar
s themselves to automatically highlighted all the other related Bars (in other stacks and/or charts). I guess (?) it would be sufficient to include a click event on theVictoryBar
level and to simply reuse the technique above (externalEventMutations
etc.). But I am also wondering - since I am aware of the VictorySharedEvents - if there would be a better way? I think not, because I want to highlight Bars across multiple (!) charts. Is this assumption correct?0.5
and2.5
and I would have preferred to leave the y domain to be automatically chosen. However, it is not possible to use thedomain
prop without defining bothx
andy
- is this supposed to work this way? And if so - is there any way to still tell the library to use "auto" values for the y axis?I am really looking forward to your answers - I hope you can help me there - thanks already in advance!
Beta Was this translation helpful? Give feedback.
All reactions