I am new to google charts. I am having a problem to render two charts
on same page. Any suggestions pls?

Working code

  <% visualization "chart_id", "barChart", :hAxis => " {title:
'Year1', titleColor:'red'}", :width => 830, :height => 600, :axisColor
=> "'Orange'"  ,:colors => "['#FBC302','#9ABE94','red']", :borderColor
=> "'#495F44'" ,
                      :backgroundColor =>
"'#f5f5f5'", :legendBackgroundColor => "'#f5f5f5'",:legendFontSize =>
16, :legend => "'top'", :tooltipWidth => 250, :tooltipFontSize =>
14, :titleY => "'Xyz'", :titleX => "Abc'", :titleFontSize =>
10, :isStacked => false, :min => 0,
                     :html => {:class => "graph_class"} do |chart| %>

        <% chart.string "something" %>
        <% chart.number "a" %>
        <% chart.number "b" %>
        <% chart.number "c" %>
        <% chart.add_rows(@chart_data) %>

    <% end %>

This chart works but I want to use the same chart but with only " <%
chart.number "c" %>" data so I use the same code


  <% visualization "chart_id", "barChart", :hAxis => " {title:
'Year1', titleColor:'red'}", :width => 830, :height => 600, :axisColor
=> "'Orange'"  ,:colors => "['#FBC302','#9ABE94','red']", :borderColor
=> "'#495F44'" ,
                      :backgroundColor =>
"'#f5f5f5'", :legendBackgroundColor => "'#f5f5f5'",:legendFontSize =>
16, :legend => "'top'", :tooltipWidth => 250, :tooltipFontSize =>
14, :titleY => "'Xyz'", :titleX => "Abc'", :titleFontSize =>
10, :isStacked => false, :min => 0,
                     :html => {:class => "graph_class"} do |chart| %>

        <% chart.string "something" %>
       <% chart.number "c" %>
        <% chart.add_rows(@chart_data) %>

    <% end %>

When I use this code  I lost both charts.

Any suggestion?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to