Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support histogram download in SVG/JPG/PNG? #62

Open
carmen-tm opened this issue Feb 5, 2020 · 8 comments
Open

Support histogram download in SVG/JPG/PNG? #62

carmen-tm opened this issue Feb 5, 2020 · 8 comments
Labels
Milestone

Comments

@carmen-tm
Copy link
Member

Might be quite useful for users/ourselves (instead of taking screenshots) but I don't know how easy is to be implemented.

@carmen-tm
Copy link
Member Author

carmen-tm commented Feb 5, 2020

  • Here an example of exporting to png.
  • Here an example of downloading as svg file.

@carmen-tm carmen-tm added this to the Launch milestone Feb 10, 2020
@carmen-tm
Copy link
Member Author

carmen-tm commented Feb 10, 2020

I actually need the histogram charts (with its styles, and in svg format) of each vignette to make some quick annotations in them on Illustrator.
I found more possible ways of implementing this in VERBA as a 'SVG download button' (like this one), but by now I'm just gonna use this simple svg-grabber chrome extension and copy/paste the CSS chart styles on the svg code.

@carmen-tm
Copy link
Member Author

carmen-tm commented Feb 10, 2020

The svg-grabber chrome-extension solution is not good, as many styles are defined directly on the d3-js code... (font sizes, removing axis elements, etc etc).
I need a better solution to make this easier.

@carmen-tm
Copy link
Member Author

carmen-tm commented Feb 10, 2020

I found this newyorktimes bookmarklet solution much better as it takes the CSS styles.

Here is a forked version of that repo, that could be very useful if we want to add a 'download as SVG' which I think would be very useful for users/journalists and ourselves.

But for now, I carry on with #58 using the NYT bookmarklet trick.

@carmen-tm
Copy link
Member Author

(I was talking with @anerodata about this, and we were saying that might be interesting to give the 'download as svg' a try, as might be quite useful for journalists re-publishing Verba results in their media. What do you think @dcabo ?)

@dcabo
Copy link
Member

dcabo commented Feb 11, 2020

If I understood the last link correctly, that's just another (improved) bookmarklet. So it wouldn't offer users the functionality to download as SVG, it requires them to install the bookmarklet.

I'm not an expert in this, I just know that when we did Onodo there wasn't a simple solution. I had a quick look around again. Some things I found:

  • To download as SVG, there' this, for example. But it's not done in the client. Instead, it's a tool you run to download from a website.

  • Downloading as PNG may be easier (and it's potentially more useful to "normal people"). I tried this block and it worked both in my desktop and mobile browsers. Not sure how well it works when there's CSS around. But it's maybe the best place to start.

@dcabo
Copy link
Member

dcabo commented Feb 11, 2020

Ok, I hadn't seen the first link about "downloading as PNG", we found the same thing. ;)

@dcabo
Copy link
Member

dcabo commented Feb 16, 2020

Esto no va a estar en el lanzamiento, lo saco del milestone.

@dcabo dcabo modified the milestones: Launch, Verba 1.1 Feb 16, 2020
@dcabo dcabo added the ui label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants