4 ms·
This looks nice, but most of the hard work is done elsewhere. https://github.com/ankane/groupdate https://github.com/ankane/groupdate (by the same author) make
by tomblomfield 13y ago
This looks nice, but most of the hard work is done elsewhere.
https://github.com/ankane/groupdate https://github.com/ankane/groupdate (by the same author) makes it simple to output the right JSON grouped by date (awesome!)
Highcharts/Google charts make it simple to turn json into JS graphs.
This library provides glue so you don't have to read the highchart docs. Might save some people some time, I guess...
- akane 13y agoHighcharts, Google Chart, groupdate, jQuery (for AJAX), and iso8601.js (date parsing) definitely do the heavy lifting. My favorite part about the library is you don't need to worry about getting the data in correct format. It just works with existing Rails methods, like ActiveRecord's count. Also, Google Charts look a lot better with a little bit of custom styling.
- logicallee 13y ago"Beautiful charts with 1 line of ruby" "This looks nice, but most of the hard work is done elsewhere." What were you expecting?
- mitchh 13y agoThe title seems to lead on that it's possible to create beautiful charts with just one line of Ruby, when really it's 'Create beautiful charts with just one line of Ruby (if you use these libraries).' The original title is 'Create beautiful Javascript charts with one line of Ruby', which is more accurate.
- lobster_johnson 13y agoWell, it's true: You can create charts with just one line of Ruby. The fact that it uses libraries to provide such a service is irrelevant to the assertion.
- CatMtKing 13y agoAgh, pedantic semantics!