Bullet Charts: Indicator Delta Reference shows dash symbol when value and reference are equal
Nessuno ha ancora preso questa issue.
- Lingua principale
- R
- Stelle
- 2.7k
- Fork
- 641
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l’esempio di bullet-chart in R e segui il percorso di rendering del delta dell’indicatore in plotly.R. L’issue non indica alcun file sorgente né test; individua la coverage pertinente e aggiungi un controllo di regressione che mostri un delta pari a zero quando valore e riferimento sono uguali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100