#595·chartkick

Make chart download link image visible at all times

Author: stephenhighempriseCreated Aug 3, 2022Updated Jul 28, 2023

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:

https://github.com/ankane/chartkick/blob/4ad0c0bce42a5b0ea0c011d8d51dc8f5949d1ef8/vendor/assets/javascripts/chartkick.js#L1841

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.