From 15a61b7a20a8f2c987672c3c2d6a716a87f46508 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 4 Oct 2021 21:22:42 +0200 Subject: [PATCH] Feature/improve values of global heat map (#408) * Convert value * Update changelog --- CHANGELOG.md | 4 ++++ .../world-map-chart/world-map-chart.component.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a16c6485..27cbc0cb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- Changed the values of the global heat map to fixed-point notation + ### Fixed - Fixed the links of cryptocurrency assets in the positions table 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({