Hello,
I'm new to python google chart and while I search the web for an answer, I didn't find any answer so ask it here.
I'm recovering a dataset in a dictionary array in the form
results['status1'] = [ datetime1, datetime2, datetime3, .... ]
results['status2'] = [ datetime1, datetime2, datetime3, .... ]
What I'm looking for is to make a chart like bar which for each day, give counts of corresponding entries (eventually, do it per hour or per week)
I try to start with the code from
and it fails like this
>>>
File "/home/user/script/script-chart.py", line 383, in plot_googlechart
url = chart.get_url()
File "/usr/lib/pymodules/python2.7/pygooglechart.py", line 342, in get_url
url_bits = self.get_url_bits(data_class=data_class)
File "/usr/lib/pymodules/python2.7/pygooglechart.py", line 350, in get_url_bits
url_bits.append(self.data_to_url(data_class=data_class))
File "/usr/lib/pymodules/python2.7/pygooglechart.py", line 609, in data_to_url
data = self.scaled_data(data_class, self.x_range, self.y_range)
File "/usr/lib/pymodules/python2.7/pygooglechart.py", line 576, in scaled_data
y_range = self.data_y_range()
File "/usr/lib/pymodules/python2.7/pygooglechart.py", line 546, in data_y_range
if type == 'y'])
TypeError: cannot concatenate 'str' and 'int' objects
<<<
but I'm not really sure which format should have input data. Any hints ?
Eventually at the end, I want to add to the end of the chart data like
results['status1'] = [ datetime1, datetime2, datetime3, ...., 'invalid', 'unknown' ]
Thanks a lot.
Cheers,
Julien