Replace padStart with a solution that works in older browsers

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2019-12-28 19:08:07 +02:00
committed by XhmikosR
parent 03b3a1d604
commit ab629c52a1
+1 -1
View File
@@ -323,7 +323,7 @@ function updateClientsOverTime() {
// If we ran out of colors, make a random one
backgroundColor: i < colors.length ?
colors[i] :
"#" + parseInt(String(Math.random() * 0xFFFFFF), 10).toString(16).padStart(6, "0"),
"#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6),
pointRadius: 0,
pointHitRadius: 5,
pointHoverRadius: 5,