Google Image Charts Line XY Problem

46 views
Skip to first unread message

Korben Dallas

unread,
Jun 20, 2011, 4:13:06 AM6/20/11
to Google Chart API
Hi,

I try to represent lien image graph of my gains by months. In Y axis
my gains and in X axis them months represent by their number.

http://chart.apis.google.com/chart?chs=600x500&chd=t:0,1,2,3|1,100.5,255,89&cht=lxy&chxt=x,y&chxr=0,0,5,1|1,0,300,10

but they points place in the graph it's really incoherence. It's seem
the Y axis it's totally proportional of Y axis. It's no matter what
you specify in chxr! I don't understand?

http://chart.apis.google.com/chart?chs=600x500&chd=t:0,20,30,100|1,20,55,80&cht=lxy&chxt=x,y&chxr=0,0,100,10|1,0,100,10

Everything seem based of 100 max value !

KeithB

unread,
Jun 20, 2011, 8:23:38 AM6/20/11
to google-c...@googlegroups.com
Korben,

Please read the first four sections of the Data Formats page: http://code.google.com/apis/chart/image/docs/data_formats.html

Data provided in text format (chd=t:) does indeed expect numbers to be between 0 and 100. The first few sections will explain this in detail.

Have fun,
Keith

Korben Dallas

unread,
Jun 20, 2011, 9:30:49 AM6/20/11
to google-c...@googlegroups.com
Hi Keith,

Thanks for the resource, i have already read but i don't really understand :-/ I understand now values are ONLY text format ! They must be scaled depending on the encoding choose 0-100, 0-61 or 0-4095

Ths value 200 for 300 max must become 66, 40 or 2730

Enjoy
Korben
Reply all
Reply to author
Forward
0 new messages