Google API notes

From Helpful
Jump to: navigation, search
This hasn't been updated for a while, so could be outdated (particularly if it's about something that evolves constantly, such as software).


Google Chart API

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Max URL length - ~2048 imposed by some browsers (see also notes like URL#URL_length) Using POST seems to be limited to 16KB of data.

Rounding/truncate numbers as much as is sensible. There are also some

Data formats:

  • t: Lists of text, often simplest to feed in
    • Example:
      t:1,19,27,53,61,-1|12,39,57,45,51,27
  • s: (one-character-per-int string format for 0..61)
    • values 0—61 represented by
      A-Za-z0-9
      (in that order) and
      _
      representing a missing value
    • If you don't need much display resolution, this is the most compact
    • Example:
      chd=s:BTb19_,Mn5tzb
      (equivalent to the t: example above)
  • e: (extended string coding; two-character-per-int string format, for 0..4095
    • like the basic coding, but with two characters per data point, capable of coding 0-4095
    • values 0-63 coded by
      A-Za-z0-9.-
      (in that order),
      __
      representing a missing value.
    • e.g.
      AA
      means 0,
      A-
      is 62,
      BA
      is 64,
      ..
      means 4095
    • Example:
      chd=e:BaPoqM2s,-A__RMD6
      (equivalent to t:90,1000,2700,3500</span>


Chart size, <tt>chs=

  • pixel size

Chart type, chs=

bvs

-->


See also: