diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-01-05 04:21:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 04:21:48 +0300 |
commit | 65faef9b341e61466e53678dcc1df7a949c7428c (patch) | |
tree | 66d52b3a9e072738a30dff4f2f077dfa5fa83aeb /plugins/VisitsSummary/Reports/Get.php | |
parent | 185e41fe7717d0018cec7deb073d0cfc5de8334f (diff) |
Remove sparkline tooltips on visits summary (#17040)
* Make it possible to overwrite metric documentations for sparklines
* Remove metric tooltips for visitsummary sparklines
Diffstat (limited to 'plugins/VisitsSummary/Reports/Get.php')
-rw-r--r-- | plugins/VisitsSummary/Reports/Get.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/plugins/VisitsSummary/Reports/Get.php b/plugins/VisitsSummary/Reports/Get.php index 2e667caa14..364224921c 100644 --- a/plugins/VisitsSummary/Reports/Get.php +++ b/plugins/VisitsSummary/Reports/Get.php @@ -82,8 +82,7 @@ class Get extends \Piwik\Plugin\Report $this->addSparklineColumns($view); $view->config->addTranslations($this->getSparklineTranslations()); - $numberFormatter = NumberFormatter::getInstance(); - $view->config->filters[] = function (DataTable $table) use ($view, $numberFormatter) { + $view->config->filters[] = function (DataTable $table) use ($view) { $firstRow = $table->getFirstRow(); if (($firstRow->getColumn('nb_pageviews') @@ -103,6 +102,25 @@ class Get extends \Piwik\Plugin\Report $view->config->replaceSparklineMetric(array('nb_users'), ''); } }; + + // Remove metric tooltips + $view->config->metrics_documentation['nb_actions'] = ''; + $view->config->metrics_documentation['nb_visits'] = ''; + $view->config->metrics_documentation['nb_users'] = ''; + $view->config->metrics_documentation['nb_uniq_visitors'] = ''; + $view->config->metrics_documentation['avg_time_generation'] = ''; + $view->config->metrics_documentation['avg_time_on_site'] = ''; + $view->config->metrics_documentation['max_actions'] = ''; + $view->config->metrics_documentation['nb_actions_per_visit'] = ''; + $view->config->metrics_documentation['nb_downloads'] = ''; + $view->config->metrics_documentation['nb_uniq_downloads'] = ''; + $view->config->metrics_documentation['nb_outlinks'] = ''; + $view->config->metrics_documentation['nb_uniq_outlinks'] = ''; + $view->config->metrics_documentation['nb_keywords'] = ''; + $view->config->metrics_documentation['nb_searches'] = ''; + $view->config->metrics_documentation['nb_pageviews'] = ''; + $view->config->metrics_documentation['nb_uniq_pageviews'] = ''; + $view->config->metrics_documentation['bounce_rate'] = ''; } } |