mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 11:36:07 +01:00
Update graph tick intervals - Hide label in zoom component - Show hour on 1y graphs
This commit is contained in:
parent
92d745168c
commit
28d3f190ff
4 changed files with 5 additions and 3 deletions
|
@ -446,7 +446,7 @@ class Statistics {
|
|||
public async $list6M(): Promise<OptimizedStatistic[]> {
|
||||
try {
|
||||
const connection = await DB.pool.getConnection();
|
||||
const query = this.getQueryForDaysAvg(28800, '6 MONTH'); // 8h interval
|
||||
const query = this.getQueryForDaysAvg(21600, '6 MONTH'); // 6h interval
|
||||
const [rows] = await connection.query<any>({ sql: query, timeout: this.queryTimeout });
|
||||
connection.release();
|
||||
return this.mapStatisticToOptimizedStatistic(rows);
|
||||
|
@ -459,7 +459,7 @@ class Statistics {
|
|||
public async $list1Y(): Promise<OptimizedStatistic[]> {
|
||||
try {
|
||||
const connection = await DB.pool.getConnection();
|
||||
const query = this.getQueryForDays(54000, '1 YEAR'); // 15h interval
|
||||
const query = this.getQueryForDays(43200, '1 YEAR'); // 12h interval
|
||||
const [rows] = await connection.query<any>({ sql: query, timeout: this.queryTimeout });
|
||||
connection.release();
|
||||
return this.mapStatisticToOptimizedStatistic(rows);
|
||||
|
|
|
@ -74,6 +74,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
|
|||
maxSpan: 100,
|
||||
minSpan: 10,
|
||||
}, {
|
||||
showDetail: false,
|
||||
show: (this.template === 'advanced') ? true : false,
|
||||
type: 'slider',
|
||||
brushSelect: false,
|
||||
|
|
|
@ -289,6 +289,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
|||
maxSpan: 100,
|
||||
minSpan: 10,
|
||||
}, {
|
||||
showDetail: false,
|
||||
show: (this.template === 'advanced' && this.showZoom) ? true : false,
|
||||
type: 'slider',
|
||||
brushSelect: false,
|
||||
|
|
|
@ -19,8 +19,8 @@ export const formatterXAxis = (
|
|||
case '1m':
|
||||
case '3m':
|
||||
case '6m':
|
||||
return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric' });
|
||||
case '1y':
|
||||
return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric' });
|
||||
case '2y':
|
||||
case '3y':
|
||||
return date.toLocaleDateString(locale, { year: 'numeric', month: 'short', day: 'numeric' });
|
||||
|
|
Loading…
Add table
Reference in a new issue