Truncate gauge label text to 2 decimal points

pull/10616/head
Alex P 2017-11-17 10:47:27 -08:00
parent 2d068237b8
commit 2fa7eb8c37
1 changed files with 2 additions and 1 deletions

View File

@ -245,7 +245,8 @@ class Gauge extends Component {
const gaugeValues = []
for (let g = minValue; g <= maxValue; g += incrementValue) {
gaugeValues.push(g.toString())
const roundedValue = Math.round(g * 100) / 100
gaugeValues.push(roundedValue.toString())
}
const startDegree = degree * 135