codespeed icon indicating copy to clipboard operation
codespeed copied to clipboard

[WIP] Add links to export codespeed charts as PNGs

Open str4d opened this issue 6 years ago • 6 comments

Closes #134

str4d avatar Aug 23 '17 18:08 str4d

The scaling of the rendered image is currently off; the graph and axis labels are rendered larger than the axes and tick labels, causing the graph to appear truncated.

str4d avatar Aug 23 '17 18:08 str4d

Very good! So jqplot has this functionality after all.

This renders properly for me, can you please paste your png?

Also, the new link reads "PNG permalink". I'd put the link somewhere else closer to the graph.

tobami avatar Aug 25 '17 07:08 tobami

This renders properly for me, can you please paste your png?

Here's the regular timeline view (data from the Zcash codespeed instance):

codespeed-timeline

And the result of clicking on the PNG link:

codespeed-timeline-png

Also, the new link reads "PNG permalink". I'd put the link somewhere else closer to the graph.

Force-pushed to fix this; it now displays down beside the plot description in a button-like UI element. I've also pulled it over to the comparisons page plots.

str4d avatar Aug 25 '17 10:08 str4d

The rendering issue above is in Firefox 55.0.2 (on Ubuntu 16.0.4.3 LTS). Interestingly, I just tried using it in Chrome 60.0.3112.101 and it doesn't work at all for security reasons:

Not allowed to navigate top frame to data URL: <URL>

Pushing another commit that works around this using an iframe.

str4d avatar Aug 25 '17 10:08 str4d

Hmm, this is also insufficient - the iframe in the new tab looks fine on Firefox but starts out with zero height in Chrome. Opening the dev console fixes the iframe height in Chrome. Also in the timeline view, the page is reset to showing the default (grid) view.

str4d avatar Aug 25 '17 10:08 str4d

Ouch, isn't there another workaround not using an iframe?

tobami avatar Aug 26 '17 09:08 tobami