From 05457135028837e97cfd1736289069cf89d0973b Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 26 Jun 2025 08:53:50 +0000 Subject: [PATCH] tweak chart colors --- frontend/src/app/app.constants.ts | 5 +++-- .../hashrates-chart-pools/hashrate-chart-pools.component.ts | 2 +- .../app/components/pool-ranking/pool-ranking.component.ts | 2 +- .../treasuries-graph/treasuries-graph.component.ts | 2 +- .../treasuries/treasuries-pie/treasuries-pie.component.ts | 2 +- .../src/app/components/treasuries/treasuries.component.ts | 2 +- .../nodes-per-country-chart.component.ts | 2 +- .../nodes-per-isp-chart/nodes-per-isp-chart.component.ts | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/app.constants.ts b/frontend/src/app/app.constants.ts index 85a4d35d8..53c7b06c1 100644 --- a/frontend/src/app/app.constants.ts +++ b/frontend/src/app/app.constants.ts @@ -1,5 +1,5 @@ export const defaultMempoolFeeColors = [ - '557d00', + '497d2b', '557d00', '5d7d01', '637d02', @@ -41,7 +41,7 @@ export const defaultMempoolFeeColors = [ ]; export const contrastMempoolFeeColors = [ - '0082e6', + '007be9', '0082e6', '0984df', '1285d9', @@ -123,6 +123,7 @@ export const chartColors = [ "#263238", "#801313", ]; +export const originalChartColors = chartColors.slice(1); export const poolsColor = { 'unknown': '#FDD835', diff --git a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts index f93cf460d..002fdbc07 100644 --- a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts +++ b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts @@ -5,7 +5,7 @@ import { delay, map, retryWhen, share, startWith, switchMap, tap } from 'rxjs/op import { ApiService } from '@app/services/api.service'; import { SeoService } from '@app/services/seo.service'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { chartColors, poolsColor } from '@app/app.constants'; +import { originalChartColors as chartColors, poolsColor } from '@app/app.constants'; import { StorageService } from '@app/services/storage.service'; import { MiningService } from '@app/services/mining.service'; import { download } from '@app/shared/graphs.utils'; 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 de7f9b2e0..971fdd382 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -8,7 +8,7 @@ import { SeoService } from '@app/services/seo.service'; import { StorageService } from '@app//services/storage.service'; import { MiningService, MiningStats } from '@app/services/mining.service'; import { StateService } from '@app/services/state.service'; -import { chartColors, poolsColor } from '@app/app.constants'; +import { originalChartColors as chartColors, poolsColor } from '@app/app.constants'; import { RelativeUrlPipe } from '@app/shared/pipes/relative-url/relative-url.pipe'; import { download } from '@app/shared/graphs.utils'; import { isMobile } from '@app/shared/common.utils'; diff --git a/frontend/src/app/components/treasuries/treasuries-graph/treasuries-graph.component.ts b/frontend/src/app/components/treasuries/treasuries-graph/treasuries-graph.component.ts index 2073ecc8f..52f3d0851 100644 --- a/frontend/src/app/components/treasuries/treasuries-graph/treasuries-graph.component.ts +++ b/frontend/src/app/components/treasuries/treasuries-graph/treasuries-graph.component.ts @@ -7,7 +7,7 @@ import { AmountShortenerPipe } from '@app/shared/pipes/amount-shortener.pipe'; import { StateService } from '@app/services/state.service'; import { SeriesOption } from 'echarts'; import { WalletStats } from '@app/shared/wallet-stats'; -import { chartColors } from '@app/app.constants'; +import { originalChartColors as chartColors } from '@app/app.constants'; import { Treasury } from '../../../interfaces/node-api.interface'; diff --git a/frontend/src/app/components/treasuries/treasuries-pie/treasuries-pie.component.ts b/frontend/src/app/components/treasuries/treasuries-pie/treasuries-pie.component.ts index 6c5336502..b0daae4bb 100644 --- a/frontend/src/app/components/treasuries/treasuries-pie/treasuries-pie.component.ts +++ b/frontend/src/app/components/treasuries/treasuries-pie/treasuries-pie.component.ts @@ -6,7 +6,7 @@ import { download } from '@app/shared/graphs.utils'; import { isMobile } from '@app/shared/common.utils'; import { WalletStats } from '@app/shared/wallet-stats'; import { AddressTxSummary } from '@interfaces/electrs.interface'; -import { chartColors } from '@app/app.constants'; +import { originalChartColors as chartColors } from '@app/app.constants'; import { formatNumber } from '@angular/common'; import { Treasury } from '@interfaces/node-api.interface'; diff --git a/frontend/src/app/components/treasuries/treasuries.component.ts b/frontend/src/app/components/treasuries/treasuries.component.ts index ac8b6581c..bce684727 100644 --- a/frontend/src/app/components/treasuries/treasuries.component.ts +++ b/frontend/src/app/components/treasuries/treasuries.component.ts @@ -6,7 +6,7 @@ import { StateService } from '@app/services/state.service'; import { catchError, map, scan, shareReplay, startWith, switchMap, tap } from 'rxjs/operators'; import { WalletStats } from '@app/shared/wallet-stats'; import { Router } from '@angular/router'; -import { chartColors } from '@app/app.constants'; +import { originalChartColors as chartColors } from '@app/app.constants'; import { Treasury } from '@interfaces/node-api.interface'; @Component({ selector: 'app-treasuries', diff --git a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts index 986484d8a..10d8535b8 100644 --- a/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts +++ b/frontend/src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, OnInit, HostBinding, NgZone } from import { Router } from '@angular/router'; import { EChartsOption, PieSeriesOption } from '@app/graphs/echarts'; import { map, Observable, share, tap } from 'rxjs'; -import { chartColors } from '@app/app.constants'; +import { originalChartColors as chartColors } from '@app/app.constants'; import { ApiService } from '@app/services/api.service'; import { SeoService } from '@app/services/seo.service'; import { StateService } from '@app/services/state.service'; diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts index 56a03a524..76f9cd6ab 100644 --- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts +++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, OnInit, HostBinding, NgZone, Input import { Router } from '@angular/router'; import { EChartsOption, PieSeriesOption } from '@app/graphs/echarts'; import { combineLatest, map, Observable, share, startWith, Subject, switchMap, tap } from 'rxjs'; -import { chartColors } from '@app/app.constants'; +import { originalChartColors as chartColors } from '@app/app.constants'; import { ApiService } from '@app/services/api.service'; import { SeoService } from '@app/services/seo.service'; import { StateService } from '@app/services/state.service';