Last active
December 10, 2015 14:17
-
-
Save Frank004/a51d8646cd152cc4f56a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
name: "Group 1" | |
data: [1,2,3,4] | |
}, | |
{ | |
name: "Group 2" | |
data: [1,2,3,4] | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@groups.collect { |g| { name: g.name, data: g.task_trans.group_by_month(:start_date, range: @range, format: "%b %Y").count } } | |
and got this result | |
[ | |
{:name=>"Grupo 1", | |
:data=> | |
{"Nov 2015"=>6, | |
"Dic 2015"=>8}}, | |
{:name=>"Grupo 2", | |
:data=> | |
{"Nov 2015"=>0, | |
"Dic 2015"=>6}} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment