Script Library: 1187 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 
View scriptLicenseDownload documentation as: HTML or editable
Download scriptHistoryOther scripts by: chrisrg

Documentation for: charts-api.r


Google Charts API

Christopher Ross-Gill
9th August 2008

A URL generator to access the Google Charts API

1. Usage

This is a rudimentary wrapper for the Google Charts API. It takes some of the work out of generating API arguments, though knowledge of the API is still recommended.

Google Charts API

1.1 Basic Line Chart

'Line' is the default Chart Type:

  view layout [
      image chart [data: [10 95 60 95 10]]
  ]

1.2 Basic Bar Chart

Types can be specified, either by the preset words (see script) or by the chart types set in the Google API:

  view layout [
      image chart [type: 'bar data: [10 95 60 95 10] bars: [55 8]]
  ]

1.3 Data Sets

Data can be supplied as a single or multiple sets:

  data: [1 2 3 4]
  data: [[1 2] [3 4] [5 6]]

1.4 Styles

Basic styles can be supplied:

  color: red
  area: [color solid 255.153.0]
  area: [[color solid 255.140.204][chart solid 0.204.204]]
  bars: [40 5 10] ; width space group-space