datopian / datahub-qa

:package: Bugs, issues and suggestions for datahub.io
https://datahub.io/
32 stars 6 forks source link

Embedded views in a form of PNG, not iFrame script #153

Closed AcckiyGerman closed 6 years ago

AcckiyGerman commented 6 years ago

To be Analysed:

There is a button - download plot as PNG and when you click it - the JS script makes a PNG image and download form is started in browser - so user could download the image itself. We could modify the Frontend server, so when somebody goes on, say https://datahub.io/core/finance-vix/view/0.png - server runs the same method and returns the fresh PNG image, that was created by the view script So user could just paste the links anywhere, even in Markdown like

[some graph](https://datahub.io/examples/datahub-qa-issues-tracker/view/0.png)

and it will be always up-to date :grinning:

Expected behavior

@anuveyatsu WDYT?

AcckiyGerman commented 6 years ago

Anuar Ustayev @anuveyatsu 08:30 yes, but this solution is only about simple (plotly) graphs. We also have Vega views (+vega-lite) and handsontable. In general, we want the solution to be library independant. here are examples of vega: http://datahub.io/examples/vega-views-tutorial-lines http://datahub.io/examples/vega-views-tutorial-grouping http://datahub.io/examples/vega-views-tutorial-topojson

Dima German @AcckiyGerman 08:32 so Vega have no such button, that's pity (

Anuar Ustayev @anuveyatsu 08:33 @AcckiyGerman I think solution should be library agnostic, e.g., read HTML then convert to PNG

Irakli Mchedlishvili @zelima 08:34 Agree with @anuveyatsu

AcckiyGerman commented 6 years ago

WONTFIX as hard to implement without a strong need.

anuveyatsu commented 6 years ago

@AcckiyGerman I think this is at least a good issue to have so let's keep it open. We also have done some analysis for it here - https://github.com/datahq/frontend/issues/92 - and we also wanted SVG along with PNG :)

anuveyatsu commented 6 years ago

This is now FIXED