Feature/configure thousand separator in world map chart (#1588)

* Set thousandSeparator

* Update changelog
pull/1590/head
Thomas Kaul 2 years ago committed by GitHub
parent 1b899da9ff
commit aeba6e1f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Extended the landing page by a global heat map of subscribers
- Added support for the thousand separator in the global heat map component
### Changed

@ -7,6 +7,7 @@ import {
OnDestroy,
OnInit
} from '@angular/core';
import { getNumberFormatGroup } from '@ghostfolio/common/helper';
import svgMap from 'svgmap';
@Component({
@ -19,6 +20,7 @@ export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit {
@Input() countries: { [code: string]: { name?: string; value: number } };
@Input() format: string;
@Input() isInPercent = false;
@Input() locale: string;
public isLoading = true;
public svgMapElement;
@ -71,7 +73,8 @@ export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit {
applyData: 'value',
data: {
value: {
format: this.format
format: this.format,
thousandSeparator: getNumberFormatGroup(this.locale)
}
},
values: this.countries

@ -5,7 +5,6 @@ import { MatCardModule } from '@angular/material/card';
import { RouterModule } from '@angular/router';
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module';
import { GfLogoModule } from '@ghostfolio/ui/logo';
import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator';
import { GfValueModule } from '@ghostfolio/ui/value';
import { LandingPageRoutingModule } from './landing-page-routing.module';
@ -16,7 +15,6 @@ import { LandingPageComponent } from './landing-page.component';
imports: [
CommonModule,
GfLogoModule,
GfPremiumIndicatorModule,
GfValueModule,
GfWorldMapChartModule,
LandingPageRoutingModule,

@ -260,6 +260,7 @@
[countries]="countries"
[format]="worldMapChartFormat"
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView"
[locale]="user?.settings?.locale"
></gf-world-map-chart>
<div class="row">
<div class="col-xs-12 col-md-4 my-2">

Loading…
Cancel
Save