diff --git a/assets/js/dashboard/stats/locations/map.js b/assets/js/dashboard/stats/locations/map.js index 8be7dba6c..4ec1a0ca1 100644 --- a/assets/js/dashboard/stats/locations/map.js +++ b/assets/js/dashboard/stats/locations/map.js @@ -56,7 +56,7 @@ class Countries extends React.Component { ]) this.state.countries.forEach(function(item){ - dataset[item.name] = {numberOfThings: item.visitors, fillColor: paletteScale(item.visitors)}; + dataset[item.code] = {numberOfThings: item.visitors, fillColor: paletteScale(item.visitors)}; }); return dataset @@ -69,7 +69,7 @@ class Countries extends React.Component { } fetchCountries() { - return api.get(`/api/stats/${encodeURIComponent(this.props.site.domain)}/countries`, this.props.query) + return api.get(`/api/stats/${encodeURIComponent(this.props.site.domain)}/countries`, this.props.query, {limit: 300}) .then((res) => this.setState({loading: false, countries: res})) } @@ -100,8 +100,8 @@ class Countries extends React.Component { if (!data) { return null; } const pluralizedLabel = data.numberOfThings === 1 ? label.slice(0, -1) : label return ['
', - '', geo.properties.name, '', - '
', numberFormatter(data.numberOfThings), '', pluralizedLabel, + '', geo.properties.name, ' ', + '
', numberFormatter(data.numberOfThings), ' ', pluralizedLabel, '
'].join(''); } },