Sankey Paths can be plotted outside the plot area
未关闭
还没有人认领这个 Issue。
plotly.js
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
When a link is plotted from a source node to the right of a target node on the diagram (the path loops around and goes upstream), then the path can be plotted outside the plot area. I have data that does this to such an extent that the hover information is not showing.
library(plotly)
fig <- plot_ly(
type = "sankey",
orientation = "h",
node = list(
label = c("A1", "A2", "B1", "B2", "C1", "C2"),
color = c("blue", "blue", "blue", "blue", "blue", "blue"),
pad = 15,
thickness = 20,
line = list(
color = "black",
width = 0.5
)
),
# With your example, I added the 7th values in each of the vectors in the link list.
link = list(
source = c(0,1,0,2,3,3,4),
target = c(2,3,3,4,4,5,3),
value = c(8,4,2,8,4,2,40)
)
)
fig <- fig %>% layout(
title = "Basic Sankey Diagram",
font = list(
size = 10
)
)
fig
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
运行提供的 R 示例,其中包含从右侧源指向上游目标的 Sankey 链接,然后检查负责路径放置的 Sankey 渲染入口点。完成的标准是循环路径保持在绘图区内,并且其悬停信息可见。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100