Using streaming data resets rotation

I am new to plotly.js so apologies if this is an easy fix but I can not find an easy fix after much searching.

Essentially I am drawing data to a 3D scatter plot as data comes in, but every time I update the graph with new data, it resets the view point of the camera in the 3D scene. How do I prevent this? I would like to be able to change camera view whilst data is being drawn in real time using orbital / turntable rotation.

Code is as follows:

// Generate random stuff for now.
var stop = false;

var interval = setInterval(function() {

  Plotly.extendTraces('dataChart', {
    x: [[rand()], [rand()]],
    y: [[rand()], [rand()]],
    z: [[rand()], [rand()]]
  }, [0, 1], MAX_CHAIN_POINTS)

  if (stop) {
}, 16);

Any ideas?


Thanks for reporting.

From - looks like rotation is preserved correctly when you mouseup before new data comes in.

This is related to open tickets:

Unfortunately I’m updating at 100 times a second. I need the update to be preserved before mouse up. Any possibility that could happen? I’m streaming data from a sensor.