vis/googlechart/
mg_gc_base.pro
includes main-level programRoutines
Routines from mg_gc_base.pro
result = mg_gc_base_processstr( [s] [, param])
Process a string for inclusion in the URL: replace spaces with + signs, join multiple array elements with |'s, and add the param=.
result = mg_gc_base(type=string, data=numeric [, range=fltarr] [, dimensions=lonarr(2)] [, title=string or strarr] [, label=strarr] [, legend_labels=strarr] [, legend_position=string] [, color=lonarr] [, background=long] [, alpha_channel=float] [, axis_labels=string], bar_sizes=bar_sizes [, url=string], just_url=just_url)
Interface to Google Charts API.
Routine details
top mg_gc_base_processstr
result = mg_gc_base_processstr( [s] [, param])
Process a string for inclusion in the URL: replace spaces with + signs, join multiple array elements with |'s, and add the param=. If no string is specified, the empty string will be returned.
Return value
string
Parameters
- s in optional type=string
string to process
- param in optional type=string
parameter name
top mg_gc_base
result = mg_gc_base(type=string, data=numeric [, range=fltarr] [, dimensions=lonarr(2)] [, title=string or strarr] [, label=strarr] [, legend_labels=strarr] [, legend_position=string] [, color=lonarr] [, background=long] [, alpha_channel=float] [, axis_labels=string], bar_sizes=bar_sizes [, url=string], just_url=just_url)
Interface to Google Charts API. Returns an image to display. The Google Charts API is documented at:
http://code.google.com/apis/chart/
Return value
bytarr(3, xsize, ysize)
Keywords
- type in required type=string
type of chart required, options are: lc (line chart), lxy (xy points), ls (sparkline), bhs, bvs, bhg, bvg, p (pie chart), p3 (3D pie chart), v (Venn diagram), s (scatter plot), r (radar), t (map), gom (Google-o-meter)
- data in required type=numeric
array of data to displayed
- range in optional type=fltarr
range of data
- dimensions in optional type=lonarr(2) default=[200, 100]
size of returned image
- title in optional type=string or strarr
title of the chart
- label in optional type=strarr
chart labels (depending on type)
- legend_labels in optional type=strarr
string array of labels for sets
- legend_position in optional type=string
position of legend: t (top), b (bottom), r (right), or l (left)
- color in optional type=lonarr
colors of the chart
- background in optional type=long
color of background
- alpha_channel in optional type=float
transparency of chart: 0.0 for completely transparent, 1.0 for completely opaque
- axis_labels in optional type=string
position of axis labels: t (top), b (bottom), r (right), or l (left)
- bar_sizes
- url out optional type=string
URL used by Google Charts API
- just_url
Examples
An example of using the routine is given in a main-level program at the end of this file. Run it using:
IDL> .run mg_gc_base
Other attributes
- Requires:
IDL 6.4
File attributes
Modification date: | Wed May 14 15:07:15 2014 |
Lines: | 101 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.