Fix axis labels css.

Change series smooth to false.
 Make charts margin smaller to match box container.
This commit is contained in:
Miguel Medeiros 2021-09-17 09:40:51 -03:00
parent 0e25c52e67
commit 8ddcd298b0
No known key found for this signature in database
GPG Key ID: 819EDEE4673F3EBB
4 changed files with 22 additions and 5 deletions

View File

@ -99,10 +99,18 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
axisLabel: {
align: 'center',
fontSize: 11,
lineHeight: 12
},
data: this.data.labels.map((value: any) => `${formatDate(value, 'M/d', this.locale)}\n${formatDate(value, 'H:mm', this.locale)}`), data: this.data.labels.map((value: any) => `${formatDate(value, 'M/d', this.locale)}\n${formatDate(value, 'H:mm', this.locale)}`),
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLabel: {
fontSize: 11,
},
splitLine: { splitLine: {
lineStyle: { lineStyle: {
type: 'dotted', type: 'dotted',
@ -115,7 +123,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges {
{ {
data: this.data.series[0], data: this.data.series[0],
type: 'line', type: 'line',
smooth: (this.template === 'advanced') ? false : true, smooth: false,
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
width: 3, width: 3,

View File

@ -286,7 +286,12 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
{ {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
axisLine: { onZero: false }, axisLine: { onZero: true },
axisLabel: {
align: 'center',
fontSize: 11,
lineHeight: 12,
},
data: labels.map((value: any) => `${formatDate(value, 'M/d', this.locale)}\n${formatDate(value, 'H:mm', this.locale)}`), data: labels.map((value: any) => `${formatDate(value, 'M/d', this.locale)}\n${formatDate(value, 'H:mm', this.locale)}`),
} }
], ],
@ -294,6 +299,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
type: 'value', type: 'value',
axisLine: { onZero: false }, axisLine: { onZero: false },
axisLabel: { axisLabel: {
fontSize: 11,
formatter: (value: number) => (`${this.vbytesPipe.transform(value, 2, 'vB', 'MvB', true)}`), formatter: (value: number) => (`${this.vbytesPipe.transform(value, 2, 'vB', 'MvB', true)}`),
}, },
splitLine: { splitLine: {

View File

@ -45,7 +45,7 @@
[template]="'advanced'" [template]="'advanced'"
[limitFee]="500" [limitFee]="500"
[height]="500" [height]="500"
[left]="65" [left]="50"
[data]="mempoolStats" [data]="mempoolStats"
></app-mempool-graph> ></app-mempool-graph>
</div> </div>
@ -62,7 +62,7 @@
<div class="incoming-transactions-graph"> <div class="incoming-transactions-graph">
<app-incoming-transactions-graph <app-incoming-transactions-graph
[height]="500" [height]="500"
[left]="65" [left]="50"
[template]="'advanced'" [template]="'advanced'"
[data]="mempoolTransactionsWeightPerSecondData" [data]="mempoolTransactionsWeightPerSecondData"
></app-incoming-transactions-graph> ></app-incoming-transactions-graph>

View File

@ -51,6 +51,8 @@
<app-mempool-graph <app-mempool-graph
[template]="'widget'" [template]="'widget'"
[limitFee]="150" [limitFee]="150"
[left]="60"
[right]="0"
[data]="mempoolStats.mempool" [data]="mempoolStats.mempool"
></app-mempool-graph> ></app-mempool-graph>
</div> </div>
@ -65,7 +67,8 @@
<hr> <hr>
<div class="mempool-graph" *ngIf="(mempoolStats$ | async) as mempoolStats; else loadingSpinner"> <div class="mempool-graph" *ngIf="(mempoolStats$ | async) as mempoolStats; else loadingSpinner">
<app-incoming-transactions-graph <app-incoming-transactions-graph
[left]="50" [left]="35"
[right]="0"
[data]="mempoolStats.weightPerSecond" [data]="mempoolStats.weightPerSecond"
></app-incoming-transactions-graph> ></app-incoming-transactions-graph>
</div> </div>