Hoverlabels in stacked area charts with ggplotly not working properly
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Hello there!
When creating a stacked area chart with ggplot in R and using ggplotly to create a plotly version of it, there occurs a rather grave error: in the hoverlabel only the frist value for each trace is shown. Say, I have years on the x axis, then for all years 2019 will be displayed, even though the value belongs to 2023.
My minimum code sample is here: https://plotly.com/ggplot2/filled-area-plots/
The official tutorials samples show the same behaviour on my Linux machine, all packages up to date.
Would really enjoy it if that were to be fixed!
Best regards!
Alex
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 with the minimum example linked in the issue, https://plotly.com/ggplot2/filled-area-plots/, and reproduce the stacked area chart on the current packages. Trace how ggplotly constructs hover labels for the stacked traces; done means each year displays the value belonging to that year rather than the first year in the trace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100