Tuesday, March 16, 2010

data part 2

Figured I would let everyone know how I made the cool charts.
Easiest thing to do is go to the Google LiveChart Playground.
This is pre-loaded with my format and data for Weight and Muscle Mass.
The data is the part that looks like:
chd=t:73.7,72.2,_,_,_,_,_,_,_,_,_,_,_,_
32.3,33.0,_,_,_,_,_,_,_,_,_,_,_,_
Which is basically two sets of data, weight first. The underbars are placeholders, so every week replace the first underbar with the latest data.

I have also set the scaling to match my needs:
chds=65,75,30,40
chxr=2,65,75
3,30,40
The 65 and 75 are min and max values for the weight axis, the 30 and 40 are min and max for muscle mass. Be sure to change BOTH sets, so for example if you want the weight axis to be from 70 to 90, it would like like this (changes in bold):
chds=70,90,30,40
chxr=2,70,90
3,30,40
Then copy the URL link.
In blogger go to Layout, click on Add A Gadget, and select HTML/Javascript.
Make the title whatever you want, and for the content add an img tag with the URL as the src:
<img src="http://chart.apis.google.com/chart?cht=lc&chs=200x150&chco=0000FF,FF0000&chdl=Weight%28LeftAxis%29%7CMuscleMass%28RightAxis%29&chdlp=t&chxt=x,x,y,r&chxl=0:%7C1%7C8%7C15%7C22%7C29%7C5%7C12%7C19%7C29%7C3%7C10%7C17%7C24%7C31%7C1:%7CMar%7C%7C%7C%7C%7CApr%7C%7C%7C%7CMay%7C%7C%7C%7C&chd=t:73.7,72.2,_,_,_,_,_,_,_,_,_,_,_,_%7C32.3,33.0,_,_,_,_,_,_,_,_,_,_,_,_&chds=65,75,30,40&chxr=2,65,75%7C3,30,40&chg=7.69,10&chxs=0,111111,8,0,lt,111111%7C1,111111,8,0,lt,111111%7C2,111111,8,0,lt,111111%7C3,111111,8,0,lt,111111" />
Hit Save and you are done!

2 comments:

  1. That is a really awesome tattoo by the way.

    ReplyDelete
  2. Thanks...sadly my wife does not share that opinion!

    ReplyDelete