Skip to content

Update Stats page to allow easy download of graphs #1301

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

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

rileyhgrant
Copy link
Contributor

@rileyhgrant rileyhgrant commented Nov 16, 2023

Resolves #1265

Adds a button to allow easy downloads of graphs on the stats page

@rileyhgrant rileyhgrant self-assigned this Nov 16, 2023
@mattsolo1
Copy link
Contributor

Works as expected!

The download button is huge, and most visitors will not want to download anything. What do you think about adding a more subtle icon? We already have an icon package installed (font awesome). Here are some options: https://fontawesome.com/search?q=download&o=r&m=free. I was thinking maybe it would fit in the legend or next to the title (see below)?

A few other general points about the plot (not related to downloading). @sambaxter do you have feedback?

  • Normally people expect graphs to have titles. Perhaps something like "Sample size across major ExAC/gnomAD releases"
  • Would be cool if the year of each was release was included below the release title to emphasize the long history of the project (2014, 2016, 2019, 2023)
  • There is no Y axis label... should it be "Number of samples"?
  • There is a point where the text overlaps:

image

Could set the minimum width of this plot to be larger?

@rileyhgrant
Copy link
Contributor Author

Thanks for the feedback, the button is pretty huge and imposing. I'll make it more subtle and incorporate your other suggestions.

@rileyhgrant rileyhgrant force-pushed the stats-downloadable-graphs branch from c72e98e to ea32ff1 Compare January 2, 2024 14:13
@rileyhgrant
Copy link
Contributor Author

rileyhgrant commented Jan 2, 2024

Updated with:

  • Smaller download button with icon (next to title)
  • Added prop for title so all bar graphs have a title
    • id of element and download are now generated by slugifying the title of the graph
  • Cleaning up: defined y axis for graphs, used same small download icon on tables, added titles to all graphs, set min width on first graph to prevent text overlap

Screenshot 2024-01-02 at 15 06 07

Adding years to the first graph below the datasets is certainly doable, but would take a bit longer due to the way X band scale works, for now I haven't added it but if we really want it I could get to it.

@rileyhgrant rileyhgrant requested a review from mattsolo1 January 2, 2024 20:08
@rileyhgrant rileyhgrant force-pushed the stats-downloadable-graphs branch from 963bf3f to b2432e8 Compare February 1, 2024 16:57
@rileyhgrant rileyhgrant merged commit 915aeb2 into main Feb 1, 2024
@rileyhgrant rileyhgrant deleted the stats-downloadable-graphs branch February 1, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Stats page bar charts easily downloadable
2 participants