]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix isRadial is always false (#7037)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Fri, 31 Jan 2020 00:22:38 +0000 (16:22 -0800)
committerGitHub <noreply@github.com>
Fri, 31 Jan 2020 00:22:38 +0000 (19:22 -0500)
src/core/core.controller.js

index 2da5705ebf42bbceafa82385d3c84adbc44336d6..3b98da0879bc861587fd47f6265c394fa579412d 100644 (file)
@@ -136,13 +136,13 @@ function onAnimationsComplete(ctx) {
        const animationOptions = chart.options.animation;
 
        plugins.notify(chart, 'afterRender');
-       helpers.callback(animationOptions && animationOptions.onComplete, arguments, chart);
+       helpers.callback(animationOptions && animationOptions.onComplete, [ctx], chart);
 }
 
 function onAnimationProgress(ctx) {
        const chart = ctx.chart;
        const animationOptions = chart.options.animation;
-       helpers.callback(animationOptions && animationOptions.onProgress, arguments, chart);
+       helpers.callback(animationOptions && animationOptions.onProgress, [ctx], chart);
 }
 
 function isDomSupported() {
@@ -346,7 +346,7 @@ class Chart {
                        items = items.concat(
                                Object.keys(scaleOpts).map(function(axisID) {
                                        const axisOptions = scaleOpts[axisID];
-                                       const isRadial = axisID.charAt(0).toLowerCase === 'r';
+                                       const isRadial = axisID.charAt(0).toLowerCase() === 'r';
                                        const isHorizontal = axisID.charAt(0).toLowerCase() === 'x';
                                        return {
                                                options: axisOptions,