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 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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<html>
<head>
<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
</head>
<a href="start.html"><--previous</a> |
<a href="./index.html">contents</a> |
<a href="graphs.html">next--></a>
<hr>
<body>
<h1>Common Interface</h1>
<p> All graph and pie classes share a common basic interface: </p>
<h3> setOption(option, value) </h3>
<p> Set an option by option name and value. This method also does data type
conversion (see the discussion of <a href="colours.html">colour handling</a>),
and type conformance checks. </p>
<h3> getOption(option) </h3>
<p> Retrieve the value of an option by name. </p>
<h3> getAllOptions() </h3>
<p> Retrieve a dictionary of all option-value pairs. </p>
<h3> restoreDefaultOptions() </h3>
<p> Restore the values of all options to the defaults for this graph type. </p>
<h3> setLabels([label1, label2, ...]) </h3>
<p> Set the X-axis labels for Graph types, and per-slice labels for Pie charts.
The number of arguments passed to this function should correspond with the
number of discrete data points to be plotted. </p>
<h3> setData(data1, [data2, ...]) </h3>
<p> Set the data to be charted. The data format expected differs from chart
type to chart type - please see the corresponding chart section for more
information. </p>
<h3> draw(filespec) </h3>
<p> Draw the graph to the specified file. If the filespec argument is a string,
it will be treated as the path to a file. Otherwise, filespec is assumed to be
a Python file object.</p>
<h2> Options as properties </h2>
<p> All options are also exposed as properties. Getting and setting an option
as a property, is functionally identical to making the corresponding getOption
and setOption calls. </p>
</body>
<hr>
<table width="100%">
<tr>
<td>
<a href="start.html"><--previous</a> |
<a href="./index.html">contents</a> |
<a href="graphs.html">next--></a>
</td>
<td align="right">
(12/31/03)
</td>
</tr>
</table>
<center> PyGDChart User's Manual </center>
</html>
|