Tooltip showing "NA" when facets variable has level with one obs
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
Tooltip shows "NA" instead of value when using facet_wrap/facet_grid with a categorical variable that has one level with only one observation. The tooltip for the level that has only one observation appears correct. But the tooltip for all other facets shows "NA". This issue occurs only when at least one of the levels of a categorical variable used in facet_wrap has exactly one observation. With two observations per level, the problem disappears.
library(plotly)
d <- data.frame(matrix(nrow = 100, ncol =0))
d$cat1 <- sample(LETTERS[1:4], 100, replace = TRUE, prob = c(0.1, 0.2, 0.65, 0.05))
d$x <- rnorm(100)
ggplotly(
ggplot(data = d, aes(x = x)) +
geom_histogram() +
facet_wrap(cat1 ~ .)
)
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
Eseguire il riproduttore R fornito usando ggplotly con facet_wrap e un livello categoriale contenente un'osservazione. Tracciare il modo in cui i valori dei tooltip vengono assegnati tra i facet, quindi verificare che il livello singleton e tutti gli altri facet visualizzino i valori attesi invece di "NA".
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