]> git.sesse.net Git - pkanalytics/commitdiff
Two decimals is a bit too hardcore for possession times.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 14:30:35 +0000 (16:30 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 14:30:35 +0000 (16:30 +0200)
ultimate.js

index f782e754bd376ad4bad3781cc35e683a64657a4f..6c066bcfac8149330c26a8413b4a7237240a90e2 100644 (file)
@@ -116,6 +116,8 @@ function add_3cell_ci(tr, ci) {
        let text;
        if (ci.format === 'percentage') {
                text = (100 * ci.val).toFixed(0) + '%';
+       } else if (ci.decimals !== undefined) {
+               text = ci.val.toFixed(ci.decimals);
        } else {
                text = ci.val.toFixed(2);
        }
@@ -998,6 +1000,7 @@ function make_ci_duration(vals, z)
                'desired': 0.0,
                'inverted': false,
                'unit': 'sec',
+               'decimals': 1,
        };
 }