Skip to content

Sunburst plot not rendering without any error or warning message #4418

Open
@thechargedneutron

Description

@thechargedneutron

I am trying the basic sunburst plot as given here:

import plotly.express as px
data = dict(
    character=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
    parent=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
    value=[10, 14, 12, 10, 2, 6, 6, 4, 4])

fig = px.sunburst(
    data,
    names='character',
    parents='parent',
    values='value',
)
fig.show()

when I replace the data with the following:

['', 'Is', 'it', 'okay', 'to', 'Can', 'I', 'use', 'a', 'Show', 'me', 'how', 'to', 'do', 'this', 'skip', 'adding']
['', '', 'Is', 'it', 'okay', '', 'Can', 'I', 'use', '', 'Show', 'me', 'how', 'I', 'do', 'I', 'skip']
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

it works fine. But when I add only one more datapoint:

['', 'Is', 'it', 'okay', 'to', 'Can', 'I', 'use', 'a', 'Show', 'me', 'how', 'to', 'do', 'this', 'skip', 'adding', 'I', 'step']
['', '', 'Is', 'it', 'okay', '', 'Can', 'I', 'use', '', 'Show', 'me', 'how', 'I', 'do', 'I', 'skip', '', 'this']
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

there is no output. I do not see any warning or error message.

What can be the issue? And if so, there should be some error message raised.

Versions:

Python=3.11.4
Plotly=5.18.0
Pandas=2.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions