website/index.txt in googlecharts-1.3.0 vs website/index.txt in googlecharts-1.3.1

- old
+ new

@@ -143,11 +143,31 @@ :stacked => false ) </pre> !http://chart.apis.google.com/chart?cht=bvg&chs=300x200&chd=s:9UGo,Uo9C&chco=FF0000,00FF00(grouped bars)! +*bar chart width and spacing* +A bar chart can accept options to set the width of the bars, spacing between bars and spacing between bar groups. To set these, you can either provide a string, array or hash. + +The Google API sets these options in the order of width, spacing, and group spacing, with both spacing values being optional. So, if you provide a string or array, provide them in that order: + +<pre syntax="ruby"> + Gchart.bar(:data => @data, :bar_width_and_spacing => '25,6') # width of 25, spacing of 6 + Gchart.bar(:data => @data, :bar_width_and_spacing => '25,6,12') # width of 25, spacing of 6, group spacing of 12 + Gchart.bar(:data => @data, :bar_width_and_spacing => [25,6]) # width of 25, spacing of 6 + Gchart.bar(:data => @data, :bar_width_and_spacing => 25) # width of 25 +</pre> + +The hash lets you set these values directly, with the Google default values set for any options you don't include: + +<pre syntax="ruby"> + Gchart.bar(:data => @data, :bar_width_and_spacing => {:width => 19}) + Gchart.bar(:data => @data, :bar_width_and_spacing => {:spacing => 10, :group_spacing => 12}) +</pre> + + *pie chart* <pre syntax="ruby"> Gchart.pie(:data => [20, 35, 45]) </pre> @@ -451,5 +471,6 @@ Comments are welcome. Send an email to "Matt Aimonetti":mailto:mattaimonetti@gmail.com h3. Contributors "David Grandinetti":http://github.com/dbgrandi +"Toby Sterrett":http://github.com/takeo \ No newline at end of file