plotly / plotly/plotly.js

Incorrect hover label for missing last value with hovermode `x-unified` and `tickson=boundaries`

Open
#7,152 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

In this codepen the hover label for the last x axis value is incorrect. It displays "AC" in the hover, even though the correct value should be "Other".

image

The problem seems to be related to the missing last value (null) in the line trace. If that value is present, the hover labels work correctly.

The problem disappears when changing the width of the chart or reducing the number of data points.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen reproduction and inspect the hover-label behavior for hovermode x-unified with tickson=boundaries, focusing on the line trace whose final value is null. Verify the result across chart widths and data-point counts; done means the final hover label displays “Other” rather than “AC” when the last value is missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.