|
|
@ -21,7 +21,7 @@ import svgMap from 'svgmap'; |
|
|
export class GfWorldMapChartComponent implements OnChanges, OnDestroy { |
|
|
export class GfWorldMapChartComponent implements OnChanges, OnDestroy { |
|
|
@Input() countries: { [code: string]: { name?: string; value: number } }; |
|
|
@Input() countries: { [code: string]: { name?: string; value: number } }; |
|
|
@Input() format: string; |
|
|
@Input() format: string; |
|
|
@Input() isInPercent = false; |
|
|
@Input() isInPercentage = false; |
|
|
@Input() locale = getLocale(); |
|
|
@Input() locale = getLocale(); |
|
|
|
|
|
|
|
|
public isLoading = true; |
|
|
public isLoading = true; |
|
|
@ -47,7 +47,7 @@ export class GfWorldMapChartComponent implements OnChanges, OnDestroy { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private initialize() { |
|
|
private initialize() { |
|
|
if (this.isInPercent) { |
|
|
if (this.isInPercentage) { |
|
|
// Convert value of countries to percentage
|
|
|
// Convert value of countries to percentage
|
|
|
let sum = 0; |
|
|
let sum = 0; |
|
|
Object.keys(this.countries).map((country) => { |
|
|
Object.keys(this.countries).map((country) => { |
|
|
|