Best practices for tooltips on multi-layered charts #1453
-
Hi visx folks, I'm trying to add tooltip support to a multi-layered chart (i.e. an absolutely-positioned line chart that sits above a bar chart): Discussion 1161's recommended answer. Has anyone been able to create an example of working tooltips on a multi-layered chart, specifically by having a single
At the moment, 2 tooltips render on hover after placing I definitely understand that this isn't an officially supported pattern, but wanted to reach out in case anyone was able to get this multi-layered chart pattern to work with tooltips. Alternatively, any guidance on best practices towards achieve an ideal "multi-axis chart using visx" would be appreciated. Cheers, Side note: visx has been an awesome componentized viz library. Excited to see its growth! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Sorry, don't have a ton of bandwidth to dive/troubleshoot in here. I haven't seen any examples of folks getting this to work but that doesn't mean they haven't. My stance is still that I don't think dual y-axis charts are worth it. Throwing out an alternative that you might consider (that is easier to accurately interpret), which is linked tooltips. There's a sandbox demo of it under Also, glad you're enjoying visx overall, sorry this is a pain point. |
Beta Was this translation helpful? Give feedback.
-
@williaster Is there any option to make these charts different heights? I made a simple example with different chart heights and it has some issues https://codesandbox.io/p/sandbox/linked-tooltips-forked-vd9242 |
Beta Was this translation helpful? Give feedback.
Sorry, don't have a ton of bandwidth to dive/troubleshoot in here. I haven't seen any examples of folks getting this to work but that doesn't mean they haven't. My stance is still that I don't think dual y-axis charts are worth it.
Throwing out an alternative that you might consider (that is easier to accurately interpret), which is linked tooltips. There's a sandbox demo of it under
advanced usage
in thexychart
docs.Also, glad you're enjoying visx overall, sorry this is a pain point.