Thứ Bảy, 10 tháng 3, 2018

Sử dụng animation cho react-chartist React

Sử dụng animation cho react-chartist React
Sử dụng animation cho react-chartist React
Sử dụng animation cho react-chartist React
<ChartistGraph key="1" className="ct-chart-line" data={{  labels: ["foo","bar"], series:[ [1,2,3],[3,4,5]]  }}  type={'Line'} listener={{"draw" : function(data) {
  if(data.type === 'line' || data.type === 'area') {
    data.element.animate({
      d: {
        begin: 2000 * data.index,
        dur: 2000,
        from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
        to: data.path.clone().stringify(),
        easing: Chartist.Svg.Easing.easeOutQuint
      }
    });
  } } }}/>
Previous Post
Next Post

post written by: