Added virtual bytes pipe for mempool graph in television view.
fixes #14 fixes #12
This commit is contained in:
parent
9cfee07f47
commit
a6badfa40a
@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, LOCALE_ID, Inject, Renderer2 } from '@angular/core';
|
import { Component, OnInit, LOCALE_ID, Inject, Renderer2 } from '@angular/core';
|
||||||
import { ApiService } from '../services/api.service';
|
import { ApiService } from '../services/api.service';
|
||||||
import { formatDate } from '@angular/common';
|
import { formatDate } from '@angular/common';
|
||||||
import { BytesPipe } from '../shared/pipes/bytes-pipe/bytes.pipe';
|
import { VbytesPipe } from '../shared/pipes/bytes-pipe/vbytes.pipe';
|
||||||
|
|
||||||
import * as Chartist from 'chartist';
|
import * as Chartist from 'chartist';
|
||||||
import { IMempoolStats } from '../blockchain/interfaces';
|
import { IMempoolStats } from '../blockchain/interfaces';
|
||||||
@ -22,7 +22,7 @@ export class TelevisionComponent implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
@Inject(LOCALE_ID) private locale: string,
|
@Inject(LOCALE_ID) private locale: string,
|
||||||
private bytesPipe: BytesPipe,
|
private vbytesPipe: VbytesPipe,
|
||||||
private memPoolService: MemPoolService,
|
private memPoolService: MemPoolService,
|
||||||
private renderer: Renderer2,
|
private renderer: Renderer2,
|
||||||
) { }
|
) { }
|
||||||
@ -48,7 +48,7 @@ export class TelevisionComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
axisY: {
|
axisY: {
|
||||||
labelInterpolationFnc: (value: number): any => {
|
labelInterpolationFnc: (value: number): any => {
|
||||||
return this.bytesPipe.transform(value);
|
return this.vbytesPipe.transform(value, 2);
|
||||||
},
|
},
|
||||||
offset: 160
|
offset: 160
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user