Changes updated
This commit is contained in:
parent
ee2506ceab
commit
c5d643212e
@ -1224,7 +1224,7 @@ export class BlockchainBlockController {
|
|||||||
}
|
}
|
||||||
const BlockQuery = await getConnection(Global.network)
|
const BlockQuery = await getConnection(Global.network)
|
||||||
.query(
|
.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 => {
|
.catch(err_msg => {
|
||||||
next(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 \
|
"select date(DATE_TRUNC('day', timestamp)) as date, count(hash) as blocks, 86400/count(hash) as period \
|
||||||
from blockchain_block where " +
|
from blockchain_block where " +
|
||||||
timeIntervalQry +
|
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 => {
|
.catch(err_msg => {
|
||||||
next(err_msg);
|
next(err_msg);
|
||||||
|
@ -567,7 +567,8 @@ export class GraphListComponent implements OnInit {
|
|||||||
let BlocksChartHeight = res.response.Blocks;
|
let BlocksChartHeight = res.response.Blocks;
|
||||||
let Blockval = res.response.alter;
|
let Blockval = res.response.alter;
|
||||||
this.blockinteval_last = Blockval[Blockval.length - 1];
|
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();
|
resolve();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -791,7 +792,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
BlocksIntevalFunc(BlocksChartHeight, Blockval) {
|
BlocksIntevalFunc(BlocksChartHeight, Blockval, range) {
|
||||||
this.barGraphIntevalData = {
|
this.barGraphIntevalData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -820,6 +821,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
showlegend: false,
|
showlegend: false,
|
||||||
xaxis: {
|
xaxis: {
|
||||||
tickangle: -45,
|
tickangle: -45,
|
||||||
|
range: range,
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
title: 'Block Height',
|
title: 'Block Height',
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
|
Loading…
Reference in New Issue
Block a user