Skip to content

Tooltip crosshair rectangle has wrong width and position in stacked bar chart using shared tooltip #3754

@GwendalPeron

Description

@GwendalPeron

Description

When creating a stacked bar chart, if the tooltip shared property is set to true, the crosshair rectangle will have a width different from the bar or tick width and its horizontal position will be off by being centered around the right border of the bar.

Steps to Reproduce

  1. Create a bar chart with its tooltip.shared and chart.stacked properties set to true
  2. Use at least two series with datapoints having the same x value (as a numeric or a date, there is no issues with string values)
  3. Move your cursor above a bar

Expected Behavior

The crosshair rectangle should fit the bar or the ticks.

Actual Behavior

The crosshair rectangle width does not match ticks or bar width and its shifted to the right of the bar

Screenshots

Screenshot 2023-04-04 at 16 25 12

Reproduction Link

https://codepen.io/GwendalPeron/pen/dyqxeXp

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