【问题标题】:Dojo charts, replace linear acceleration in animationDojo 图表,替换动画中的线性加速度
【发布时间】:2013-05-28 11:46:57
【问题描述】:

使用 Dojo 中定义的图表模块(此处为条形图)时,可以设置如下动画:

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

我的问题如下:

  • 如何将动画的线性加速度替换为类似“重力”的加速动画?

提前致谢!

【问题讨论】:

    标签: dojo dojox.charting


    【解决方案1】:

    您可以尝试以下方法:

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

    查看 dojo/fx/easing 了解各种缓动函数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-02
      • 1970-01-01
      • 1970-01-01
      • 2018-03-24
      • 1970-01-01
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      相关资源
      最近更新 更多