Browse Source

Fix percent formatting in treemap chart

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

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

@ -397,7 +397,12 @@ export class GfTreemapChartComponent
label: (context: TooltipItem<'treemap'>) => {
const raw = context.raw as GfTreemapDataPoint;
const allocationInPercentage = `${(raw._data.allocationInPercentage * 100).toFixed(2)}%`;
const allocationInPercentage = `${(
raw._data.allocationInPercentage * 100
).toLocaleString(this.locale(), {
maximumFractionDigits: 2,
minimumFractionDigits: 2
})}%`;
const name = getHoldingName(raw._data.assetProfile);
const netPerformanceInPercentageWithSign = `${(

Loading…
Cancel
Save