Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not fully ready for merging. I'm making a pull request because I'm a little stuck on how to hide/show the download csv button depending on the chart conditions. I know there is a 'can_be_shown_as_table' variable in charts, but it's always undefined by the time the table is being rendered... quite sure I'm missing something obvious here 🙃.
I could implement a solution based on the type of chart being rendered, but it feels like the long way around. Maybe you know how this works @noracato?
Everything else is working quite well - this solution is only for charts that can be viewed as tables currently - you can download the other chart data but it's never really pretty.
P.s. - This method (from base_chart_view.coffee) looks like it's for updating the icons depending on conditions? Played around with this but I couldn't even get it to trigger with console.logs, nor find the download_csv element.