diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-11-27 22:17:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-27 22:17:55 +0300 |
commit | f6a67af29558eb32b500ede0bbcbeb8b139c53b2 (patch) | |
tree | 18484e791374024cf2da0bf3d61fd5e8cd71ce07 /plugins/CoreVisualizations/Visualizations | |
parent | 5a2a0e4dd41f64a01e3427739d7594881d7ac2d7 (diff) |
Minor tweaks and events in Goals UI (#10903)
* added some goal events
* add new method to be able to add post params
* post events via angular
* make sure promo message is always shown at the end
* .travis.yml file is out of date, auto-updating .travis.yml file.
* improve sparklines view and make goals page hookable
* .travis.yml file is out of date, auto-updating .travis.yml file.
* .travis.yml file is out of date, auto-updating .travis.yml file.
* fix system tests
* make sure each goal has an id in the table so we can target them
Diffstat (limited to 'plugins/CoreVisualizations/Visualizations')
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/Sparklines.php | 2 | ||||
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/Sparklines/Config.php | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/Sparklines.php b/plugins/CoreVisualizations/Visualizations/Sparklines.php index 8ee6f60401..b0f8fbfcac 100644 --- a/plugins/CoreVisualizations/Visualizations/Sparklines.php +++ b/plugins/CoreVisualizations/Visualizations/Sparklines.php @@ -80,6 +80,8 @@ class Sparklines extends ViewDataTable $view->sparklines = $this->config->getSortedSparklines(); $view->isWidget = Common::getRequestVar('widget', 0, 'int'); $view->titleAttributes = $this->config->title_attributes; + $view->footerMessage = $this->config->show_footer_message; + $view->areSparklinesLinkable = $this->config->areSparklinesLinkable(); $view->title = ''; if ($this->config->show_title) { diff --git a/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php b/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php index a4dae712db..09e687fd4a 100644 --- a/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php +++ b/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php @@ -34,6 +34,12 @@ class Config extends \Piwik\ViewDataTable\Config private $sparklines = array(); /** + * If false, will not link them with any evolution graph + * @var bool + */ + private $evolutionGraphLinkable = true; + + /** * Adds possibility to set html attributes on the sparklines title / headline. For example can be used * to set an angular directive * @var string @@ -263,6 +269,25 @@ class Config extends \Piwik\ViewDataTable\Config } /** + * If there are sparklines and evolution graphs on one page, we try to connect them so that when you click on a + * sparkline, the evolution graph will update and show the evolution for that sparkline metric. In some cases + * we might falsely connect sparklines with an evolution graph that don't belong together. In this case you can + * mark all sparklines as "not linkable". This will prevent the sparklines being linked with an evolution graph. + */ + public function setNotLinkableWithAnyEvolutionGraph() + { + $this->evolutionGraphLinkable = false; + } + + /** + * Detect whether sparklines are linkable with an evolution graph. {@link setNotLinkableWithAnyEvolutionGraph()} + */ + public function areSparklinesLinkable() + { + return $this->evolutionGraphLinkable; + } + + /** * @return array * @ignore */ |