2.0.0-beta/dev中的条形动画对我不起作用



我在chrome控制台中得到一个错误:

Uncaught TypeError: easingFunction is not a functionanimation.render @ Chart.js:1423Chart.animationService.startDigest @ Chart.js:1158Chart.animationService.digestWrapper @ Chart.js:1136

我正在使用的选项:

    options: {animation:true, animationSteps: 60, animationEasing: easeOutQuart", responsive:true, maintainAspectRatio: false,}

来自branch的Chart.js是它默认的一切。

    Chart.defaults.global.animation = {
    duration: 1000,
    easing: "easeOutQuart",
    onProgress: function() {},
    onComplete: function() {},
};
Chart.Animation = Chart.Element.extend({
    currentStep: null, // the current animation step
    numSteps: 60, // default number of steps
    easing: "", // the easing to use for this animation
    render: null, // render function used by the animation service
    onAnimationProgress: null, // user specified callback to fire on each step of the animation 
    onAnimationComplete: null, // user specified callback to fire when the animation finishes
});

设置responsiveAnimationDuration

...
options: {
    responsiveAnimationDuration: 5000,
    ... 

Fiddle-http://jsfiddle.net/5ebvocra/

最新更新