Adjust acceleration pool pie labels

This commit is contained in:
Mononaut 2024-06-27 06:19:43 +00:00
parent d6d8c85419
commit ebd4408b8d
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -66,10 +66,11 @@ export class ActiveAccelerationBox implements OnChanges {
const totalAcceleratedHashrate = acceleratingPools.reduce((total, pool) => total + pools[pool].lastEstimatedHashrate, 0);
acceleratingPools.forEach((poolId, index) => {
const pool = pools[poolId];
const poolShare = ((pool.lastEstimatedHashrate / this.miningStats.lastEstimatedHashrate) * 100).toFixed(1);
data.push(getDataItem(
pool.lastEstimatedHashrate,
toRGB(lighten({ r: 147, g: 57, b: 244 }, index * .08)),
`${((pool.lastEstimatedHashrate / this.miningStats.lastEstimatedHashrate) * 100).toFixed(1)}% ${pool.name} accelerating`,
`<b style="color: white">${pool.name} (${poolShare}%)</b>`,
true,
) as PieSeriesOption);
})
@ -78,7 +79,7 @@ export class ActiveAccelerationBox implements OnChanges {
data.push(getDataItem(
(this.miningStats.lastEstimatedHashrate - totalAcceleratedHashrate),
'rgba(127, 127, 127, 0.3)',
`${notAcceleratedByPercentage} not accelerating`,
`not accelerating (${notAcceleratedByPercentage})`,
false,
) as PieSeriesOption);