Hovertemplate not using single text value for all data points
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Hi there 👋, stumbled across this issue while playing around with hovertemplates in Plotly.NET.
The text property can be either set with an array of values (-> every data point gets its own text for hover display), or with a single value (-> every data point gets the same text)
This works well unless the text is used in a hover template. When using an array of text, these values are displayed correctly. But when using a single text for all datums, it does not display on hover.
Expected behavior: Hover template uses the single string of the text property for each hoverlabel
Actual behavior: Hoverlabels display %text
Here is a jsfiddle: https://jsfiddle.net/vsm79h3q/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hovertemplate behavior in the linked jsfiddle, comparing an array-valued text property with a single string. Trace the hovertemplate handling for scalar text values and verify that the completed change displays that same string in every hoverlabel instead of %text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100