Fix y axis margin left.

This commit is contained in:
Miguel Medeiros 2021-09-07 23:08:24 -03:00
parent 34695146ee
commit 388aa7fbe3
No known key found for this signature in database
GPG key ID: 819EDEE4673F3EBB
3 changed files with 6 additions and 11 deletions

View file

@ -45,7 +45,7 @@
[template]="'advanced'" [template]="'advanced'"
[limitFee]="500" [limitFee]="500"
[height]="500" [height]="500"
[left]="50" [left]="65"
[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]="50" [left]="65"
[template]="'advanced'" [template]="'advanced'"
[data]="mempoolTransactionsWeightPerSecondData" [data]="mempoolTransactionsWeightPerSecondData"
></app-incoming-transactions-graph> ></app-incoming-transactions-graph>

View file

@ -1,6 +1,5 @@
import { Component, OnInit, LOCALE_ID, Inject } from '@angular/core'; import { Component, OnInit, LOCALE_ID, Inject } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { formatDate } from '@angular/common';
import { FormGroup, FormBuilder } from '@angular/forms'; import { FormGroup, FormBuilder } from '@angular/forms';
import { of, merge} from 'rxjs'; import { of, merge} from 'rxjs';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
@ -31,7 +30,6 @@ export class StatisticsComponent implements OnInit {
mempoolTransactionsWeightPerSecondData: any; mempoolTransactionsWeightPerSecondData: any;
radioGroupForm: FormGroup; radioGroupForm: FormGroup;
inverted: boolean;
graphWindowPreference: String; graphWindowPreference: String;
constructor( constructor(
@ -48,7 +46,6 @@ export class StatisticsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.seoService.setTitle($localize`:@@5d4f792f048fcaa6df5948575d7cb325c9393383:Graphs`); this.seoService.setTitle($localize`:@@5d4f792f048fcaa6df5948575d7cb325c9393383:Graphs`);
this.stateService.networkChanged$.subscribe((network) => this.network = network); this.stateService.networkChanged$.subscribe((network) => this.network = network);
this.inverted = this.storageService.getValue('inverted-graph') === 'true';
this.graphWindowPreference = this.storageService.getValue('graphWindowPreference') ? this.storageService.getValue('graphWindowPreference').trim() : '2h'; this.graphWindowPreference = this.storageService.getValue('graphWindowPreference') ? this.storageService.getValue('graphWindowPreference').trim() : '2h';
const isMobile = window.innerWidth <= 767.98; const isMobile = window.innerWidth <= 767.98;
let labelHops = isMobile ? 48 : 24; let labelHops = isMobile ? 48 : 24;
@ -124,11 +121,6 @@ export class StatisticsComponent implements OnInit {
}; };
} }
invertGraph() {
this.storageService.setValue('inverted-graph', !this.inverted);
document.location.reload();
}
saveGraphPreference() { saveGraphPreference() {
this.storageService.setValue('graphWindowPreference', this.radioGroupForm.controls.dateSpan.value); this.storageService.setValue('graphWindowPreference', this.radioGroupForm.controls.dateSpan.value);
} }

View file

@ -64,7 +64,10 @@
<br> <br>
<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 [data]="mempoolStats.weightPerSecond"></app-incoming-transactions-graph> <app-incoming-transactions-graph
[left]="50"
[data]="mempoolStats.weightPerSecond"
></app-incoming-transactions-graph>
</div> </div>
</div> </div>
</div> </div>