Hi, it's a little hard to debug server-side issues without the client-side
generated code. Could you please post the source as chrome (or your browser
of choice) sees it? I should just need the "var data =..." line.

- Sergey


On Sun, Jun 30, 2013 at 3:31 PM, Brian Wobst <[email protected]> wrote:

> I'm trying to include dynamic data.
>
> This code:
>
> <% @info = @urges.inject([['Day','Morning','Afternoon','Evening']]) do
> |ar, t|
>         ar << [t.date.strftime("%m/%d/%y"), t.morning, t.afternoon,
> t.evening]
>       end
> %>
>
> outputs:
>
> [["Day", "Morning", "Afternoon", "Evening"], ["06/30/13", 1, 5, 3],
> ["06/29/13", 5, 3, 7], ["06/28/13", 3, 2, 3]]
>
> When I try to call @info like this:
>
>     var data = google.visualization.arrayToDataTable(<%= @info %>);
>
> The chart doesn't render.  However, if I copy the exact same output and
> hardcode it in like this:
>
>     var data = google.visualization.arrayToDataTable([["Day", "Morning",
> "Afternoon", "Evening"], ["06/30/13", 1, 5, 3], ["06/29/13", 5, 3, 7],
> ["06/28/13", 3, 2, 3]]);
>
> It works.  What gives?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to