diff options
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r-- | plugins/ExampleUI/Controller.php | 13 | ||||
-rw-r--r-- | plugins/ExampleUI/ExampleUI.php | 4 |
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() |