plotly / plotly/plotly.py

allow boxes of different height on the timeline graph

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

还没有人认领这个 Issue。

feature P3
主要语言
Python
星标
18.8k
派生
2.8k
平均合并
16 小时 26 分钟
30 天内合并 PR
21

描述

Hi,

I have a situation where I would like to visualize the burn rate of projects on a timeline. It would be most logical to present this as the height of each box. Currently every row in the timeline graph is of uniform height, and there is no provision for changing the size.

Would it be possible to add a new feature for varying heights within the timeline graph? Something like this (in Plotly Express):

df = pd.DataFrame([
    dict(Task="Project A", Start='2009-01-01', Finish='2009-02-28', Burnrate=200),
    dict(Task="Project B", Start='2009-03-05', Finish='2009-04-15', Burnrate=75),
    dict(Task="Project C", Start='2009-02-20', Finish='2009-05-30', Burnrate=110)
])

fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", size="Burnrate")
fig.show()

Also, while the boxes can be drawn very slim (low size values), there probably needs to be a minimum row height determined by the label text.

Something similar could probably be built by stacking bar charts or area plots in one facet column, but I think the resulting graph would be too high and might also be visually too complicated.

Cheers,
--Martin

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 Plotly Express 的 timeline 入口点和提供的 Python 示例开始。确定不同的基于 Burnrate 的框高度以及由 label 驱动的最小行高应如何工作,然后通过涵盖不同尺寸的 timeline 示例和测试来验证该功能。

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

评估

技术栈
plotly, python
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

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