From: LeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com> Date: Mon, 23 Nov 2020 21:37:34 +0000 (+0100) Subject: Fixed samples: area dataset (line), radar and logarithmic scale scatter (#8099) X-Git-Tag: v3.0.0-beta.7~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f61d267093b1d9e239ca5bf5f5762287e7d248;p=thirdparty%2FChart.js.git Fixed samples: area dataset (line), radar and logarithmic scale scatter (#8099) --- diff --git a/samples/charts/area/analyser.js b/samples/charts/area/analyser.js index 592dcbb9d..3b2e37107 100644 --- a/samples/charts/area/analyser.js +++ b/samples/charts/area/analyser.js @@ -45,7 +45,7 @@ if (target === false) { target = 'none'; - } else if (isFinite(target)) { + } else if (typeof target !== 'object' && isFinite(target)) { target = 'dataset ' + target; } else { target = 'boundary "' + (typeof target === 'object' ? JSON.stringify(target) : target) + '"'; diff --git a/samples/scales/logarithmic/scatter.html b/samples/scales/logarithmic/scatter.html index 2082c700c..9f93ea267 100644 --- a/samples/scales/logarithmic/scatter.html +++ b/samples/scales/logarithmic/scatter.html @@ -138,7 +138,7 @@ position: 'bottom', ticks: { callback: function(tick) { - var remain = tick / (Math.pow(10, Math.floor(Chart.helpers.math.log10(tick)))); + var remain = tick / (Math.pow(10, Math.floor(Chart.helpers.log10(tick)))); if (remain === 1 || remain === 2 || remain === 5) { return tick.toString() + 'Hz'; }