Skip to content

Bad tooltips positioning when container has the CSS zoom property != 100%. #5043

Open
@meronz

Description

@meronz

Description

When showing a chart in a container that has the zoom property set to something different than 100%, the tooltips on the line chart do not follow the mouse pointer properly. I suspect this is a problem that also occurs on other features that rely on the pointer feature. I reproduced this behavior on Line, Area, Pie charts but there could be more.

Steps to Reproduce

  1. Render a chart in some div
  2. Apply zoom to 50% to said chart's parent
  3. Move the mouse over the line chart

Expected Behavior

The tooltip is shown on the point closest to the mouse pointer.

Actual Behavior

The tooltip position is skewed to the left when zoom is less than 100%, to the right when zoom is more than 100%.

Screenshots

Image

Reproduction Link

https://codepen.io/meronz/pen/ByyXjrj

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions