[BUGFIX] Calc width for proportion bars

This commit is contained in:
Xaver Maierhofer 2017-10-31 10:16:04 +01:00 committed by Xaver Maierhofer
parent 1909eb291e
commit 519f37cd14
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
2 changed files with 3 additions and 3 deletions

View File

@ -64,9 +64,8 @@ define(['d3-interpolate', 'snabbdom', 'filters/genericnode', 'helper'],
var th = V.h('th', a);
var td = V.h('td', V.h('span', {
style: {
width: Math.round(v * 100) + '%',
backgroundColor: scale(v),
color: 'white'
width: 'calc(25px + ' + Math.round(v * 90) + '%)',
backgroundColor: scale(v)
}
}, d[1].toFixed(0)));

View File

@ -16,6 +16,7 @@
span {
box-sizing: border-box;
color: $color-white;
display: inline-block;
font-weight: bold;
min-width: 1.5em;