From c4f61d267093b1d9e239ca5bf5f5762287e7d248 Mon Sep 17 00:00:00 2001 From: LeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com> Date: Mon, 23 Nov 2020 22:37:34 +0100 Subject: [PATCH] Fixed samples: area dataset (line), radar and logarithmic scale scatter (#8099) --- samples/charts/area/analyser.js | 2 +- samples/scales/logarithmic/scatter.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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'; } -- 2.47.2