Ok, I’m struggling with the animation.
I have a line,
I’m trying to get the line to appear from right to left as an animation. axes fixed from 0-10.
myDiv = document.getElementById('myDiv')
let xaxis_template = {fixedrange: true, automargin: true, range: [0, 10], zeroline: false};
let yaxis_template = { fixedrange: true, automargin: true, range: [0, 10], zeroline: false};
let x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
let y = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
let trace1 = {
x: x,
y: y,
type: 'line',
};
let data = [trace1];
Plotly.newPlot(myDiv, data);
Any help or suggestions for how to animate it would be great!
Thanks
Shae