Created
May 19, 2010 20:55
-
-
Save frankieroberto/406826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def chart_path(data_values, h_value, options = {}) | |
colour = options[:colour] || "000000" | |
height = options[:height] || "100" | |
width = options[:width] || "228" | |
background_colour = options[:background_colour] || "FFFFFF" | |
background_opacity = options[:background_opacity] || "00" | |
google_chart_path = "http://chart.apis.google.com/chart?chs=" + width + "x" + height + "&cht=ls" | |
google_chart_path += "&chd=t:" + data_values.to_s + "&chds=0," + h_value.to_s + "&chxt=y,x&chxl=0:||" + "" + "|1:|" + "" + "|" + "" + "&chco=" + colour + "&chf=bg,s," + background_colour + background_opacity | |
return google_chart_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment