Plotly.animation on bar chart

Hi I tried to customize the first example of Plotly animation: https://plot.ly/javascript/animations/#animating-the-data in a bar chart and it seems not working anymore. The randomized bars are correctly rendered but no animation is observed:

Plotly.plot('graph', [{
  x: [1, 2, 3],
  y: [2, 0.5, 1],
  type: 'bar'
}]);

function randomize() {
  Plotly.animate('graph', {
    data: [{y: [Math.random(), Math.random(), Math.random()]}],
    traces: [0],
    layout: {}
  }, {
    transition: {
      duration: 500,
      easing: 'cubic-in-out'
    }
  })
}

Anyone have some idea where it may go wrong?

Unfortunately the animation are not (yet?) supported for bar-charts…
It’s work in progress.

2 Likes

You might to subscribe to https://github.com/plotly/plotly.js/pull/1143 for the latest development info.

1 Like

Subscribed. Thanks a lot for the information!

Hello,

I am trying to create animation in plotly.py on horizontal bar charts

But I found this thread which says not supported. Can you kindly tell me what all kind of charts are supported in animations in plotly?

Thanks,
Sudhanshu Garg

1 Like