I´m trying to make this column graph stacked:
<%= column_chart [
{name: "Paper", data: current_user.papers.map{|t| [t.paper_type, t.paper_weight] }, 'interpolateNulls':true, 'stacked':true},
{name: "EnvPaper", data: current_user.papers.map{|t| [t.paper_type, t.env_paper_weight ] }, 'interpolateNulls':true, 'stacked':true} ] %>
I read in the chartkicks documentation that this bit of code could make it stacked
<%= column_chart data, stacked: true %>
so I tried couple of modifications but nothing seems to work. Now my graph code looks like this.
<%= column_chart data, stacked: true, current_user.papers.map{|t|
{name: t.paper_type, data: t.paper_weight.count, t.env_paper_weight.count }} %>
and it gives me this error :
syntax error, unexpected '}', expecting =>
...unt, t.env_paper_weight.count }} );@output_buffer.safe_appen...
... ^
/Users/dadi/Documents/Vefir/SprettaEMS1.5/app/views/users/show.html.erb:115: syntax error, unexpected keyword_ensure, expecting '}'
/Users/dadi/Documents/Vefir/SprettaEMS1.5/app/views/users/show.html.erb:117: syntax error, unexpected keyword_end, expecting '}'
I´m really stuck here, is anyone here that can help me?
thanks in advance Dadi