score:5

Accepted answer

Well, no one answered, but I managed to do it. In case anyone needs it:

Using chartist:

var data = {
  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  series: [
    [5, 2, 4, 2, 0]
  ]
};
var chart = new Chartist.Bar('#results', data);
chart.on('draw', function(d) {
  if(d.type === 'bar') {
    d.element.animate({
      y2: {
        begin: 0,
        dur: 5000*d.series[d.index]/Math.max.apply(null,d.series),
        from: d.y1,
        to: d.y2,
        easing: Chartist.Svg.Easing.linear
      }
    });
  }
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartist/0.10.1/chartist.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/chartist/0.10.1/chartist.min.css" rel="stylesheet"/>
<div class="ct-chart ct-perfect-fourth" id="results"></div>


Related Query

More Query from same tag