Mforns has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399413 )
Change subject: Use SI number suffixes
......................................................................
Use SI number suffixes
Bug: T179906
Change-Id: I3999c4ee85db0af57c096ceb2a81d2e68a71cf5a
---
M src/App.vue
M src/components/detail/chart/BarChart.vue
2 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats2
refs/changes/13/399413/1
diff --git a/src/App.vue b/src/App.vue
index 9ac3c98..d011195 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -28,6 +28,7 @@
import Dashboard from './components/dashboard/Dashboard';
import { mapState } from 'vuex';
+import numeral from 'numeral';
/**
Although the specification for import() supports a dynamic importing of
@@ -51,6 +52,7 @@
},
mounted () {
this.isAdblockerOn() && this.warnAdBlocker();
+ this.setUpNumeralLocale();
},
methods: {
@@ -66,6 +68,21 @@
message: 'Your ad blocker is preventing Wikistats from showing
you metrics, because our API uses the word "pageview". There are no ads on any
Wikimedia sites, but to see all metrics correctly you need to disable your ad
blocker for this site.',
level: 'error'
}
+ },
+ setUpNumeralLocale() {
+ numeral.register('locale', 'international', {
+ delimiters: {
+ thousands: '',
+ decimal: '.'
+ },
+ abbreviations: {
+ thousand: 'k',
+ million: 'm',
+ billion: 'g',
+ trillion: 't'
+ }
+ });
+ numeral.locale('international');
}
},
data () {
diff --git a/src/components/detail/chart/BarChart.vue
b/src/components/detail/chart/BarChart.vue
index 08c72c7..03a3727 100644
--- a/src/components/detail/chart/BarChart.vue
+++ b/src/components/detail/chart/BarChart.vue
@@ -13,7 +13,6 @@
import _ from 'lodash';
import config from '../../../config';
-import utils from '../../../utils';
export default {
name: 'bar-chart',
--
To view, visit https://gerrit.wikimedia.org/r/399413
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3999c4ee85db0af57c096ceb2a81d2e68a71cf5a
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats2
Gerrit-Branch: master
Gerrit-Owner: Mforns <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits