'Plotly.js 3D scatter slider range
I'm using plotlyJs to plot a 3d scatter,I want to add the rangeslider on axis like 2D charts do with 'rangeslider' property. I added the following block to the layout param :
xaxis:{
rangeslider :{
autorange:true,
bgcolor:"#F147F1",
bordercolor:"#444",
borderwidth:2,
}
but nothing happen,however if I add the same block to 2D chart it works fine.
this is my 3D chart config :
let pointCount = 50;
let i, r;
for(i = 0; i < pointCount; i++)
{
r = 10 * Math.cos(i / 10);
this.x.push(r * Math.cos(i));
this.y.push(r * Math.sin(i));
this.z.push(i);
this.c.push(i)
}
Plotly.newPlot('chart', [{
type: 'scatter3d',
mode: 'lines',
x: this.x,
y: this.y,
z: this.z,
opacity: 1,
line: {
width: 6,
color: this.c,
colorscale: 'Viridis'
},
}],{
width: 730,
margin: {
l:20,
r:20,
t:35,
b:40,
},
},{
displayModeBar:false,
responsive: true
});
Is there any solution to add the range slider to the chart ? here a complete example: https://codepen.io/azizd/pen/KKZRzBq
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
