Match pool color between pools pie and pools stack

This commit is contained in:
nymkappa 2022-02-24 17:28:16 +09:00
parent 78fa3e33cd
commit e358a553c1
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 6 additions and 4 deletions

View File

@ -78,8 +78,8 @@ export const poolsColor = {
'poolin': '#3949AB',
'binancepool': '#1E88E5',
'viabtc': '#039BE5',
'btccom': '#00ACC1',
'slushpool': '#00897B',
'btccom': '#00897B',
'slushpool': '#00ACC1',
'sbicrypto': '#43A047',
'marapool': '#7CB342',
'luxor': '#C0CA33',

View File

@ -9,7 +9,7 @@ import { SeoService } from 'src/app/services/seo.service';
import { StorageService } from '../..//services/storage.service';
import { MiningService, MiningStats } from '../../services/mining.service';
import { StateService } from '../../services/state.service';
import { chartColors } from 'src/app/app.constants';
import { chartColors, poolsColor } from 'src/app/app.constants';
@Component({
selector: 'app-pool-ranking',
@ -120,6 +120,9 @@ export class PoolRankingComponent implements OnInit {
return;
}
data.push({
itemStyle: {
color: poolsColor[pool.name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase()],
},
value: pool.share,
name: pool.name + (this.isMobile() ? `` : ` (${pool.share}%)`),
label: {
@ -216,7 +219,6 @@ export class PoolRankingComponent implements OnInit {
}
}
],
color: chartColors
};
}