ankane / chartkick

Create beautiful JavaScript charts with one line of Ruby

Home Page:https://chartkick.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make chart download link image visible at all times

stephenhighemprise opened this issue · comments

I appreciate the client-side ability to download an image file of the chart. The problem is that discoverability is lower than we would like because the user must hover the mouse over the chart area to even see that download image appear. So not so great on desktop and impossible to download on mobile. I noticed that the styles are hardcoded here:

link.style.position = "absolute";

At the very least, it would be great to have an option to pass in a boolean to control whether or not the download link is always visible. Another idea is to pass in styles or classes for it.

+1. A little bit more configuration options around download would be great. Specifically, my clients would like a big ol' "Download" button separate from the canvas entirely, it would be nice to be able to retrieve the base 64-encoded URL in some way for use elsewhere on the page.

all good