Browse Source

Fix negative zero

pull/8043/head
Thomas Kaul 2 weeks ago
parent
commit
e7726b269d
  1. 10
      libs/ui/src/lib/treemap-chart/treemap-chart.component.ts

10
libs/ui/src/lib/treemap-chart/treemap-chart.component.ts

@ -422,11 +422,6 @@ export class GfTreemapChartComponent
const netPerformanceInPercentageWithSign = `${sign}${(netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%`; const netPerformanceInPercentageWithSign = `${sign}${(netPerformancePercentWithCurrencyEffect * 100).toFixed(2)}%`;
if (raw._data.valueInBaseCurrency !== null) { if (raw._data.valueInBaseCurrency !== null) {
const netPerformanceWithCurrencyEffect = this.getRoundedValue({
precision: 2,
value: raw._data.netPerformanceWithCurrencyEffect
});
const value = raw._data.valueInBaseCurrency; const value = raw._data.valueInBaseCurrency;
return [ return [
@ -437,11 +432,12 @@ export class GfTreemapChartComponent
})} ${this.baseCurrency()}`, })} ${this.baseCurrency()}`,
'', '',
$localize`Change` + ' (' + $localize`Performance` + ')', $localize`Change` + ' (' + $localize`Performance` + ')',
`${sign}${netPerformanceWithCurrencyEffect.toLocaleString( `${raw._data.netPerformanceWithCurrencyEffect.toLocaleString(
this.locale(), this.locale(),
{ {
maximumFractionDigits: 2, maximumFractionDigits: 2,
minimumFractionDigits: 2 minimumFractionDigits: 2,
signDisplay: 'exceptZero'
} }
)} ${this.baseCurrency()} (${netPerformanceInPercentageWithSign})` )} ${this.baseCurrency()} (${netPerformanceInPercentageWithSign})`
]; ];

Loading…
Cancel
Save