Determine bar height in a tooltip's custom cursor #3777
Unanswered
jannikbertram
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @jannikbertram - we just merged some changes to add an activeBar on hover. If you can wait a few weeks or so that will be out and should solve your case without any extra work |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to build a bar chart with custom styling on hover. For that I use a Tooltip with a custom component as cursor:
The tooltip using the cursor looks like this (cursor props like
height
, andpoints
are automatically passed to the custom cursor):For a bar chart with just one bar, this works fine. However, with a more evenly distributed chart, the height of the each bar is not computed correctly
Is there a way to compute the correct
y
coordinate for a bar given the chart'sheight
, the bar'sdataValue
, and themaxDataValue
?Any help would be appreciated! Cheers
注意:不是用 https://recharts.github.io/recharts-issue-helper 创建的 issue 会被立即关闭。
Beta Was this translation helpful? Give feedback.
All reactions