decimals fixed
This commit is contained in:
1 parent
d6d66105ad
commit
269e89fa67
1 file changed
+5
-1
+5
-1
@@ -445,7 +445,11 @@ function newRateScale () {
|
||||
rate = coordinateSystem.max.y
|
||||
}
|
||||
|
||||
let label = (rate - Math.trunc(rate)).toFixed(2)
|
||||
let decimals = 2
|
||||
if (rate < 1) { decimals = 4 }
|
||||
if (Math.trunc(rate * 100) < 1) { decimals = 6 }
|
||||
if (Math.trunc(rate * 10000) < 1) { decimals = 8 }
|
||||
let label = (rate - Math.trunc(rate)).toFixed(decimals)
|
||||
let labelArray = label.split('.')
|
||||
let label1 = thisObject.payload.node.payload.parentNode.name
|
||||
let label2 = (Math.trunc(rate)).toLocaleString()
|
||||
|
||||
Reference in new issue
Block a user