Closed flopp closed 2 years ago
assets/src/js/components/Table.js creates the widthClassas
assets/src/js/components/Table.js
widthClass
widthClass = "w" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5));
=> so, there's no leading 0 for values < 10, e.g. w7
0
w7
assets/src/css/styles.css defines the width classes with leading 0, e.g.
assets/src/css/styles.css
.w07:after{width:7%}
=> The light-green count bars inn the "Top Pages" and "Top Referrers" tables are not displayed properly for values < 10.
To fix this, widthClassshould be zero padded, e.g.
widthClass = "w" + ("" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5))).padStart(2, '0');
assets/src/js/components/Table.js
creates thewidthClass
as=> so, there's no leading
0
for values < 10, e.g.w7
assets/src/css/styles.css
defines the width classes with leading0
, e.g.=> The light-green count bars inn the "Top Pages" and "Top Referrers" tables are not displayed properly for values < 10.
To fix this,
widthClass
should be zero padded, e.g.