diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2022-05-31 14:55:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 14:55:13 +0300 |
commit | 9a7dd7d9fdce120c80dc82ea77019e8c1a489af0 (patch) | |
tree | eecc765c193fe6a6a0a7a7eeadb4dc6e676c56c6 /plugins/CoreVisualizations | |
parent | 5ee8fb2829302b9d84549faacc2137039f21bc75 (diff) |
Fix for missing formatting of conversion rate on goals reports (#19295)
* Fix missing formatting of conversion_rate on goals reports
* try to solve problem with API.get report
* updates expected test files
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreVisualizations')
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/Sparklines.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/Sparklines.php b/plugins/CoreVisualizations/Visualizations/Sparklines.php index fac81dd033..402d92d322 100644 --- a/plugins/CoreVisualizations/Visualizations/Sparklines.php +++ b/plugins/CoreVisualizations/Visualizations/Sparklines.php @@ -252,7 +252,10 @@ class Sparklines extends ViewDataTable [$compareValues, $compareDescriptions, $evolutions] = $this->getValuesAndDescriptions($compareRow, $columnToUse, '_change', '_trend'); foreach ($compareValues as $i => $value) { - if ($columnMetrics[$columnToUse[$i]]) { + if (!isset($column[$i])) { + continue; + } + if (isset($columnMetrics[$column[$i]]) && $columnMetrics[$column[$i]]) { $value = $columnMetrics[$columnToUse[$i]]->format($value, $metricFormatter); } elseif (strpos($columnToUse[$i], 'revenue') !== false && $idSite > 0) { $value = $metricFormatter->getPrettyMoney($value, $idSite); |