mattetti / googlecharts

Ruby Google Chart API
http://mattetti.github.com/googlecharts/
MIT License
699 stars 108 forks source link

Labels escaped improperly in bar chart #17

Closed seanhussey closed 14 years ago

seanhussey commented 14 years ago

Given this call:

Gchart.bar(:data => [46, 36, 84, 68],
  :max_value => 100,
  :size => '320x300', 
  :orientation => 'horizontal',
  :axis_with_labels => ['x','y'],
  :axis_labels => ['0|100', 'Tom|Dick|Harry|Pete'])

I get this result:

http://chart.apis.google.com/chart?chxl=0:%1240%124100%1241:%124Tom%124Dick%124Harry%124Pete&chxt=x,y&chd=s:cW0q&cht=bhs&chs=300x200&chxr=0,46,100

The pipes are CGI-escaped as %124. The result should look like this:

http://chart.apis.google.com/chart?chxl=0:|0|100|1:|Tom|Dick|Harry|Pete&chxt=x,y&chd=s:cW0q&cht=bhs&chs=300x200&chxr=0,46,100

Is this user error? This looks to be what the syntax implies I should be doing.

mattetti commented 14 years ago

This is now fixed in 1.5.3, please reopen if I got it wrong.