Skip to content

"Uncaught container is not an object" after layout is sent to newPlot #3350

Closed
@poldz123

Description

@poldz123

When editing the layout object after it was sent it to Plotly.newPlot, it causes an error log Uncaught container is not an object.

Seems only for non-objects that causes it:

var layout = {
  title: "title",
  margin: {
      l: 30,
      r: 50,
      t: 30,
      b: 10
    }
};

Plotly.newPlot('contourDiv', data, layout, {displayModeBar: false});
console.log(layout)
layout.margin = {} -> It works
layout.title = "edit title" -> Causes the error
Plotly.update('contourDiv', data, layout)

Before version 1.43.0 the above code works.

https://codepen.io/poldz123/pen/pqNBzj?editors=0010

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