From e9fc5c0433f8a10b85adf8323d515d35256f18ae Mon Sep 17 00:00:00 2001 From: natsoni Date: Mon, 27 May 2024 11:50:11 +0200 Subject: [PATCH 1/3] Fix widget mining graphs --- .../hashrate-chart/hashrate-chart.component.html | 4 ++-- .../components/hashrate-chart/hashrate-chart.component.ts | 8 ++++++-- .../components/pool-ranking/pool-ranking.component.html | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html index 9e5534a56..b50389ce8 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -54,8 +54,8 @@ -
+
diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index b61f88521..8aaa983fa 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -349,7 +349,9 @@ export class HashrateChartComponent implements OnInit { const selectedPowerOfTen: any = selectPowerOfTen(val); const newVal = Math.round(val / selectedPowerOfTen.divider); return `${newVal} ${selectedPowerOfTen.unit}H/s`; - } + }, + showMinLabel: false, + showMaxLabel: false, }, splitLine: { lineStyle: { @@ -381,7 +383,9 @@ export class HashrateChartComponent implements OnInit { const selectedPowerOfTen: any = selectPowerOfTen(val); const newVal = Math.round(val / selectedPowerOfTen.divider); return `${newVal} ${selectedPowerOfTen.unit}`; - } + }, + showMinLabel: false, + showMaxLabel: false, }, splitLine: { show: false, diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.html b/frontend/src/app/components/pool-ranking/pool-ranking.component.html index a7df82c16..59cf0014c 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.html +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.html @@ -76,8 +76,8 @@
-
+
From 3cfd54b4c528defa1b90a381ef21ec346549b5a5 Mon Sep 17 00:00:00 2001 From: natsoni Date: Wed, 29 May 2024 10:27:45 +0200 Subject: [PATCH 2/3] Update mining dashboard graph heights --- .../mining-dashboard/mining-dashboard.component.html | 4 ++-- .../mining-dashboard/mining-dashboard.component.ts | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html index 6b37d7dd9..09479b3f1 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html @@ -29,7 +29,7 @@
@@ -41,7 +41,7 @@
diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts index 2b69d4ae0..0e0974808 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts @@ -12,7 +12,8 @@ import { EventType, NavigationStart, Router } from '@angular/router'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class MiningDashboardComponent implements OnInit, AfterViewInit { - graphHeight = 375; + hashrateGraphHeight = 335; + poolGraphHeight = 375; constructor( private seoService: SeoService, @@ -44,11 +45,14 @@ export class MiningDashboardComponent implements OnInit, AfterViewInit { @HostListener('window:resize', ['$event']) onResize(): void { if (window.innerWidth >= 992) { - this.graphHeight = 335; + this.hashrateGraphHeight = 335; + this.poolGraphHeight = 375; } else if (window.innerWidth >= 768) { - this.graphHeight = 245; + this.hashrateGraphHeight = 245; + this.poolGraphHeight = 265; } else { - this.graphHeight = 240; + this.hashrateGraphHeight = 240; + this.poolGraphHeight = 240; } } } From 83db2a3b723d69782a9fe1c6dd5610d1a19dcfc4 Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 29 May 2024 15:58:39 +0700 Subject: [PATCH 3/3] Add margin to graph on pool ranking page --- .../src/app/components/pool-ranking/pool-ranking.component.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.scss b/frontend/src/app/components/pool-ranking/pool-ranking.component.scss index 47d02f4a7..9001fc085 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.scss +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.scss @@ -24,6 +24,7 @@ @media (max-width: 767.98px) { max-height: 230px; } + margin-bottom: 20px; } .chart-widget { width: 100%;