mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
Pad random color to be 6 hex characters
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -56,7 +56,7 @@ class ClientsGraph extends Component {
|
||||
// If we ran out of colors, make a random one
|
||||
backgroundColor: i < colors.length
|
||||
? colors[i]
|
||||
: '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16),
|
||||
: '#' + parseInt("" + Math.random() * 0xffffff, 10).toString(16).padStart(6, "0"),
|
||||
pointRadius: 0,
|
||||
pointHitRadius: 5,
|
||||
pointHoverRadius: 5,
|
||||
|
||||
Reference in New Issue
Block a user