jagomf / countries-map

World countries datamaps component for Angular
MIT License
12 stars 5 forks source link

country names not showing on the map #36

Closed wajaiye closed 1 year ago

wajaiye commented 2 years ago

the map does not show the name of the country even though my data specifies it

mapData: CountriesData = { 'US': { 'value': 225, 'extra': { 'countryLabel': 'United States', 'showCaption': 'true' } }

};

<countries-map *ngIf="progress" [data]="mapData" (chartSelect)="select($event)" (chartError)="error($event)" (chartReady)="ready()">

jagomf commented 1 year ago

Attributes countryLabel and showCaption belong to the component and not to CountriesData interface:

mapData: CountriesData = {
  'US': { 'value': 225 }
};
<countries-map *ngIf="progress" [data]="mapData" (chartSelect)="select($event)" (chartError)="error($event)" (chartReady)="ready()" countryLabel="Country data" [showCaption]="true">

Attribute countryLabel might have a misleading name; it just sets a label on top of the data selected for countries. Please check demo project embedded in src/app.