The original sparkline library wasn't updated for 12 years. The original author has written a new version, but it is intended to be used as a standalone file: https://github.com/jamiebicknell/Sparkline
But there is another modern php library which creates similar sparklines:
I also tried to improve the color scheme but I am open for improvements.
Unfortunately it doesn't support adding dots, so there are no minimum/maximum points anymore (But I am not sure how useful they are)
This definitely needs some testing before merging, as I don't know all variants of sparklines in piwik.
Oddly the only failing tests have nothing to do with this change.
are there no ui tests of the all websites overview?
It seems like the sparklines aren't visible on the UI tests.
Seems like now random other things aren't working:
And I guess there was a reason for
\Piwik\Visualization\Sparkline::$enableSparklineImages = false;
as the test ran endlessly:
the reason the sparklines are disabled in UI tests is because GD library generating the images used to generate different images (looking the same, but different bytes), depending on the GD library. And it was difficult to force developers to run the same version of GD locally as on travis CI. For sure It would be better if we could test sparklines in UI tests...
the min/max dots are in my opinion quite useful to have as it helps scan the sparklines quickly and provides insights
Objectclass to another name to fix the issue, and keep our current sparklines with the min/max dots?
Those min/max dots should not be the only reason not to search for a new library. We should avoid to continue using such an old and not maintained library.
I would agree with renaming the Object class to have a quick fix for PHP 7.2. But we should still consider replacing the old lib.