-
|
Hi, I was building a simple BarStack, but when i tried to add some features i get stuck. So the bar stack is the following: As a first iteration it's perfectly fine and do it's job. But after failing to implement some additional features, i feel i was missing something. 1)° First, i wanted to provide a simple Enregistrement.de.l.ecran.2022-10-26.a.11.36.55.movIt work but it's not really what i expected to do. Hover highlight specific BarSeries in the stack when i originally tried to highlight the whole " <rect class="visx-bar" ....></rect>are part of a single "Bar" with an 2)° But the real effect i really like to provide i more than just hover. in fact i wish i could provide the same as this bump chart from nivo. Having a whole Have you already build something like this using visx ? Have you some examples using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hey @LoiKos! I'm sure you've already found a solution for this, but wanted to share an example of how I solved this in case it's helpful for anyone else: you can see everything in this CodeSandbox. When passing data to your |
Beta Was this translation helpful? Give feedback.

Hey @LoiKos!
I'm sure you've already found a solution for this, but wanted to share an example of how I solved this in case it's helpful for anyone else: you can see everything in this CodeSandbox.
When passing data to your
BarStack, it returns an array ofbarStacks. EachbarStackcontains the info for a single series, which in this case can be found inbarStack.bars. These data points will usually correspond to your original data, so the data at the0index inbarsfor a given series will match the values indata[0], which means you can use the index of a given bar to pass a selected index to your tooltipData, and then change the styling.