when using chart.add_date([1,2,3,4,5]) it creates the URL with "chd=e:LNYAczgATN5m", it is encoded the data but i want to be of type text as "chd=t:1,2,3,4,5"
What is the function that can do this ?
Thanks in Advance
when using chart.add_date([1,2,3,4,5]) it creates the URL with "chd=e:LNYAczgATN5m", it is encoded the data but i want to be of type text as "chd=t:1,2,3,4,5"
What is the function that can do this ?
Thanks in Advance
On
if you want to use chart.download() then the data_class option of get_url is not available.
You can use a subclass to work around this problem:
# force the TextData type for any data (real number instead of aabaa)
class LineChart(SimpleLineChart):
def data_class_detection(self, data):
return TextData
and then use this class instead of SimpleLineChart
pygooglechart attempts to detect the source data range, and automatically decide what data encoding type to use. See the
def data_class_detection()method in the source:https://github.com/gak/pygooglechart/blob/master/pygooglechart.py#L518
To force a certain type of encoding, you can call
get_url(self, data_class=None)and specify thedata_classasTextData, e.g.: