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:
authordiosmosis <benakamoorthi@fastmail.fm>2013-12-09 23:20:11 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-12-09 23:20:11 +0400
commit53005c87136f00ff2c353f6a3b4458c1dd7a9c3f (patch)
tree7efa7e2f0fc0113b8f27c6970b038115aaa80895 /plugins/ExampleUI
parent4080ffb4b7a835d1d65c88a96886bbbda1edd600 (diff)
Add treemap example to ExampleUI plugin.
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r--plugins/ExampleUI/Controller.php13
-rw-r--r--plugins/ExampleUI/ExampleUI.php4
2 files changed, 17 insertions, 0 deletions
diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php
index 8279334292..c6f94b5aea 100644
--- a/plugins/ExampleUI/Controller.php
+++ b/plugins/ExampleUI/Controller.php
@@ -183,4 +183,17 @@ class Controller extends \Piwik\Plugin\Controller
return $view->render();
}
+
+ public function treemap()
+ {
+ $view = ViewDataTableFactory::build(
+ 'infoviz-treemap', 'ExampleUI.getTemperatures', $controllerAction = 'ExampleUI.treemap');
+
+ $view->config->translations['value'] = "Temperature";
+ $view->config->columns_to_display = array("value");
+ $view->config->selectable_columns = array("value");
+ $view->config->show_evolution_values = 0;
+
+ return $view->render();
+ }
}
diff --git a/plugins/ExampleUI/ExampleUI.php b/plugins/ExampleUI/ExampleUI.php
index 79b79d7d81..11b567c00e 100644
--- a/plugins/ExampleUI/ExampleUI.php
+++ b/plugins/ExampleUI/ExampleUI.php
@@ -39,6 +39,10 @@ class ExampleUI extends \Piwik\Plugin
$this->addSubMenu('Tag clouds', 'tagClouds', 4);
$this->addSubMenu('Sparklines', 'sparklines', 5);
$this->addSubMenu('Evolution Graph', 'evolutionGraph', 6);
+
+ if (class_exists("Piwik\\Plugins\\TreemapVisualization\\Treemap")) {
+ $this->addSubMenu('Treemap', 'treemap', 7);
+ }
}
function addTopMenuItems()