TracksApp / tracks

Tracks is a GTD™ web application, built with Ruby on Rails
https://www.getontracks.org/
GNU General Public License v2.0
1.19k stars 538 forks source link

get rid of Flash for statistics page #1153

Closed dnrce closed 5 years ago

dnrce commented 10 years ago

Migrated from the original issue at https://www.assembla.com/spaces/tracks-tickets/tickets/1153

I want to suggest an alternative visualization for the diagrams on the statistics site. The JavaScript based SVG library Raphael could be nice to get rid of Flash. Check out the demos on the homepage, esp. for diagrams.

Originally reported by voxspox on April 4, 2011 at 12:01:37 (+0000) against version git-devel

dnrce commented 10 years ago

Raphael is outdated but there are some other alternatives, see zoombody#106

C-Otto commented 7 years ago

With Google Chrome Flash is disabled, making the statistics page more or less useless.

ZeiP commented 5 years ago

Just to document my progress so far: I wanted to see the current stats, which have been disabled in commit 78742d15b874eb625db4d7b20d044d2f50e29e29. This can be done by reverting the commit (which makes a change to app/views/stats/_chart.html.erb) and bypassing the swf_fu library error by changing the following line in vendor/bundle/ruby/2.3.0/gems/swf_fu-2.0.4:

-options[:auto_install] &&= @view.swf_path(options[:auto_install])
+options[:auto_install] = ""

After this the stats page again shows the Flash stats, if the browser supports Flash.

ZeiP commented 5 years ago

I started working on this using Chartkick at branch https://github.com/ZeiP/tracks/tree/bug/1153_stats. It already has about half of the stats working.

ZeiP commented 5 years ago

Chartkick apparently doesn't support combo charts, which means that it may not be the right choice – about half of the old charts are combo charts.

mattr- commented 5 years ago

My initial idea for this was to switch to D3, but if there’s something better, then I’d happily go with that.

ZeiP commented 5 years ago

Chartkick was very easy to use, but unfortunately it doesn't (and apparently won't) support combo charts, so I'm currently taking a look at using Chart.js with some RoR library. I did a bit of digging on D3. To me it seems that it's a bit slower and more complex, I'd go with a leaner solution for the stats since the requirements are pretty basic – apparently D3 is good for more complex needs.