From 25c55b53a264595eaa94d5ae8b4781a8c0c78e03 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 11 Apr 2022 21:17:15 +0900 Subject: [PATCH] Set zlevel for all graphs series --- .../components/hashrate-chart/hashrate-chart.component.ts | 7 ++++++- .../hashrate-chart-pools.component.ts | 8 ++++++-- .../incoming-transactions-graph.component.ts | 1 + .../components/mempool-graph/mempool-graph.component.ts | 1 + .../app/components/pool-ranking/pool-ranking.component.ts | 1 + frontend/src/app/components/pool/pool.component.ts | 4 ++++ 6 files changed, 19 insertions(+), 3 deletions(-) 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 f4e8e871c..4cac95557 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -227,6 +227,9 @@ export class HashrateChartComponent implements OnInit { xAxis: data.hashrates.length === 0 ? undefined : { type: 'time', splitNumber: (this.isMobile() || this.widget) ? 5 : 10, + axisLabel: { + hideOverlap: true, + } }, legend: (this.widget || data.hashrates.length === 0) ? undefined : { data: [ @@ -265,7 +268,7 @@ export class HashrateChartComponent implements OnInit { formatter: (val) => { const selectedPowerOfTen: any = selectPowerOfTen(val); const newVal = Math.round(val / selectedPowerOfTen.divider); - return `${newVal} ${selectedPowerOfTen.unit}H/s` + return `${newVal} ${selectedPowerOfTen.unit}H/s`; } }, splitLine: { @@ -293,6 +296,7 @@ export class HashrateChartComponent implements OnInit { ], series: data.hashrates.length === 0 ? [] : [ { + zlevel: 0, name: 'Hashrate', showSymbol: false, symbol: 'none', @@ -303,6 +307,7 @@ export class HashrateChartComponent implements OnInit { }, }, { + zlevel: 1, yAxisIndex: 1, name: 'Difficulty', showSymbol: false, 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 7dc12c313..85bea9840 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 @@ -86,6 +86,7 @@ export class HashrateChartPoolsComponent implements OnInit { const legends = []; for (const name in grouped) { series.push({ + zlevel: 0, stack: 'Total', name: name, showSymbol: false, @@ -95,7 +96,7 @@ export class HashrateChartPoolsComponent implements OnInit { lineStyle: { width: 0 }, areaStyle: { opacity: 1 }, smooth: true, - color: poolsColor[name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase()], + color: poolsColor[name.replace(/[^a-zA-Z0-9]/g, '').toLowerCase()], emphasis: { disabled: true, scale: false, @@ -199,7 +200,10 @@ export class HashrateChartPoolsComponent implements OnInit { }, xAxis: data.series.length === 0 ? undefined : { type: 'time', - splitNumber: (this.isMobile()) ? 5 : 10, + splitNumber: this.isMobile() ? 5 : 10, + axisLabel: { + hideOverlap: true, + } }, legend: (this.isMobile() || data.series.length === 0) ? undefined : { data: data.legends diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts index af188bbb3..89a089f06 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts @@ -157,6 +157,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges { }, series: [ { + zlevel: 0, data: this.data.series[0], type: 'line', smooth: false, diff --git a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts index f290d91ca..3b4e18fb4 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -122,6 +122,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { if (index >= this.feeLimitIndex) { newColors.push(this.chartColorsOrdered[index]); seriesGraph.push({ + zlevel: 0, name: this.feeLevelsOrdered[index], type: 'line', stack: 'fees', 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 4ec12fde4..95c2be2b7 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -214,6 +214,7 @@ export class PoolRankingComponent implements OnInit { }, series: [ { + zlevel: 0, minShowLabelAngle: 3.6, name: 'Mining pool', type: 'pie', diff --git a/frontend/src/app/components/pool/pool.component.ts b/frontend/src/app/components/pool/pool.component.ts index 764601a64..4d41c2437 100644 --- a/frontend/src/app/components/pool/pool.component.ts +++ b/frontend/src/app/components/pool/pool.component.ts @@ -167,6 +167,9 @@ export class PoolComponent implements OnInit { xAxis: { type: 'time', splitNumber: (this.isMobile()) ? 5 : 10, + axisLabel: { + hideOverlap: true, + } }, yAxis: [ { @@ -189,6 +192,7 @@ export class PoolComponent implements OnInit { ], series: [ { + zlevel: 0, name: 'Hashrate', showSymbol: false, symbol: 'none',