-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add possibility to switch period in evolution graph #13689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -515,6 +527,12 @@ public function __construct() | |||
Metrics::getDefaultProcessedMetrics() | |||
); | |||
|
|||
$periodValidator = new PeriodValidator(); | |||
$this->selectable_periods = $periodValidator->getPeriodsAllowedForUI(); | |||
$this->selectable_periods = array_diff($this->selectable_periods, array('range')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this filtering also be done before rendering? For example, if someone sets the periods to ['day', 'week', 'garbage', 'range']
, should we remove the values that aren't allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have said it's not needed maybe cause a plugin might support it but not actually implement it fully in Matomo but that shouldn't be an issue I suppose. I think the feature usually won't be used so wouldn't do too much about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
Fix #955
re-used the calendar icon. same period will be applied in export dialog. won't work for range dates just like the limit selector.