Display tooltips on zero value bars
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
This is a follow-up to #3797 .
I am using ggplotly in R, not using plotly directly, so I'm not including a reproducible example, but I think the issue is straightforward.
The tooltip (using the "text" specified in the ggplot command) does not appear in barplots when the bar height is equal to 0. The issue cited above notes the same thing in the last comment, posted after that issue had been resolved/closed.
If the tooltip only included the value of the bar height, this would not be a problem. But we often use the tooltip to display multiple values. In my specific case, the bar height shows year-to-year percentage change for each state, and the tooltip includes both the pct chg and the raw number for the current year. The raw number provides useful interpretive context because there is a wide range of raw values, and small values lead to more variable/extreme pct changes. For the states with pct chg=0, no tooltip is shown, so we lose the information on raw number that would help provide context. Screenshot below for example.
Thanks!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, in plotly.js ein Balkendiagramm mit Balken der Höhe null und benutzerdefiniertem Tooltip-Text zu reproduzieren, lies dann das zugehörige Issue #3797 und vergleiche dessen Verhalten. Die Arbeit ist abgeschlossen, wenn Balken mit dem Wert null ihren konfigurierten Tooltip-Inhalt anzeigen, einschließlich Werten, die über die Balkenhöhe hinausgehen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100