Replies: 3 comments
-
Hey @ianoc90 👋 thanks for checking out visx. Sorry this isn't super straight forward. But here are a couple options for you. The first is to use the An alternative would be the |
Beta Was this translation helpful? Give feedback.
-
Amazing.. thanks @williaster. Went with option 1 & I think that seemed to do the job for now. |
Beta Was this translation helpful? Give feedback.
-
Hi @williaster, thank you for your help! Is it possible to create an interactive primitive within Say, have I was looking for an API in I feel like I am missing something, could you please push me towards the right direction? 😰 |
Beta Was this translation helpful? Give feedback.
-
Having trouble detecting hover events on a single bar for a
<BarSeries />
component.Use Case
I want to change the colour of a bar when hovering over a bar chart item.
Approach
There doesn't seem to be an
onPointerOver
or similar in the barseries docs so I've tried a couple of approaches:onPointerMove
Having even a simple
onPointerMove
event seems to degrade the performance of the chart significantly, (at least within codesandbox), and it makes it tricky to nail down when the pointer exits a bar chart.pure css
(Using emotion styles in the example). Something like:
Sets the correct color on the bar originally, but there is a
<rect>
that draws over the bars that doesn't allow pointer events on the bar.Setting pointer-events to
none
will break the tooltip here as well.Code sandbox link
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions