From e358a553c17afbc2373bd12ac4c005bb97517ed5 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 24 Feb 2022 17:28:16 +0900 Subject: [PATCH] Match pool color between pools pie and pools stack --- frontend/src/app/app.constants.ts | 4 ++-- .../app/components/pool-ranking/pool-ranking.component.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/app.constants.ts b/frontend/src/app/app.constants.ts index 1dfdce00e..232578e6b 100644 --- a/frontend/src/app/app.constants.ts +++ b/frontend/src/app/app.constants.ts @@ -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', diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index a5f2e54a4..a3017c7af 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -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 }; }