Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2019-09-21 04:03:47 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-09-21 04:03:47 +0300
commitcb97621911bed774b9f0c3a7d52d4cb0db38ee89 (patch)
treeaaddb808d13d57dd3b305a720c7537fb49752730 /plugins/UserCountryMap/javascripts/visitor-map.js
parentf3dc40b93b9e67ec51b0d829966b7f2e82e1e953 (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/visitor-map.js')
-rw-r--r--plugins/UserCountryMap/javascripts/visitor-map.js5
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; });