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

时间:2015-11-29 16:47:47

标签: chart.js

我在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,}

分支中的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
});

1 个答案:

答案 0 :(得分:3)

设置publish_pages

responsiveAnimationDuration

小提琴 - http://jsfiddle.net/5ebvocra/