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

Add key reports #795

Open
5 tasks
CraigJZ opened this issue Sep 11, 2021 · 8 comments
Open
5 tasks

Add key reports #795

CraigJZ opened this issue Sep 11, 2021 · 8 comments

Comments

@CraigJZ
Copy link
Collaborator

CraigJZ commented Sep 11, 2021

Pinto Abalone would like an option to export charts created in Blazer and both stakeholders would like a way to quickly view key reports without having to enter the Blazer interface. We are exploring 2 pathways on this issue. Thank you to @vurtn for researching the options available (see comments below).

The 3 reports we would like to start with are listed in these issues:
#788
#789
#791

Option 1:

  • Implement a sustainable way to capture Blazer reports for export/download
  • Add a Key Reports navigation item that includes links to 3 key reports in Blazer. These links would be different for each organization

Option 2:

  • Introduce a new charting library to can be used to replicate existing reports that have already been created in Blazer. Blazer would continue to offer the flexibility of creating queries on the fly. This library would provide a quick view and export option for reports that are of particular interest to a stakeholder. Reports Kit is already installed from when we explored it as an alternative to Blazer. Chartkick is maintained by the same person who maintains Blazer.
  • Add 3 key reports
  • Add Key Reports navigation item that includes links to the 3 reports. These reports will be different for each organization.

Potentially, the structure that comes out of this could be used in the future for ad-hoc data reports that simply combine existing data into views that the stakeholders need. For example, combining animal data with mortality event data to report on the time in facility for all the animals in a cohort or enclosure.

@vurtn
Copy link
Contributor

vurtn commented Sep 29, 2021

Hello,
Sorry for my english.

I looked in the documentation of blazer (and a little of google-fu) and it does not seem impossible to me to export charts (I am discovering at the same time the library).

On the github account of the person who seems to me to be the author of Blazer (Ankane), there is another library to generate charts called Chartkick [1]. If we look at the documentation of this library we see that it is possible to download the graphs in images when Chartkick is coupled with Chart.js [2].

EDIT: There is maybe another way : export the the drawing on the canvas to an image with html2canvas [3]. That's allow us to keep blazer and add html2canvas dependency. There is also getDisplayMedia of WebRTC on this tutorial. Each have pro and cons.

Cheers and stay safe.

References :
[1] https://github.com/ankane/chartkick
[2] https://chartkick.com/#download-charts
[3] https://hackernoon.com/how-to-take-screenshots-in-the-browser-using-javascript-l92k3xq7

@CraigJZ
Copy link
Collaborator Author

CraigJZ commented Oct 8, 2021

@vurtn My apologies for the delayed reply. Thank you for researching this and identifying some options. This is very helpful. I will spend some time looking over these options and then update this issue.

@CraigJZ CraigJZ mentioned this issue Oct 9, 2021
1 task
@CraigJZ CraigJZ changed the title Find out if we can export charts from Blazer or provide an external link to them Add key reports Oct 9, 2021
@mattwd7
Copy link

mattwd7 commented Oct 18, 2021

@CraigJZ Blazer has a concept of "dashboards" which sounds very similar to the request here (see screenshot). We can even link to the user-created dashboard of "Key Reports" from a dropdown in the menubar, and from there users can click into a report to download a .csv or screenshot the generated graph. What do you make of this?

@mattwd7
Copy link

mattwd7 commented Oct 18, 2021

Screen Shot 2021-10-18 at 1 55 39 PM

@CraigJZ
Copy link
Collaborator Author

CraigJZ commented Oct 19, 2021

Thanks @mattwd7. I would prefer this option of being able to link over to Blazer (either a dashboard or individual queries) to having to bring in another charting library. I think the key challenge is the chart download. I'd like to find a way to make it easier for users to download the charts in an image or pdf format, but I'll also look into how viable taking a screenshot would be for the users.

@mattwd7
Copy link

mattwd7 commented Nov 3, 2021

Any update from our users regarding screenshot @CraigJZ?

@CraigJZ
Copy link
Collaborator Author

CraigJZ commented Nov 4, 2021

@mattwd7 Thanks for checking back in and sorry I missed this yesterday. I'm meeting with them next week and this is on the agenda for us to discuss, so I should have an update soon. 😄

@CraigJZ
Copy link
Collaborator Author

CraigJZ commented Nov 17, 2021

@mattwd7 I discussed these options with the Pinto group. The proposed option of creating a dashboard of the key reports and linking to it from the nav will work for them, at least in the short term. Grabbing a screen shot will work too. 🎉

Separate from this, they are also going to look into using the available csv export of the query results to use with R visualizations for cases where a screenshot may not be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants