]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Remove unused parameter (#7480)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Tue, 9 Jun 2020 11:51:12 +0000 (04:51 -0700)
committerGitHub <noreply@github.com>
Tue, 9 Jun 2020 11:51:12 +0000 (07:51 -0400)
src/scales/scale.linearbase.js

index 9e65b47917ccc0c2790f08250623036fd6b8b495..c0f3def699cdc14ab9114ed995ba401596226635 100644 (file)
@@ -6,22 +6,12 @@ import Scale from '../core/core.scale';
  * Implementation of the nice number algorithm used in determining where axis labels will go
  * @return {number}
  */
-function niceNum(range, round) {
+function niceNum(range) {
        const exponent = Math.floor(log10(range));
        const fraction = range / Math.pow(10, exponent);
        let niceFraction;
 
-       if (round) {
-               if (fraction < 1.5) {
-                       niceFraction = 1;
-               } else if (fraction < 3) {
-                       niceFraction = 2;
-               } else if (fraction < 7) {
-                       niceFraction = 5;
-               } else {
-                       niceFraction = 10;
-               }
-       } else if (fraction <= 1.0) {
+       if (fraction <= 1.0) {
                niceFraction = 1;
        } else if (fraction <= 2) {
                niceFraction = 2;