Couple things:
1.) Aren't you missing the <%=
in your data assignment:
series: [{
name: 'Life',
data: **<%=** @jan_life[0].try(:total) %>,
} , {
name: 'Vehicles',
data: **<%=** @feb_life[0].try(:total) %>
}]
2.) It's been a while since I've done rails but won't <%= @feb_life[0].try(:total) %>
produce a single value? You'll end up with:
series: [{
name: 'Life',
data: 1
} , {
name: 'Vehicles',
data: 1
}]
The data property must be an array. Try:
series: [{
name: 'Life',
data: [<%=@jan_life[0].try(:total) %>] //note the brackets.
} , {
name: 'Vehicles',
data: [<%=@feb_life[0].try(:total) %>]
}]