MeditationEnthusiasts / MeditationLogger

A way to log meditations
GNU General Public License v3.0
0 stars 0 forks source link

Add graph view #38

Open xforever1313 opened 7 years ago

xforever1313 commented 7 years ago

We should add a graph view so people can easily view stats about their sessions.

These can include:

For techniques and number of minutes per session, we should have only 10 or so options, pick from the top 10, and put the rest under "other".

Chart.JS is probably the best tool for the job. Don't forget to add them to Credits.txt!

http://www.chartjs.org/

To make things even fancier for people who do not have JS, add corresponding tables as well.

xforever1313 commented 7 years ago

Each time the logbook is updated, it should populate a Dictionary of the stats going into the chart. For example, a technique dictionary whose key is the technique, and whose value is the number of times the technique was done. Then, when creating the HTML to be rendered, call the top 10 or so values of the dictionary, and then have the rest go in an "Other" bucket.

Time Started's key can be in "buckets" of the hour (0-23), value is the number of times the session took place in that hour.

Number of minutes per session can be in buckets of 5-, 10, 15, 20, 30, 45, 60, 75, 90, 105, 120+. Rounded down.