Skip to content

Commit

Permalink
Don't force using day period for sparkline when comparing to ensure i…
Browse files Browse the repository at this point in the history
…t compares correct periods (#20094)

Since we merged #20090 when comparing dates we no longer need to force day periods when comparing date ranges since we're ensuring the correct period is being used in the Sparklines visualisation.

Co-authored-by: sgiehl <stefan@matomo.org>
  • Loading branch information
tsteur and sgiehl committed Dec 12, 2022
1 parent 3a7c847 commit 5054eea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/CoreVisualizations/Visualizations/Sparkline.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public function render()
$period = Common::getRequestVar('period');
$date = Common::getRequestVar('date');

if ($period == 'range'
|| $this->isComparing()
) {
if ($period == 'range') {
$periodObj = Period\Factory::build($period, $date);
$_GET['period'] = 'day';
$_GET['date'] = $periodObj->getRangeString();
Expand Down

0 comments on commit 5054eea

Please sign in to comment.