Skip to content

Error when adding a new trace to a plot with Plotly.react #2602

Closed
@tropys

Description

@tropys

After updating to plotly.js 1.37.0, I'm getting the following error when adding a trace to a plot that already has at least one trace. This then seems to sometimes cause the trace to not render.

Error while plotting: TypeError: Cannot read property '0' of undefined
    at Object.plots.supplyDefaultsUpdateCalc (plotly.js:143231)
    at Object.exports.react (plotly.js:123205)
    at factory.js:100

Recreated with codepen: https://codepen.io/steph_curried/pen/gzWBQE
I had to use chrome dev tools console, codepens console does not show the error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions