niucang / gchartrb

Automatically exported from code.google.com/p/gchartrb
0 stars 0 forks source link

Graph not showing up when using :extended data encoding #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Test case:

GoogleChart::BarChart.new('800x350', nil, :vertical, true) do |chart|
  chart.data_encoding = :simple

  chart.data "2^i", (0..8).to_a.collect{|i| 2**i}, "ff0000"
  chart.data "2.1^i", (0..8).to_a.collect{|i| 2.1**i}, "00ff00"
  chart.data "2.2^i", (0..8).to_a.collect{|i| 2.2**i}, "0000ff"
  max = 2.2**8

  chart.show_legend = true
  chart.axis :y, :range => [0,max], :font_size => 16, :alignment => :center
  chart.axis :x, :labels => (0..8).to_a, :font_size => 16, :alignment =>
:center
end.to_url

Now try changing data_encoding to :extended. The chart goes to hell.

This is with gchartrb-0.5.4.

I sometimes have similar problems with :text data encoding as well,
although I can't figure out how to reproduce this in a simple test case. It
might be related to the data set size.

Original issue reported on code.google.com by matt.zuk...@gmail.com on 21 Jan 2008 at 8:06

GoogleCodeExporter commented 8 years ago
I will look at the bug today and provide a fix. Thanks for bringing it to my 
attention.

Original comment by deepak.j...@gmail.com on 21 Jan 2008 at 11:38

GoogleCodeExporter commented 8 years ago
It was a stupid error. I was using the '|' instead of the ',' character to 
separate 
the datasets in the URL.

It is fixed now. I will make a new release by tonight.

Thanks again.

Original comment by deepak.j...@gmail.com on 22 Jan 2008 at 2:24