Improve network chart precision
-Chart.js numbers are rounded to 3 decimals by default. This fix uses the raw value instead of the formatted number for display on the network hashrate and difficulty charts so that low numbers like 0.00028363 are displayed properly instead of being rounded to 0
This commit is contained in:
+2
-2
@@ -448,7 +448,7 @@ html(lang='en')
|
||||
return 'Block ' + context[0].label + ' Hashrate';
|
||||
},
|
||||
label: function(context) {
|
||||
return context.formattedValue + ' ' + getNetHashUnits()
|
||||
return (context.raw || 0).toString() + ' ' + getNetHashUnits()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -554,7 +554,7 @@ html(lang='en')
|
||||
return 'Block ' + context[0].label + ' Difficulty';
|
||||
},
|
||||
label: function(context) {
|
||||
return context.formattedValue;
|
||||
return (context.raw || 0).toString();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user