Add fixed number of decimals to legend project 2 aufgabe 3
This commit is contained in:
parent
e30fcefc00
commit
725a59fefc
@ -82,7 +82,7 @@ const aufgabe3 = async () => {
|
|||||||
for (let i = 0; i < levels.length; i++) {
|
for (let i = 0; i < levels.length; i++) {
|
||||||
labels.push(
|
labels.push(
|
||||||
'<i style="background:' + getColor(levels[i] + 0.1) + '"></i> '
|
'<i style="background:' + getColor(levels[i] + 0.1) + '"></i> '
|
||||||
+ levels[i] + (levels[i + 1] ? '–' + levels[i + 1] : '+')
|
+ levels[i].toFixed(1) + (levels[i + 1] ? '–' + levels[i + 1].toFixed(1) : '+')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user