selectize.js default behavior: remove label and allow for placeholder
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, r
调研方向
从 R 的 highlight() 入口点以及提供的 R Markdown 重现所触发的 selectize.js 行为开始。验证多个 plotly 图形如何共享选择状态,然后使标签抑制和占位符文本可配置,同时保持各图形之间的选择彼此独立。
由索引模型根据 Issue 内容生成。
描述
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 : )
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
plotly/plotly.R 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 72/100
-
save_image Error 未关闭
难度 3/5 1-2 天 新手友好度 52/100
相似的 Issue
-
documentation pkg infrastructure
难度 2/5 1-3 小时 新手友好度 76/100
epiverse-trace/epiparameter#511 ·
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
pharmaverse/aNCA#1496 ·
-
function:write_dwc
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 65/100
jbkunst/highcharter#849 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
r-lib/pkgdepends#485 · 4 条评论 ·