Skip to content

Scatter Graph fails silently if data parameter is not a list. #113

Closed
@radumas

Description

@radumas

This took me about an hour of debugging today while playing with my app.

data = go.Scatter(x=df['x'], y=df['y'])
layout = dict(title = 'This won't display')
app.layout = html.Div(dcc.Graph(dict(data=data, layout=layout)))

The above fails silently. The Div will display, as will some of the plotly toolbar, but no Graph will appear. There's no error in the JS console, or the terminal.

Meanwhile this simple change displays the Graph

app.layout = html.Div(dcc.Graph(dict(data=[data], layout=layout)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions