Changes updated
This commit is contained in:
parent
ee2506ceab
commit
c5d643212e
@ -1224,7 +1224,7 @@ export class BlockchainBlockController {
|
||||
}
|
||||
const BlockQuery = await getConnection(Global.network)
|
||||
.query(
|
||||
"SELECT bb.height, coalesce(max(bb.alter), 0) as alter, bb.timestamp FROM (SELECT height, EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter, timestamp FROM blockchain_block where timestamp::date = date '"+IntervalDate+"' order by height asc) as bb group by bb.height , bb.timestamp;",
|
||||
"SELECT bb.height, coalesce(max(bb.alter), 0) as alter, bb.timestamp FROM (SELECT height, EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter, timestamp FROM blockchain_block where timestamp::date = date '"+IntervalDate+"' AND height != 0 order by height asc) as bb group by bb.height , bb.timestamp;",
|
||||
)
|
||||
.catch(err_msg => {
|
||||
next(err_msg);
|
||||
@ -1944,7 +1944,7 @@ let remaining_height = 0;
|
||||
"select date(DATE_TRUNC('day', timestamp)) as date, count(hash) as blocks, 86400/count(hash) as period \
|
||||
from blockchain_block where " +
|
||||
timeIntervalQry +
|
||||
"group by DATE_TRUNC('day', timestamp) order by date",
|
||||
"AND height != 0 group by DATE_TRUNC('day', timestamp) order by date",
|
||||
)
|
||||
.catch(err_msg => {
|
||||
next(err_msg);
|
||||
|
@ -567,7 +567,8 @@ export class GraphListComponent implements OnInit {
|
||||
let BlocksChartHeight = res.response.Blocks;
|
||||
let Blockval = res.response.alter;
|
||||
this.blockinteval_last = Blockval[Blockval.length - 1];
|
||||
this.BlocksIntevalFunc(BlocksChartHeight, Blockval);
|
||||
var range = [ BlocksChartHeight[0], BlocksChartHeight[BlocksChartHeight.length-1] ];
|
||||
this.BlocksIntevalFunc(BlocksChartHeight, Blockval, range);
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
@ -791,7 +792,7 @@ export class GraphListComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
BlocksIntevalFunc(BlocksChartHeight, Blockval) {
|
||||
BlocksIntevalFunc(BlocksChartHeight, Blockval, range) {
|
||||
this.barGraphIntevalData = {
|
||||
data: [
|
||||
{
|
||||
@ -820,6 +821,7 @@ export class GraphListComponent implements OnInit {
|
||||
showlegend: false,
|
||||
xaxis: {
|
||||
tickangle: -45,
|
||||
range: range,
|
||||
showgrid: true,
|
||||
title: 'Block Height',
|
||||
rangemode: 'nonnegative',
|
||||
|
Loading…
Reference in New Issue
Block a user