From fb556099963ffe4da75e3002ef4e1e0d067004a8 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Mon, 4 Oct 2021 21:06:07 +0200 Subject: [PATCH] Convert value --- .../world-map-chart/world-map-chart.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts b/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts index 3b2f3b72a..22e4adc66 100644 --- a/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts +++ b/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts @@ -54,6 +54,13 @@ export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit { ((this.countries[country].value * 100) / sum).toFixed(2) ); }); + } else { + // Convert value to fixed-point notation + Object.keys(this.countries).map((country) => { + this.countries[country].value = Number( + this.countries[country].value.toFixed(2) + ); + }); } this.svgMapElement = new svgMap({