Spanking Art:Charts

From Spanking Art
Jump to: navigation, search

Since January 5, 2007 we can embed charts via the Google Chart API. The syntax is explained here. The API is deprecated, but can still be used. Please note that viewing the images inline works only after saving the page, but you can always test the chart image by opening the link in another tab.

Examples:

Example pie chart Example line chart

The great thing is that the image is created dynamically at runtime - which saves us the need to upload an image, and means the chart updates as soon as you update the data. The only disadvantage is that it takes 1-2 extra seconds for the chart image to load.

Simple encoding[edit]

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
a b c d e f g h i j k l m n o p q r s t u v w x y z
52 53 54 55 56 57 58 59 60 61
0 1 2 3 4 5 6 7 8 9

Example: Pie chart[edit]

http://chart.apis.google.com/chart?cht=p&chd=s:WRPMMHHGC&chs=350x200&chl=M/F%7CF/f%7CF/F%7CF/M%7CF/m%7CM/m%7CM/f%7CM/M%7Cother

Example: Map[edit]

http://chart.apis.google.com/chart?cht=t&chs=440x220&chd=s:9&chld=US&chtm=world

Example: Google-O-Meter[edit]

http://chart.apis.google.com/chart?chs=200x125&cht=gom&chd=t:48&chco=FF0000,FF8040,FFFF00,00FF00,00FFFF,0000FF,800080&chxt=x,y&chxl=0:%7C48%%7C1:%7C0%%7C100%