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:
Joe Uhren
2022-10-14 13:13:46 -06:00
parent 03f62a22dc
commit de25461494
+2 -2
View File
@@ -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();
}
}
},