plotly / plotly/plotly.R

crosstalk equality

未关闭
#1,167 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述

I discovered this as I worked through an example of linking leaflet with DT and plotly through crosstalk (example). It seems plotly converts crosstalk keys to String and then uses exact equality match .indexOf (see lines). Thinking through how best to solve this, I came up with the following:

  1. Not convert crosstalk key to string in plotly, but I am guessing there was a reason to do the conversion for plotly traces.

  2. Perform match using something other than indexOf or ===. For the purposes of my example I used [].filter, but this is inefficient.

  3. Expect other htmlwidget authors to also convert to string, or add both the string and non-string forms to crosstalk select.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 experiments/select_crosstalk.R 中重现链接的 crosstalk 示例,并检查 plotly.js 第 739 行引用的匹配逻辑。比较 leaflet、DT 和 plotly 使用的键表示形式,然后在进行任何更改之前,确定整个示例中应保持一致的匹配行为。完成标准是链接的 widgets 能够可靠地选择相同的键。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, r
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。