]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixed samples: area dataset (line), radar and logarithmic scale scatter (#8099)
authorLeeLenaleee <39033624+LeeLenaleee@users.noreply.github.com>
Mon, 23 Nov 2020 21:37:34 +0000 (22:37 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Nov 2020 21:37:34 +0000 (16:37 -0500)
samples/charts/area/analyser.js
samples/scales/logarithmic/scatter.html

index 592dcbb9df90f7dd9caa713524daf0b503b00c37..3b2e371070f355401473a63accae8ee9bdb67a14 100644 (file)
@@ -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) + '"';
index 2082c700caad6981341cac348669d5431bc56e60..9f93ea267830b92ff2f018c31919404ec0f4fb38 100644 (file)
                                                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';
                                                                }