문제

When using the chart module (here a barchart) defined in Dojo, there is the possibility to set an animation like this :

chart.addPlot('default', {
    type: 'Columns',
    markers: true,
    animate: {duration: 1000}
});

My question is the following:

  • How can you replace the linear acceleration of the animation, by a "gravity"-like, accelerated animation ?

Thanks in advance !

도움이 되었습니까?

해결책

You can try something like the following:

require(["dojo/fx/easing", ...], function(easing, ...){
  chart.addPlot('default', {
      type: 'Columns',
      markers: true,
      animate: {duration: 1000, easing: easing.cubicIn}
  });
});

See dojo/fx/easing for various easing functions.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top