Closed ryelle closed 3 months ago
I tested the PR; working as expected. I added a few minor comments.
As you note, we can probably make some nice improvements to these charts for readability but I also agree it's not relevant to this PR or issue.
👍
Fixes #32 — Adds a new block for the download chart. This uses google charts like the current theme, with some slight styling updates (fonts, colors).
Note: This is using
jQuery.getJSON
+jsonp
to get the data, since this endpoint doesn't haveAccess-Control-Allow-Origin: *
and I was getting cors issues when using wp.apiFetch. If that's easy to fix, this can be updated to not rely on jQuery.Screenshots
This can show up to 260 days (columns) of data, though the chart looks best when it's much smaller than that… Perhaps a future iteration could use a line chart instead?
Brand new theme, only up for 2 days:
Slightly older theme, 17 days:
Full 260 days of data (Twenty Twenty-Three)
Full 260 days of data, less popular theme, with hover state
How to test the changes in this Pull Request: