Skip to content

Jupyter Plotly JSON mime renderer does not update #3053

Closed
@rapgenic

Description

@rapgenic

When displaying some plotly JSON content the viewport does not update on subsequent changes of the data. However closing and reopening the notebook does indeed display the updated plot, suggesting that there might be a problem with the renderer itself.

Example code:

out = {}
out['application/vnd.plotly.v1+json'] = {
    "data": [
        {
            "x": [
                "giraffes",
                "orangutans",
                "monkeys"
            ],
            "y": [
                20,
                14,
                23
            ],
            "type": "bar"
        }
    ]
}
h = display(out, raw=True, display_id=True)
# This does not update the rendered view 
# however closing and reopening the notebook does
out['application/vnd.plotly.v1+json']['data'][0]['y'][0] = 10;
h.update(out, raw=True)

No error is reported in the developer console

Environment:

Output of command jupyter labextension list:

JupyterLab v3.0.6
/usr/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK

Other labextensions (built into JupyterLab)
   app dir: /home/giulio/.jupyter/lab/appdir
        jupyterlab-plotly v4.14.3 enabled OK

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