diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index a84cc797b..408fdd014 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -288,7 +288,6 @@ class BlocksRepository { LIMIT 10`; try { - console.log(query, params); const [rows] = await DB.query(query, params); const blocks: BlockExtended[] = []; diff --git a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts index 205699505..a64c7e36e 100644 --- a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts +++ b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts @@ -100,7 +100,21 @@ export class BlockFeesGraphComponent implements OnInit { } prepareChartOptions(data) { + let title: object; + if (data.blockFees.length === 0) { + title = { + textStyle: { + color: 'grey', + fontSize: 15 + }, + text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`, + left: 'center', + top: 'center' + }; + } + this.chartOptions = { + title: title, color: [ new graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: '#FDD835' }, @@ -159,7 +173,7 @@ export class BlockFeesGraphComponent implements OnInit { hideOverlap: true, } }, - legend: { + legend: data.blockFees.length === 0 ? undefined : { data: [ { name: 'Fees BTC', @@ -179,7 +193,7 @@ export class BlockFeesGraphComponent implements OnInit { }, ], }, - yAxis: [ + yAxis: data.blockFees.length === 0 ? undefined : [ { type: 'value', axisLabel: { @@ -210,7 +224,7 @@ export class BlockFeesGraphComponent implements OnInit { }, }, ], - series: [ + series: data.blockFees.length === 0 ? undefined : [ { legendHoverLink: false, zlevel: 0, @@ -240,7 +254,7 @@ export class BlockFeesGraphComponent implements OnInit { } }, ], - dataZoom: [{ + dataZoom: data.blockFees.length === 0 ? undefined : [{ type: 'inside', realtime: true, zoomLock: true, diff --git a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts index a5ff99cd9..5cd9feea2 100644 --- a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts +++ b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts @@ -98,9 +98,23 @@ export class BlockRewardsGraphComponent implements OnInit { } prepareChartOptions(data) { + let title: object; + if (data.blockRewards.length === 0) { + title = { + textStyle: { + color: 'grey', + fontSize: 15 + }, + text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`, + left: 'center', + top: 'center' + }; + } + const scaleFactor = 0.1; this.chartOptions = { + title: title, animation: false, color: [ new graphic.LinearGradient(0, 0, 0, 1, [ @@ -159,7 +173,7 @@ export class BlockRewardsGraphComponent implements OnInit { hideOverlap: true, } }, - legend: { + legend: data.blockRewards.length === 0 ? undefined : { data: [ { name: 'Rewards BTC', @@ -179,7 +193,7 @@ export class BlockRewardsGraphComponent implements OnInit { }, ], }, - yAxis: [ + yAxis: data.blockRewards.length === 0 ? undefined : [ { type: 'value', axisLabel: { @@ -222,7 +236,7 @@ export class BlockRewardsGraphComponent implements OnInit { }, }, ], - series: [ + series: data.blockRewards.length === 0 ? undefined : [ { legendHoverLink: false, zlevel: 0, @@ -251,7 +265,7 @@ export class BlockRewardsGraphComponent implements OnInit { } }, ], - dataZoom: [{ + dataZoom: data.blockRewards.length === 0 ? undefined : [{ type: 'inside', realtime: true, zoomLock: true,