Layout broken after Plotly.restyle

Hi there,

i have a scatter plot which is drawn from an array of objects. (In fact, each individual point is a separate object, but I think it does not matter for now).

Now I wish to update this plot and as soon as I add the x or y or xaxis or yaxis values, the layout title and axis titles are gone (no text is displayed). The values themselves and the ticks are updated as intended.
I can update legendgroup, hovertemplate, marker color etc. with the same method and the layout remains intact.

The way I work:

  1. function fetchData() constructs an array of object, which is scatterData
  2. I can do Plotly.newplot(“myDiv”,scatterData,scatterLayout);
  3. To update the data, I do:

fetchData() //scatterData now contains the updated values
var scatterUpdate = ;
for(i=0;i<scatterData.length;i++){
scatterUpdate.push(scatterData[i].x);
}
//This creates scatterUpdate which is an array of arrays, with each array containing 1 updated x value.

var update = {
‘x’: scatterUpdate,
}
Plotly.restyle(“myDiv”, update);

Result:
The plot in myDiv is updated with the new values, but it seems that the execution is broken at some time as the plot title, axis titles are all gone.
Funnily enough, I can add more properties to update and they all update the plot values and properties as they should. I also noticed that with this method, I can update legendgroup, hovertemplate, marker without damaging the template (the updated plot keeps the previous titles - as intended). but as soon as I touch x,y,xaxis or yaxis, it is just as described above: values and axes are updated, all titles are gone. The console remains silent about any errors.

Is this way of updating the plot incorrect? If yes, what would be the right way of updating all traces at the same time?

Thanks for reading : )