From 8626ed55f20ae71f1b2f725d5e0fa39769bacae2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Sep 2019 15:26:32 +0200 Subject: [PATCH 1/2] transaction fee chart changes --- server/controllers/BlockchainKernel.ts | 6 +++--- server/i18n/de.json | 6 +++--- server/i18n/en.json | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/controllers/BlockchainKernel.ts b/server/controllers/BlockchainKernel.ts index e2c92a8..5485680 100644 --- a/server/controllers/BlockchainKernel.ts +++ b/server/controllers/BlockchainKernel.ts @@ -658,8 +658,8 @@ export class BlockchainKernelController { } const TransactionFeeQuery = await getConnection(Global.network) .query( - "select 1 as hash, date(DATE_TRUNC('day', timestamp)) as date, sum(fee)/1000000 as fee \ - from blockchain_block t1 join blockchain_kernel t2 on t2.block_id=t1.hash where " + + "select 1 as hash, date(DATE_TRUNC('day', timestamp)) as date, avg(fee)/1000000000 as fee \ + from blockchain_block t1 join blockchain_kernel t2 on t2.block_id=t1.hash where fee > 0 and " + timeIntervalQry + "group by DATE_TRUNC('day', timestamp) order by date", ) @@ -670,7 +670,7 @@ export class BlockchainKernelController { Fee = []; TransactionFeeQuery.forEach(e => { date.push(moment(e.date).format('YYYY-MM-DD')); - Fee.push(parseInt(e.fee)); + Fee.push(e.fee); }); if(date.length == 0){ diff --git a/server/i18n/de.json b/server/i18n/de.json index 6de7357..0528b24 100644 --- a/server/i18n/de.json +++ b/server/i18n/de.json @@ -3,7 +3,7 @@ "transactions-over-time" : "Transaktionen im Zeitverlauf", "blocks-by-algorithm" : "Blöcke nach Algorithmus", "blocks" : "Blöcke", - "transaction-fees" : "Transkationsgebühren", + "transaction-fees" : "durchschnittliche Transaktionsgebühr", "supply-growth" : "Angebotswachstum", "blocks-mined" : "Blöcke abgebaut", "hashrate-growth-chart" : "HashRate-Wachstumstabelle", @@ -47,13 +47,13 @@ "BLOCKSINTERVAL" : "Sperrintervall", "SUPPLY_GROWTH_HOVER" : "Aktuelle Blockbelohnung", "BOCKS_COUNT_HOVER" : "Anzahl der letzten 24h Blöcke", - "TRANSACTION_FEE_HOVER" : "Heute Transaktionsgebühren insgesamt", + "TRANSACTION_FEE_HOVER" : "24h Durchschnittsgebühr", "BLOCK_INTERVAL_HOVER" : "Heute Blockintervall in Sekunden", "TRANSACTION_LINECHAT_HOVER" : "Heute Gesamtzahl der Transaktionen", "BLOCK_INTERVAL_BW_BLOCKS_HOVER" : "Letztes Blockintervall in Sekunden", "BLOCK" : "Block", "BLOCKS_MINED" : "Blöcke abgebaut", - "TRANSACTION_FEES" : "Transkationsgebühren", + "TRANSACTION_FEES" : "durchschnittliche Transaktionsgebühr", "SUPPLY_GROWTH" : "Angebotswachstum", "HASHRATE_GROWTH_CHART" : "HashRate-Wachstumstabelle", "BLOCK_INTERVAL" : "Durchschnittliches Sperrintervall", diff --git a/server/i18n/en.json b/server/i18n/en.json index f6f81a2..13b903c 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -3,7 +3,7 @@ "transactions-over-time" : "Transactions over time", "blocks-by-algorithm" : "Blocks by Algorithm", "blocks" : "Blocks", - "transaction-fees" : "Transaction Fees", + "transaction-fees" : "Average Transaction Fee", "supply-growth" : "Supply Growth", "blocks-mined" : "Blocks Mined", "hashrate-growth-chart" : "HashRate Growth Chart", @@ -47,13 +47,13 @@ "BLOCKSINTERVAL" : "Block Interval", "SUPPLY_GROWTH_HOVER" : "Current Block Reward", "BOCKS_COUNT_HOVER" : "Last 24h Blocks Count", - "TRANSACTION_FEE_HOVER" : "Today Total Transaction Fees", + "TRANSACTION_FEE_HOVER" : "24h Avg Fee", "BLOCK_INTERVAL_HOVER" : "Today Block Interval in Secs", "TRANSACTION_LINECHAT_HOVER" : "Today Total Transaction Count", "BLOCK_INTERVAL_BW_BLOCKS_HOVER" : "Last Block Interval in Secs", "BLOCK" : "Block", "BLOCKS_MINED" : "Blocks Mined", - "TRANSACTION_FEES" : "Transaction Fees", + "TRANSACTION_FEES" : "Average Transaction Fee", "SUPPLY_GROWTH" : "Supply Growth", "HASHRATE_GROWTH_CHART" : "HashRate Growth Chart", "BLOCK_INTERVAL" : "Avg Block Interval", From 6753f00e49a8394151ab35c8b801d241aace5998 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Sep 2019 16:13:46 +0200 Subject: [PATCH 2/2] change graph type --- src/app/view/home/graph-list/graph-list.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/view/home/graph-list/graph-list.component.ts b/src/app/view/home/graph-list/graph-list.component.ts index 0cb3242..32c5323 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -937,8 +937,10 @@ export class GraphListComponent implements OnInit { { x: gDate, y: gaddedreward, - type: 'scatter', - mode: 'lines', + // type: 'scatter', + // mode: 'lines', + fill: 'tozeroy', + type: 'line', name: '', line: { color: '#17BECF',