plotly / plotly/plotly.js

Implement `hoveron: 'fills'` for scattergl and scatterpolargl

Open
#2,887 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

During a discussion in the plotly.py forums in came up that the hoverlabel for the scatterpolar trace has a different behavior when the fill state is set to toself than when it's set to none.

CodePen: https://codepen.io/anon/pen/EpOGdX

fill: 'none' for scatterpolar
screen shot 2018-08-09 at 5 52 32 am

fill: 'toself' for scatterpolar
screen shot 2018-08-09 at 5 52 59 am

It also seems that the hoverinfo propery has no effect when fill is toself.

I did the same comparison with the scatterpolargl trace and it has the behavior that I expected:

fill: 'toself; for scatterpolargl
screen shot 2018-08-09 at 5 56 18 am

I don't know if this is a bug in scatterpolar or scatterpolargl, but I find the current scatterpolargl behavior (The behavior consistent with fill of none) to be more helpful.

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

Reproduce the linked CodePen and compare hover behavior for scatterpolar, scattergl, and scatterpolargl with fill set to none and toself. Start by tracing the hover handling for these trace types; done means hoverlabel and hoverinfo behavior is consistent with the expected fill behavior, with regression coverage added where the existing test structure permits.

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.