Skip to content

Using y0 prop inside VictoryVoronoiContainer causes inaccurate tooltip activation #2298

Open
@andersonjc

Description

@andersonjc

Bug Reports

Checklist

  • I have read through the FAQ and Guides

  • I am using the latest version of Victory

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: AcceptedThe submitted issue has been confirmed by the Victory core teamType: Bug 🐛Oh no! A bug or unintentional behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions