Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add a Select list in the graph footer, to select periods to plot: 30, 100, 365 #2159

Closed
mattab opened this Issue · 11 comments

2 participants

Matthieu Aubry Benaka
Matthieu Aubry
Owner

It would be nice to view in the graph, the number of visits for the last 300 days for example. Currently the graphs only show last 30 days / weeks / months / years.

All pages supporting sparklines + graph (overview type pages) would benefit from this new feature, as well as widgets in the dashboard.

This could be implemented as a Select list / legend next to the icons.

This is similar to the ticket "add a select list to choose which column to plot" in #1820

refs #3110

Matthieu Aubry
Owner

Nice we could now reuse the new UI element (to select number of rows) that would, when an evolution graph is displayed, change the number of days/weeks/months plotted on the graph from the default 30. That would be beautiful!!

Matthieu Aubry
Owner

This will be awesome in the widgets on dashboard, in all evolution graphs in reports (including Row Evolution!)

Benaka
Collaborator

Attachment: Patch for this issue.
2159.diff.tar.gz

Benaka
Collaborator

I've uploaded a patch for this issue. Let me know what you think of it.

Some notes:

  • This reuses the filter_limit dropdown.
  • There are several other bug fixes in here.
Benaka
Collaborator

(In [7068]) Fixes #2159, allow limit dropdown to be used with evolution graphs (including row evolution).

Notes:

  • Bug fix for RowEvolution.php: length of evolution was one date too long.
  • Added new query parameters: evolution_{$period}_last_n
  • Bug fix for ViewDataTable::setColumnsToDisplay, column array should be filtered before being set.
  • Removed default value for idGoal parameter for AddColumnsProcessedMetricsGoal filter.
  • Bug fix for Period/Range.php: lastN should be decremented AFTER it is checked for the max value.
  • Bug fix for Period/Range.php (in fillArraySubPeriods): fix issue when determining subperiods for range of weeks.
Matthieu Aubry
Owner

(In [7070]) Refs #2159 fixing notice

Matthieu Aubry
Owner

Very nice new little feature & commit, kuddos Benaka!

PS: I am still curious as to why the smarty notices don't display in your server, hopefully we find the solution in the future as to prevent these NOTICEs!

Matthieu Aubry
Owner

Questions:

  • when is the following code path triggered?
if (Piwik_Period_Range::parseDateRange($this->originalDate)) // if a multiple period 

My understanding was that in the UI we would not work on multiple periods ?

Matthieu Aubry
Owner

(In [7075]) Refs #2159

  • Fixing RowEvolution popover click on selector: Warning:</strong> <i>array_keys() expects parameter 1 to be array, null given</i>
  • Changing default monthly to show 2 years history
  • Simplifying code of getXAxisStepSize() since it seemed too complicated ;)
  • removing incorrect title which was always "Showing evolution over last 30 $period"
Benaka
Collaborator

Replying to matt:

Questions:

  • when is the following code path triggered?
if (Piwik_Period_Range::parseDateRange($this->originalDate)) // if a multiple period 

My understanding was that in the UI we would not work on multiple periods ?

It's a sanity check to cover the case if multiple dates are passed instead of a single date + evolution_{$period}_last_n.

Matthieu Aubry
Owner

(In [7425]) fixes regression: exporting below the graph should export all periods displayed in the graph (using the rewritten &date=)
refs #2159

Matthieu Aubry mattab added this to the 1.9 -- Piwik 1.9 milestone
Benaka diosmosis was assigned by mattab
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.