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:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-08-27 05:19:21 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-08-27 05:19:21 +0400
commitd30d252c71ad56f95979113e4b1a67846d715134 (patch)
tree5c9c470a1eb358ba785d147367d0c5f164cbce19 /plugins/CoreVisualizations
parent6aa3a44dd6d15aa2b4b455565fa84612d10e7dc8 (diff)
Refs #4077, add series picker to treemap visualization and add column value to treemap node tooltip.
Diffstat (limited to 'plugins/CoreVisualizations')
-rw-r--r--plugins/CoreVisualizations/javascripts/seriesPicker.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/CoreVisualizations/javascripts/seriesPicker.js b/plugins/CoreVisualizations/javascripts/seriesPicker.js
index 9dc7493527..dc77c6b95c 100644
--- a/plugins/CoreVisualizations/javascripts/seriesPicker.js
+++ b/plugins/CoreVisualizations/javascripts/seriesPicker.js
@@ -19,7 +19,8 @@
* events before calling 'init':
*
* 'placeSeriesPicker': Triggered after the DOM element for the series picker link is created.
- * You can use this event to position the link however you want to.
+ * You must use this event to add the link to the dataTable. YOu can also
+ * use this event to position the link however you want.
*
* Callback Signature: function () {}
*
@@ -115,6 +116,22 @@
},
/**
+ * Returns the translation of a metric that can be selected.
+ *
+ * @param {String} metric The name of the metric, ie, 'nb_visits' or 'nb_actions'.
+ * @return {String} The metric translation. If one cannot be found, the metric itself
+ * is returned.
+ */
+ getMetricTranslation: function (metric) {
+ for (var i = 0; i != this.selectableColumns.length; ++i) {
+ if (this.selectableColumns[i].column == metric) {
+ return this.selectableColumns[i].translation;
+ }
+ }
+ return metric;
+ },
+
+ /**
* Creates the popover DOM element, binds event handlers to it, and then displays it.
*/
_showPicker: function () {