Bullet Charts: Indicator Delta Reference shows dash symbol when value and reference are equal
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I am creating bullet charts using the guidance found here: https://plot.ly/r/bullet-charts/
All is working as expected, however when the value and reference values are the same, the rendered plot shows no difference. Just a straight line. I should say 0 as there's a difference of zero.
Example below with straight line for difference rendered.
plot_ly(
type = "indicator",
mode = "number+gauge+delta",
gauge = list(shape = "bullet"),
delta = list(reference = .333, valueformat='%', relative=FALSE,position='right'),
value = .33,
domain = list(x = c(0, 1), y = c(0, 1)),
title= list(text = "Profit"),
height = 150)
However, if I add an additional digit to the reference or value as shown below, a percent difference of -0 or +0 is shown.
plot_ly(
type = "indicator",
mode = "number+gauge+delta",
gauge = list(shape = "bullet"),
delta = list(reference = .333, valueformat='%', relative=FALSE,position='right'),
value = .33,
domain = list(x = c(0, 1), y = c(0, 1)),
title= list(text = "Profit"),
height = 150)
plot_ly(
type = "indicator",
mode = "number+gauge+delta",
gauge = list(shape = "bullet"),
delta = list(reference = .33, valueformat='%', relative=FALSE,position='right'),
value = .333,
domain = list(x = c(0, 1), y = c(0, 1)),
title= list(text = "Profit"),
height = 150)
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, das R bullet-chart-Beispiel zu reproduzieren, und verfolge den Pfad zur Darstellung der Indikator-Differenz in plotly.R. Im Issue wird weder eine Quelldatei noch ein Test genannt; ermittle die relevante Abdeckung und füge eine Regression-Prüfung hinzu, die eine Differenz von null zeigt, wenn Wert und Referenz gleich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- 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