Remove obsolete/unactionable warnings
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
On Windows 10 (version 21H2, build 19044.3448) using RStudio 2023.06.1, when I run the following code
library(ggplot2)
library(plotly)
gplt <- ggplot(iris) + geom_point(aes(x= Sepal.Length, y = Sepal.Width))
gplt |> toWebGL()
I get the following warnings:
Warning messages:
1: 'scattergl' objects don't have these attributes: 'hoveron'
Valid attributes include:
'connectgaps', 'customdata', 'customdatasrc', 'dx', 'dy', 'error_x', 'error_y', 'fill', 'fillcolor', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'legendgroup', 'legendgrouptitle', 'legendrank', 'line', 'marker', 'meta', 'metasrc', 'mode', 'name', 'opacity', 'selected', 'selectedpoints', 'showlegend', 'stream', 'text', 'textfont', 'textposition', 'textpositionsrc', 'textsrc', 'texttemplate', 'texttemplatesrc', 'transforms', 'type', 'uid', 'uirevision', 'unselected', 'visible', 'x', 'x0', 'xaxis', 'xcalendar', 'xhoverformat', 'xperiod', 'xperiod0', 'xperiodalignment', 'xsrc', 'y', 'y0', 'yaxis', 'ycalendar', 'yhoverformat', 'yperiod', 'yperiod0', 'yperiodalignment', 'ysrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'
2: 'scattergl' trace types don't currently render in RStudio on Windows. Open in another web browser (IE, Chrome, Firefox, etc).
-
The second warning is outdated. The plot renders fine on the viewer panel and I successfully can zoom and interact with it. I suggest removing it.
-
The first warning was reported back in 2019 on #1582. It is useless to me (and I guess most users) since it is not clear what can we do to avoid it. It is also weird because it happens on a simple plotly use-case. I am using this function, but it would be nice if it could be addressed:
library(ggplot2)
library(plotly)
workaround_hoveron_warning <- function(p) {
p$x$data <- lapply(p$x$data, function(item) {
item$hoveron <- NULL
item
})
p
}
gplt <- ggplot(iris) + geom_point(aes(x= Sepal.Length, y = Sepal.Width))
gplt |> toWebGL() |> workaround_hoveron_warning()
Questions
- Would a PR removing the RStudio on Windows warning be acceptable?
- Is there a better approach for avoiding the
hoveronwarning?
Thanks!
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
Partite dal percorso toWebGL() e dal codice che emette l’avviso scattergl relativo a hoveron e gli avvisi di Windows/RStudio; nell’issue non sono indicati file sorgente né test. Riproducete l’esempio ggplot2/plotly fornito nella configurazione indicata, quindi verificate che l’avviso obsoleto sia scomparso e che il comportamento dell’avviso rimanente sia stato gestito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100