Bug 13219 - Add graphs to guided reports
Summary: Add graphs to guided reports
Status: RESOLVED DUPLICATE of bug 17282
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Gracie
QA Contact: Testopia
URL:
Keywords: Academy
Depends on: 9915
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-07 09:33 UTC by Martin Renvoize
Modified: 2018-02-12 20:35 UTC (History)
15 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Charts: Added Charts.js javascript charting library (51.18 KB, patch)
2014-11-07 09:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Added Charts to issues report (1.91 KB, patch)
2014-11-07 09:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Added color to charts (4.51 KB, patch)
2014-11-07 09:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Added line/bar switch (2.53 KB, patch)
2014-11-07 09:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Added graphs to cataloging report (6.40 KB, patch)
2014-11-07 09:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13219: Charts: Added Charts.js javascript charting library (51.25 KB, patch)
2015-06-02 17:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13219: Added Charts to issues report (2.00 KB, patch)
2015-06-02 17:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13219: Added color to charts (4.60 KB, patch)
2015-06-02 17:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13219: Added line/bar switch (2.61 KB, patch)
2015-06-02 17:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13219: Added graphs to cataloging report (6.48 KB, patch)
2015-06-02 17:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 13219: (followup) remove tabs and console messages (3.68 KB, patch)
2015-06-02 17:07 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2014-11-07 09:33:24 UTC
Everybody likes a pretty graph ;)

This patch adds the lightweight Charts.js javascript chart library and implements a couple of example charts on some guided reports.
Comment 1 Martin Renvoize 2014-11-07 09:35:58 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize 2014-11-07 09:36:01 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize 2014-11-07 09:36:03 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize 2014-11-07 09:36:06 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize 2014-11-07 09:36:09 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2014-11-11 07:22:05 UTC
Please add a test plan to make this easier to test! :)
Comment 7 Martin Renvoize 2014-11-11 09:37:58 UTC
Lol.. it's a bit of a proof of concept at the minute so I hadn't gotten around to a test plan.. Sorry ;)

Test Plan:

Pre patches, there won't be any graphs anywhere ;)
Post patches, Run through 'Statistics Wizards -> Circulation', you should now get a pretty graph as part of the result.
              Run through 'Statistics Wizards -> Catalog', you shold now get a pretty graph as part of the result.

It's a proof of concept for now really.
Comment 8 Martin Renvoize 2015-01-06 14:06:00 UTC
This could be a good one for the catalyst academy to extend upon :)
Comment 9 Katrin Fischer 2015-05-14 22:04:31 UTC
Shoudl this be needs sign-off?
Comment 10 Bernardo Gonzalez Kriegel 2015-06-02 15:26:26 UTC
Hey, nice graphs :)
There are some easy to fix tabs, but don't know what to do with this

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt
   FAIL   forbidden patterns
                forbidden pattern: console.log (line 301)
   OK     tt_valid
   OK     valid_template

 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
   FAIL   forbidden patterns
                forbidden pattern: console.log (line 323)
   OK     tt_valid
   OK     valid_template
Comment 11 Martin Renvoize 2015-06-02 16:49:36 UTC
This was more a code example than a submission to be honest ;)

However, the console log lines could be easily removed to clean up the qa warns.. they're only browser logging to show what's going on so someone might take the example code and apply it to more guided reports.

Wan't me to tidy it up a bit?
Comment 12 Bernardo Gonzalez Kriegel 2015-06-02 16:51:32 UTC
(In reply to Martin Renvoize from comment #11)
> This was more a code example than a submission to be honest ;)
> 
> However, the console log lines could be easily removed to clean up the qa
> warns.. they're only browser logging to show what's going on so someone
> might take the example code and apply it to more guided reports.
> 
> Wan't me to tidy it up a bit?

No problem :)
I'll remove tabs and logs.
Comment 13 Bernardo Gonzalez Kriegel 2015-06-02 17:05:00 UTC
Created attachment 39777 [details] [review]
[SIGNED-OFF] Bug 13219: Charts: Added Charts.js javascript charting library

http://bugs.koha-community.org/show_bug.cgi?id=13219
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 14 Bernardo Gonzalez Kriegel 2015-06-02 17:05:07 UTC
Created attachment 39778 [details] [review]
[SIGNED-OFF] Bug 13219: Added Charts to issues report

http://bugs.koha-community.org/show_bug.cgi?id=13219
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 15 Bernardo Gonzalez Kriegel 2015-06-02 17:05:15 UTC
Created attachment 39779 [details] [review]
[SIGNED-OFF] Bug 13219: Added color to charts

http://bugs.koha-community.org/show_bug.cgi?id=13219
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 16 Bernardo Gonzalez Kriegel 2015-06-02 17:05:22 UTC
Created attachment 39780 [details] [review]
[SIGNED-OFF] Bug 13219: Added line/bar switch

http://bugs.koha-community.org/show_bug.cgi?id=13219
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 17 Bernardo Gonzalez Kriegel 2015-06-02 17:05:29 UTC
Created attachment 39781 [details] [review]
[SIGNED-OFF] Bug 13219: Added graphs to cataloging report

http://bugs.koha-community.org/show_bug.cgi?id=13219
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 18 Bernardo Gonzalez Kriegel 2015-06-02 17:07:49 UTC
Created attachment 39782 [details] [review]
Bug 13219: (followup) remove tabs and console messages

To make koha-qa happy

Tested, nice graphics.
Nice feature to play with :)
Comment 19 Jonathan Druart 2015-06-03 11:51:33 UTC
QA comments:

1/ New JS lib is not added to the about page
2/ The version 1.0.2 of Chart is released (after first submission), not need to include a beta version :)
3/ If there is no result, there is no graph. But the canvas is created => 1000x400px is blank on top of the page. Moreover the button ("Click to change to...") is displayed.
4/ There is no way not to hardcode the canvas size? 1000 could be too wide on small screens.
5/ Maybe it could be better to display the graph under the table (?)
6/ Commented code in js (//circChart.update();)
7/ IMO the colors should not be defined in the pl code but in tt.
Moreover the get_colors subroutine is defined twice (c/p is bad ;))

Marked as Failed QA.
Comment 20 Martin Renvoize 2015-06-03 13:40:55 UTC
Wow.. nice list there Jonathan.  Thanks for pointing all those out, I'd love to see this prototype taken forward if you've got the time to make those fixes Bernardo.. at the minute I'm rather snowed under myself.

Great to see interest in it though :)
Comment 21 Gracie 2017-01-18 20:36:18 UTC
Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 13219: Charts: Added Charts.js javascript charting library
Applying: Bug 13219: Added Charts to issues report
Applying: Bug 13219: Added color to charts
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 13219: Added color to charts
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/SIGNED-OFF-Bug-13219-Added-color-to-charts-_jxQr5.patch

I would like to work on this, but patch does not apply
Comment 22 Magnus Enger 2018-02-12 18:58:55 UTC
Looks like the patches here are getting quite old. Could we say this is a duplicate of Bug 17282?
Comment 23 Katrin Fischer 2018-02-12 20:30:33 UTC

*** This bug has been marked as a duplicate of bug 17282 ***
Comment 24 Katrin Fischer 2018-02-12 20:35:07 UTC
I think there might still be some need for this as the other tool is for saved sql reports, but we should decide on one JavaScript library to include.