Chart type must be valid for cht parameter Dataset can be any python
iterable and be multi dimensional Kwargs will be put into chart API
params if valid
new empty dictionary
|
__init__(self,
ctype=None,
dataset=[ ] ,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
bar(self,
*args)
For bar charts, specify bar thickness and spacing with the args args
are <bar width>,<space between bars>,<space between
groups> bar width can be relative or absolute, see the official
doc APIPARAM: chbh |
source code
|
|
|
check_size(self,
x,
y)
Make sure the chart size fits the standards |
source code
|
|
|
|
|
|
|
color(self,
*args)
Add a color for each dataset args are of the form <color
1>,...<color n> APIPARAM: chco |
source code
|
|
|
dataset(self,
data,
series='
' )
Update the chart's dataset, can be two dimensional or contain string
data |
source code
|
|
|
encoding(self,
arg)
Specifies the encoding to be used for the Encoder Must be one of
'simple','text', or 'extended' |
source code
|
|
|
fill(self,
*args)
Apply a solid fill to your chart args are of the form <fill
type>,<fill style>,... |
source code
|
|
|
getdata(self)
Returns the decoded dataset from chd param |
source code
|
|
|
getname(self)
Gets the name of the chart, if it exists |
source code
|
|
|
grid(self,
*args)
Apply a grid to your chart args are of the form: |
source code
|
|
|
|
|
img(self,
**kwargs)
Returns an XHTML <img/> tag of the chart |
source code
|
|
|
label(self,
*args)
Add a simple label to your chart call each time for each dataset
APIPARAM: chl |
source code
|
|
|
legend(self,
*args)
Add a legend to your chart call each time for each dataset APIPARAM:
chdl |
source code
|
|
|
legend_pos(self,
pos)
Define a position for your legend to occupy APIPARAM: chdlp |
source code
|
|
|
level_data(self,
*args)
Just used in QRCode for the moment args are
error_correction,margin_size APIPARAM: chld |
source code
|
|
|
line(self,
*args)
Called one at a time for each dataset args are of the form: |
source code
|
|
|
map(self,
geo,
country_codes)
Creates a map of the defined geography with the given country/state
codes Geography choices are africa, asia, europe, middle_east,
south_america, and world ISO country codes can be found at
http://code.google.com/apis/chart/isocodes.html US state codes can be
found at http://code.google.com/apis/chart/statecodes.html APIPARAMS:
chtm & chld |
source code
|
|
|
margin(self,
left,
right,
top,
bottom,
lwidth=0,
lheight=0)
Set margins for chart area args are of the form: |
source code
|
|
|
marker(self,
*args)
Defines markers one at a time for your graph args are of the form: |
source code
|
|
|
orientation(self,
angle)
Set the chart dataset orientation angle is <angle in radians>
APIPARAM: chp |
source code
|
|
|
output_encoding(self,
encoding)
Output encoding to use for QRCode encoding Must be one of
'Shift_JIS','UTF-8', or 'ISO-8859-1' APIPARAM: choe |
source code
|
|
|
position(self,
angle)
Set the chart dataset orientation angle is <angle in radians>
APIPARAM: chp |
source code
|
|
|
render(self)
Renders the chart context and axes into the dict data |
source code
|
|
|
save(self,
fname=None)
Download the chart from the URL into a filename as a PNG |
source code
|
|
|
scale(self,
*args)
Scales the data down to the given size args must be of the form: |
source code
|
|
|
show(self,
*args,
**kwargs)
Shows the chart URL in a webbrowser |
source code
|
|
|
size(self,
*args)
Set the size of the chart, args are width,height and can be tuple
APIPARAM: chs |
source code
|
|
|
title(self,
title,
*args)
Add a title to your chart args are optional style params of the form
<color>,<font size> APIPARAMS: chtt,chts |
source code
|
|
|
type(self,
type)
Set the chart type, either Google API type or regular name APIPARAM:
cht |
source code
|
|
|
urlopen(self)
Grabs readable PNG file pointer |
source code
|
|
|
write(self,
fp)
Writes out PNG image data in chunks to file pointer fp |
source code
|
|
Inherited from dict :
__cmp__ ,
__contains__ ,
__delitem__ ,
__eq__ ,
__ge__ ,
__getattribute__ ,
__getitem__ ,
__gt__ ,
__hash__ ,
__iter__ ,
__le__ ,
__len__ ,
__lt__ ,
__ne__ ,
__new__ ,
__setitem__ ,
clear ,
copy ,
fromkeys ,
get ,
has_key ,
items ,
iteritems ,
iterkeys ,
itervalues ,
keys ,
pop ,
popitem ,
setdefault ,
update ,
values
|