diff options
author | Stefan Giehl <stefan@matomo.org> | 2019-09-21 04:03:47 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-09-21 04:03:47 +0300 |
commit | cb97621911bed774b9f0c3a7d52d4cb0db38ee89 (patch) | |
tree | aaddb808d13d57dd3b305a720c7537fb49752730 /plugins/UserCountryMap/javascripts | |
parent | f3dc40b93b9e67ec51b0d829966b7f2e82e1e953 (diff) |
Fix percentage calculation on world map (#14852)
* Fix percentage calculation on world map
* remove no longer used vars
Diffstat (limited to 'plugins/UserCountryMap/javascripts')
-rw-r--r-- | plugins/UserCountryMap/javascripts/visitor-map.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/UserCountryMap/javascripts/visitor-map.js b/plugins/UserCountryMap/javascripts/visitor-map.js index 3fe3baf80e..5747fd3d30 100644 --- a/plugins/UserCountryMap/javascripts/visitor-map.js +++ b/plugins/UserCountryMap/javascripts/visitor-map.js @@ -81,7 +81,6 @@ var mapContainer = $$('.UserCountryMap_map').get(0), map = self.map = $K.map(mapContainer), main = $$('.UserCountryMap_container'), - worldTotalVisits = 0, width = main.width(), _ = config._; @@ -197,7 +196,7 @@ if (metric.substr(0, 3) == 'nb_' && metric != 'nb_actions_per_visit') { var total; if (id.length == 3) total = UserCountryMap.countriesByIso[id][metric]; - else if (id == 'world') total = _worldTotal; + else if (id == 'world') total = self.config.visitsSummary[metric]; else { total = 0; $.each(UserCountryMap.countriesByIso, function (iso, country) { @@ -1225,9 +1224,7 @@ }); countryData.push(country); countriesByIso[country.iso] = country; - worldTotalVisits += country['nb_visits']; }); - _worldTotal = worldTotalVisits; // sort countries by name countryData.sort(function (a, b) { return a.name > b.name ? 1 : -1; }); |