plotly / plotly/plotly.py

Sunburst graph open in Firefox but not Chrome (at least in Windows)

Open
#4,646 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

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()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Python Sunburst example and reproduce it repeatedly in Chrome and Firefox on Windows. Compare the browser behavior and inspect the local page with Chrome developer tools; done means the Sunburst graph renders reliably in Chrome as it does in Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.