Fix isRadial is always false (#7037)

This commit is contained in:
Ben McCann 2020-01-30 16:22:38 -08:00 committed by GitHub
parent 4462a2c950
commit eec71bfb22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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,