plotly / plotly/plotly.R

'hovertemplate' not passable as an attribute into a dataframe in a sankey diagram's nodes/links

未关闭
#2,090 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

描述


The 'hovertemplate' attribute is not working when passed into the 'nodes' or 'links' dataframes in a sankey diagram. "Node" and "link" are arguments for the sankey's links and nodes and are of type dataframe which contain arbitrary data for the links and nodes, as well as attributes of links and nodes (see plotly::schema() for a list of all available attributes for each trace). Reprex here is unnecessary since my question is why 'hovertemplate' cannot be passed into the 'nodes' or 'links' as attributes when other attributes such as 'color' and 'hoverinfo' are passable? Is there any workaround to this?



fig <- plot_ly(
      type = "sankey",
      orientation = "h",
      node = nodes, # dataframe which includes sankey trace data and attributes
      link = links, # dataframe which includes sankey trace data and attributes
      valueformat = ".0f")

fig 

贡献指南

打开贡献指南

从这里开始

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

调研方向

未指定实现文件或测试。首先检查 plotly::schema() 中 Sankey 节点和链接的属性,然后跟踪节点和链接数据框的转换方式;完成的标准是确定 hovertemplate 为何不同于 color 和 hoverinfo,并记录已确认的解决方法或受支持的行为。

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

评估

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

把新 issue 发到你的邮箱

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