Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve stats "all time" granularity / deprecated Google Charts code in yourls_google_viz_code() #2351
What is the current behavior?
The stats shown under "all time" represents more of a spot check rather than totals between each granular point.
Using a granular approach instead of an accumulation could leave out important spikes in traffic and it's not immediately obvious that the graph represents single days versus totals.
This is due to yourls_array_granularity() on line 175 functions-info.php which can simply be commented out, and commenting this out will reveal ALL days since day-0 which obviously makes the graph very busy if the time period spans several months/years.
This is a bug because…
If the granularity is every x days, then it would be more intuitive to have total clicks between each point rather than individual days as one day may misrepresent the clicks or even hide spikes altogether if the spike does not happen to fall on one granular days (which also changes over time so the graph is not reliable)
I'm describing this as a bug because it really defeats the purpose of the "all time" graph, since the graph is not reliable, changes over time, and does not reveal important spikes or trends.
ideally a total for each period instead of discarding the data before being sent to yourls_google_viz_code()
Also, not sure how this would be fixed via plugin, and since it's unwise to edit core, this brings us to an impasse
Sound arguments. I'd like to see what it would look like and see if the resulting graphs "feels" more representative.
Leaving this open for anyone willing to give it a try : edit core files and submit a couple of resulting screenshots maybe, and then if that looks neat submit your code diff as a pull request ?
Also worth mentioning is that the comment on yourls_array_granularity() ln262 in functions-infos.php points to http://code.google.com/apis/chart/formats.html#granularity and that URL shows the following warning:
Would that warrant a new bug or should we just expand the scope of this one?