Google Charts API use

Hello, I’m testing Google Charts API plugin for rails and have a few
questions about it’s use (I searched for a developper documentation
for about an hour without founding anything really interesting):

Here is my test code:

Testing google charts api

chart =
chart.type = :bar_vertical_stacked
chart.height = 400
chart.width = 600 = [@totalAmount, @totalPercent]
chart.colors = ‘346090’
chart.labels = [“total”, “percent”]
@small_sales_chart_url = chart.to_url

And in the view:
<%= image_tag @small_sales_chart_url %>

The generated graph url is:|percent&chd=t:300.0,100.0

This is great, but I would like to know how to:

  • Set the space between each bar
  • Define the y axis labels
  • Create a bar with values that can be negative
  • Write the value of each bar directly on the graph
    …and so many more.

If anyone knows where I could find a complete developper guide that
would be great, if not maybe you can help me with those few questions
in the meantime.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs