Supporting keyboard interactivity with VictoryVoronoiContainer #2801
Labels
Status: Needs More Info ✋
A question or report that needs more info to be addressable
Type: Question ❔
Asking a question or asking for help
Is there an existing issue for this?
Code of Conduct
Question
I am using VictoryVoronoiContainer to display tooltips for a stacked area chart. The labels are defined on the container component, using a VictoryTooltip as the labelComponent. I'd also like to be able to activate the tooltips via the keyboard, so I've added a transparent stacked VictoryScatter with a tabindex={0} on each of the points.
I can reliably capture onFocus/onBlur events on the scatter to know which data point was focused via the keyboard, but I can't figure out how to activate the labels on the container. I'm storing the focused point in the component's local state, which I've tried passing as a prop to to the tooltip, but the tooltip never seems aware of it, and I can't find a way to programmatically activate it with the event. I've tried setting the event both on the scatters themselves and on the chart parent.
How can I activate a voronoi tooltip from a keyboard event? Is this possible?
The text was updated successfully, but these errors were encountered: