Sunburst graph open in Firefox but not Chrome (at least in Windows)
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
I am using the Sunburst graph which shows in the browser with a localhost web server.
When (up-to-date) Chrome is used as the default browser, sometimes the graph loads fine, sometimes it keeps “loading” and doesn’t load, sometimes it finishes “loading” but the page is blank.
It does work every time when I make Firefox the default browser.
But back in Chrome, the behavior seems random and does not depend on the data. If I try the same dataset repeatedly, it sometimes loads, sometimes doesn’t.
I’ve seen others report similar problems but in those threads it seems the problem was the underlying data. This is not so for me since sometimes the data loads fine, but a lot of the times it doesn’t.
Opening Chrome’s developer tools does not show anything that looks like an error.
There is a discussion (and repro confirmation by others) at Plotly community forum.
The code below runs successfully every time when the default browser is Firefox, but only about half the executions when the default browser is Chrome. I am on plotly 5.21.0, Python 3.11.9, Windows 10.
import plotly.graph_objects as go
labels = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100', '101', '102', '103', '104', '105', '106', '107', '108']
parents = ['', '1', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '1', '16', '16', '16', '16', '1', '21', '22', '22', '22', '22', '22', '22', '22', '22', '22', '21', '32', '32', '32', '21', '36', '36', '36', '36', '36', '36', '36', '36', '36', '36', '21', '47', '21', '49', '49', '21', '52', '21', '54', '54', '21', '57', '21', '59', '21', '61', '21', '21', '64', '21', '66', '1', '68', '68', '1', '71', '71', '71', '1', '75', '75', '1', '', '79', '80', '80', '80', '80', '80', '79', '86', '87', '86', '89', '89', '89', '89', '89', '86', '86', '86', '86', '86', '79', '100', '100', '79', '103', '103', '103', '103', '79']
values = [5640.0, 2130.0, 225.0, 15.0, 60.0, 15.0, 235.0, 255.0, 20.0, 60.0, 30.0, 15.0, 1155.0, 30.0, 15.0, 240.0, 120.0, 60.0, 30.0, 30.0, 2925.0, 390.0, 90.0, 15.0, 30.0, 45.0, 60.0, 75.0, 30.0, 15.0, 15.0, 315.0, 30.0, 15.0, 60.0, 1035.0, 15.0, 45.0, 45.0, 60.0, 90.0, 45.0, 45.0, 60.0, 600.0, 30.0, 240.0, 30.0, 300.0, 240.0, 60.0, 45.0, 45.0, 60.0, 30.0, 30.0, 15.0, 15.0, 75.0, 75.0, 195.0, 195.0, 30.0, 15.0, 15.0, 210.0, 210.0, 135.0, 105.0, 30.0, 90.0, 60.0, 15.0, 15.0, 105.0, 75.0, 30.0, 15.0, 1645.0, 345.0, 165.0, 135.0, 15.0, 15.0, 15.0, 1045.0, 175.0, 85.0, 615.0, 90.0, 30.0, 285.0, 15.0, 195.0, 30.0, 90.0, 90.0, 30.0, 15.0, 45.0, 30.0, 15.0, 165.0, 15.0, 30.0, 30.0, 90.0, 45.0]
fig = go.Figure(go.Sunburst(
labels=labels,
parents=parents,
values=values,
branchvalues="total",
textinfo='label+percent parent',
))
fig.update_layout(
margin=dict(t=0, l=0, r=0, b=0),
sunburstcolorway=["#636efa", "#ef553b", "#00cc96"]
)
fig.show()
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从提供的 Python Sunburst 示例开始,在 Windows 上的 Chrome 和 Firefox 中反复重现它。比较浏览器行为,并使用 Chrome developer tools 检查本地页面;完成的标准是 Sunburst 图表能够像在 Firefox 中一样,在 Chrome 中可靠地渲染。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100