plotly / plotly/plotly.py

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

Ouverte
#4,646 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug P3
Langage dominant
Python
Étoiles
18.8k
Forks
2.8k
Merge moyen
16 h 26 min
PR mergées (30 j)
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()

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez avec l’exemple Python Sunburst fourni et reproduisez-le à plusieurs reprises dans Chrome et Firefox sous Windows. Comparez le comportement des navigateurs et inspectez la page locale avec les Chrome developer tools ; le travail est terminé lorsque le graphique Sunburst s’affiche de manière fiable dans Chrome comme dans Firefox.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
data-visualization
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.