Skip to content

Tooltip jumping around when using bar chart in ShadowRoot #4794

Closed
@BeWoFinum

Description

@BeWoFinum

Description

When hovering over a bar in a bar chart the tooltip first appears in the correct position, then jumps to the far left edge of the chart.
This only happens when the chart is rendered in a ShadowRoot.

From what i could find:

  • It does not happen in line charts.
  • It does not happen when options.tooltips.insersect == false.
  • It does happen with multiple series of bars.
  • It does not happen in horizontal bar charts.

Steps to Reproduce

  1. Move the cursor over a bar.
  2. The tooltip appears and jumps to the left moments later.

Expected Behavior

The tooltip stays in position somewhere close to the bar, until the cursor is moved away.

Actual Behavior

The tooltip quickly moves to the left edge of the chart.

Screenshots

bar-chart

Reproduction Link

Bar chart example (this doesn't work as expected):
https://codepen.io/BeWoFinum/pen/abeRdKV

Line chart example (this works as expected):
https://codepen.io/BeWoFinum/pen/jOgeWdq

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