Add default data to title tooltip MM/dd HH:mm.

Add symbol to tx chart tooltip .
This commit is contained in:
Miguel Medeiros 2021-08-26 23:29:39 -03:00
parent 3574f8639e
commit 1a7decb91d
No known key found for this signature in database
GPG Key ID: 819EDEE4673F3EBB
2 changed files with 4 additions and 16 deletions

View File

@ -68,7 +68,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 80; obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 80;
return obj; return obj;
}, },
extraCssText: `width: ${(['2h', '24h'].includes(this.windowPreference) || this.size === 'small') ? '105px' : '135px'}; extraCssText: `width: ${(['2h', '24h'].includes(this.windowPreference) || this.size === 'small') ? '125px' : '135px'};
background: transparent; background: transparent;
border: none; border: none;
box-shadow: none;`, box-shadow: none;`,
@ -83,7 +83,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
itemFormatted += `<div class="item"> itemFormatted += `<div class="item">
${colorSpan(item.color)} ${colorSpan(item.color)}
<div class="grow"></div> <div class="grow"></div>
<div class="value">${item.value}</div> <div class="value">${item.value} <span class="symbol">vB/s</span></div>
</div>`; </div>`;
} }
}); });
@ -92,13 +92,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.data.labels.map((value: any) => { data: this.data.labels.map((value: any) => formatDate(value, 'MM/dd - HH:mm', this.locale)),
if (['2h', '24h'].includes(this.windowPreference) || this.size === 'small') {
return formatDate(value, 'HH:mm', this.locale);
} else {
return formatDate(value, 'MM/dd - HH:mm', this.locale);
}
}),
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',

View File

@ -204,13 +204,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
axisLine: { onZero: false }, axisLine: { onZero: false },
data: labels.map((value: any) => { data: labels.map((value: any) => formatDate(value, 'MM/dd - HH:mm', this.locale)),
if (['2h', '24h'].includes(this.windowPreference) || this.size === 'small') {
return formatDate(value, 'HH:mm', this.locale);
} else {
return formatDate(value, 'MM/dd - HH:mm', this.locale);
}
}),
} }
], ],
yAxis: { yAxis: {