abalone icon indicating copy to clipboard operation
abalone copied to clipboard

Add key reports

Open CraigJZ opened this issue 4 years ago • 8 comments

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.

CraigJZ avatar Sep 11 '21 18:09 CraigJZ

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

vurtn avatar Sep 29 '21 13:09 vurtn

@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 avatar Oct 08 '21 01:10 CraigJZ

@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 avatar Oct 18 '21 18:10 mattwd7

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

mattwd7 avatar Oct 18 '21 18:10 mattwd7

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.

CraigJZ avatar Oct 19 '21 01:10 CraigJZ

Any update from our users regarding screenshot @CraigJZ?

mattwd7 avatar Nov 03 '21 16:11 mattwd7

@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 avatar Nov 04 '21 23:11 CraigJZ

@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. :tada:

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.

CraigJZ avatar Nov 17 '21 00:11 CraigJZ