En el siguiente código, si elijo scatter3d en lugar de scatter , todos los parámetros tickformat y title dentro xaxis se ignoran por completo , y es imposible formatear nada bajo ningún eje.
Cualquier sugerencia sería apreciada.
Trama 3D fallida con formato de fecha escandaloso
Trazado de trabajo con el formato HH:MM:SS adecuado
function setup_plot(){ type='scatter'; var x=[],x0=new Date(); for (i=0;i<5;i++){ x[i]=new Date(); x[i].setTime(x0.getTime()+i*12*3600000); } var trace = [ { type: type, mode: 'lines', x: x, y: [1.0,1.0,1.0,1.0,1.0], z: [2.6,1.2,6.3,4.8,4.7] }, { type: type, mode: 'lines', x: x, y: [2.0,2.0,2.0,2.0,.0], z: [3.1,2.6,4.8,3.8,1.7] } ]; var layout = { title: "Failing Plot", xaxis:{ title:'Dates', tickformat: '%H:%M:%S', tickformatstops: [ { dtickrange: [1000,60000], value: '%H:%M:%S' }, { dtickrange: [60000,3600000], value: '%H:%M:%S' }, { dtickrange: [3600000,86400000], value: '%H:%M:%S' }, { dtickrange: [86400000,604800000], value: '%d' } ] } }; Plotly.newPlot('plot',trace,layout); }Para los gráficos 3D, los diseños de ejes deben proporcionarse dentro de una escena, por lo que
const layout = { scene: { xaxis: { title: 'Dates', ... } } }