Scatter plot and data scaling

3 views
Skip to first unread message

Kalphiter

unread,
Dec 16, 2009, 1:34:28 PM12/16/09
to Google Chart API
I have this:
http://chart.apis.google.com/chart?cht=s&chd=t:125,141,146,151,156,161,167,172,179|13000,13300,13400,13500,13600,13700,13800,13900,14000|47,47,47,47,47,47,47,47,47,47&chxt=x,y&chxr=0,125,179,5|1,13000,14000,100&chds=125,179,13000,14000&chs=300x250

I can't seem to understand the data scaling, I am not sure what I'm
supposed to do.
It's supposed to be a range of 125-179 on the X axis, and 13000-14000
on the Y axis.(Just the highest/lowest for the X/Y)

KeithB

unread,
Dec 16, 2009, 2:45:41 PM12/16/09
to Google Chart API
You have three datasets (x-coords, y-coords, optional size), but are
only specifying data scaling information for two. The API is therefore
expecting your size values (third dataset) to be between 13000 and
14000. From the documentation: "If you supply fewer data scaling
parameters than there are data sets, the last scaling parameter is
applied to the remaining data sets."

Add ",0,100" to your CHDS parameter to fix.

Cheers,
Keith

Kalphiter

unread,
Dec 20, 2009, 2:51:16 PM12/20/09
to Google Chart API
Thanks, it worked, and I love these graphs!
Reply all
Reply to author
Forward
0 new messages