X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ultimate.js;fp=ultimate.js;h=6c066bcfac8149330c26a8413b4a7237240a90e2;hb=655991d5951123173cb88509c18eddb9abcd0ef4;hp=f782e754bd376ad4bad3781cc35e683a64657a4f;hpb=ef95761d4b5751a131e9d92e111689ef2e0b482d;p=pkanalytics diff --git a/ultimate.js b/ultimate.js index f782e75..6c066bc 100644 --- a/ultimate.js +++ b/ultimate.js @@ -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, }; }