currencyPipe fixed

This commit is contained in:
piratefinn 2017-11-15 13:46:34 +00:00
parent 3a0cf4c8dc
commit 65f149c0f8
7 changed files with 17 additions and 17 deletions

View file

@ -4,7 +4,7 @@
<i [ngClass]="graphIcon"></i>
</button>
<h4 *ngIf="dataType == availableDataTypes.number" class="mb-0">{{ graphSum }}</h4>
<h4 *ngIf="dataType == availableDataTypes.currency" class="mb-0">{{ graphSum | currency:'GBP':true:'1.2-2' }}</h4>
<h4 *ngIf="dataType == availableDataTypes.currency" class="mb-0">{{ graphSum | currency:'GBP':'symbol':'1.2-2' }}</h4>
<p>{{ graphTitle }}</p>
</div>
<div class="chart-wrapper px-3" style="height:70px;">

View file

@ -137,7 +137,7 @@ export class GraphWidget implements OnInit {
private tooltipLabelCallback(tooltipItem: any, data: any) {
const value = tooltipItem.yLabel;
if ( this.dataType === DataType.currency ) {
return this.currencyPipe.transform(value, 'GBP', true, '1.2-2');
return this.currencyPipe.transform(value, 'GBP', 'symbol', '1.2-2');
}
return value || '0';
}