FormidableLabs / FormidableLabs/victory

Using y0 prop inside VictoryVoronoiContainer causes inaccurate tooltip activation

Open
#2,298 6 comments 0 reactions 0 assignees View on GitHub
Issue: Accepted Type: Bug :bug:
Dominant language
TypeScript
Stars
11.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

# Bug Reports

### Checklist

- [x] I have read through the [FAQ](https://formidable.com/open-source/victory/docs/faq) and [Guides](https://formidable.com/open-source/victory/guides/)

- [x] I am using the latest version of Victory

- [x] I've searched open issues to make sure I'm not opening a duplicate issue

### The Problem

Expected: When mousing over a Voronoi container with tooltips, the tooltip should activate when the mouse is closer to a given datapoint than any other datapoint.

Actual: When using the y0 prop on a VictoryArea inside a VictoryVoronoiContainer, the tooltips are activated when the mouse is quite far away from a given datapoint and much closer to another datapoint.

### Reproduction

Repro sandbox: https://codesandbox.io/s/kind-ardinghelli-67jwh6?file=/index.js

Instructions to repro:
Expected behavior when lines 29 and 44 are commented out. Moving mouse closely underneath x,y coordinates 2,3 shows tooltip at 2,3.
Bug behavior when lines 29 and 44 are un-commented. Moving mouse closely underneath x,y coordinates 2,3 shows tooltip at 2,5.

Loom video showing repro: https://www.loom.com/share/90bfd4aeada54e2995fa62b78fe5d19e

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.