selectize.js default behavior: remove label and allow for placeholder
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- R
- Estrellas
- 2.7k
- Forks
- 641
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I would like to create an R Markdown document with > 1 plotly figure where points can be highlighted with the selectize.js widget. Here a reproducible example
---
title: Test
output: html_document
---
# wt vs mpg
```{r, message=FALSE, warning=FALSE}
library(plotly)
myData <- highlight_key(mtcars, ~rownames(mtcars))
myFig <- plot_ly(myData, x = ~wt, y = ~mpg)
highlight(myFig, selectize = TRUE)
```
# disp vs mpg
```{r, message=FALSE}
myData <- highlight_key(mtcars, ~rownames(mtcars))
myFig <- plot_ly(myData, x = ~disp, y = ~mpg)
highlight(myFig, selectize = TRUE)
```
Two Design improvements would be nice
- No label above selectize widget
- Placeholder text in the
<input>field of the widget
For the first problem I found a workaround using highlight_key(..., group = " "). However I need to define for each plot a new "invisible" group identifier otherwise the highlighting of the plots will be linked (i.e. if I highlight a car in one plot it will be highlighted in all plots). At the moment I use group = " ", group = " ", group = " ", and so on but this is stupid.
A workaround for the placeholder text was already described on Stack Overflow. But it does not work out of the box if there are multiple plotly figures in one R Markdown document.
Optimal solution would be to have two additional arguments in the highlight() function
label = NULLmakes sure that no label is plottedplaceholder = ""to define the placeholder in the selectize box.
Let me know what you think of it : )
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el punto de entrada highlight() de R y el comportamiento de selectize.js que se ejercita mediante la reproducción de R Markdown proporcionada. Verifica cómo varias figuras de plotly comparten el estado de selección y, después, haz configurable la supresión de etiquetas y el texto de marcador de posición, manteniendo independientes las selecciones entre las figuras.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, r
- Área
- data-visualization, frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100