I am getting from controller data in global variable @controller_data which contains array.
I am also using Highcharts, where is used following procedure for rendering data in charts:
data = [{
y: 55.11,
color: colors[0]
}, {
y: 21.63,
color: colors[1]
}, {
y: 11.94,
color: colors[2]
}, {
y: 7.15,
color: colors[3]
}, {
y: 2.14,
color: colors[4]
}];
I am using HAML template system. How to fill out this Javascript array with data from controller?
Thanks