jeremyolliver / gvis

Rails plugin for easy embedding charts with Google Visualization API
http://github.com/jeremyolliver/gvis
MIT License
49 stars 22 forks source link

passing hash values into gem #8

Closed timfong888 closed 13 years ago

timfong888 commented 14 years ago

Hi, I think my question is still potentially a gem issue...I have generated a hash, but the example shows manual, point-by-point creation of the array. I could do a .each loop but is that the way to do it? is there a way I can just direct the array to it?

jeremyolliver commented 13 years ago

The examples just show a static array of data, so that you can see the format it's being passed in as. Real usage would have some method most likely dynamically generating the data, if your data points are in a Hash format, you can convert that to an array via Hash#to_a, is this the sort of thing you're looking to do?