diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2022-01-17 03:58:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 03:58:28 +0300 |
commit | 104b6f66e622b406daf9eaa0117ac114292995b9 (patch) | |
tree | ffa997d114be318a42b5e3a202c1a75913075225 /plugins | |
parent | d1989fe093f6d8ab325cf24573479f280b7df928 (diff) |
Force period type to 'range' if date is a range when checking chart incomplete periods (#18629)
* Force date range period type when checking for graph incomplete periods if a date range is supplied
* Bug fix
* Update plugins/CoreVisualizations/javascripts/jqplot.js
Co-authored-by: Justin Velluppillai <justin@innocraft.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreVisualizations/javascripts/jqplot.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/CoreVisualizations/javascripts/jqplot.js b/plugins/CoreVisualizations/javascripts/jqplot.js index 279e31ab92..1e9ccac4bd 100644 --- a/plugins/CoreVisualizations/javascripts/jqplot.js +++ b/plugins/CoreVisualizations/javascripts/jqplot.js @@ -383,7 +383,13 @@ function rowEvolutionGetMetricNameFromRow(tr) this.jqplotParams['incompleteDataPoints'] = 0; var piwikPeriods = piwikHelper.getAngularDependency('piwikPeriods'); - if (piwikPeriods.parse(this.param.period, this.param.date).containsToday()) { + + var period = this.param.period; + // If date is actually a range then adjust the period type for the containsToday check + if (period === 'day' && this.param.date.indexOf(',') !== -1) { + period = 'range'; + } + if (piwikPeriods.parse(period, this.param.date).containsToday()) { this.jqplotParams['incompleteDataPoints'] = 1; } |