Adding mini-graphs on dashboard.

This commit is contained in:
softsimon
2020-09-26 22:46:26 +07:00
parent eea77ca863
commit 4bfaabbb5f
13 changed files with 148 additions and 37 deletions

View File

@@ -52,10 +52,10 @@ export class StatisticsComponent implements OnInit {
ngOnInit() {
this.seoService.setTitle('Graphs');
this.stateService.networkChanged$.subscribe((network) => this.network = network);
const isMobile = window.innerWidth <= 767.98;
const labelHops = isMobile ? 12 : 6;
const labelInterpolationFnc = (value: any, index: any) => {
const nr = 6;
switch (this.radioGroupForm.controls.dateSpan.value) {
case '2h':
case '24h':
@@ -71,7 +71,7 @@ export class StatisticsComponent implements OnInit {
value = formatDate(value, 'dd/MM', this.locale);
}
return index % nr === 0 ? value : null;
return index % labelHops === 0 ? value : null;
};
this.transactionsWeightPerSecondOptions = {