| 1 |
lars |
1 |
<style type="text/css">
|
|
|
2 |
<!--
|
|
|
3 |
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
|
4 |
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
|
5 |
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
|
|
|
6 |
th {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
|
|
7 |
//-->
|
|
|
8 |
</style><hr><a name="_C_PIEGRAPH"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>PieGraph</b> EXTENDS <a href="Graph .html#_C_GRAPH " style="font-face:arial;font-weight:bold;">Graph </a></div>
|
|
|
9 |
<i>(Defined in: jpgraph_pie.php : 1117)</i><table border=1><tr><td> <a href="PieGraph.html" style="font-family:arial;font-weight:bold;color:darkblue;">PieGraph</a> </td><td> <a href="Graph .html" style="font-family:arial;font-weight:bold;color:darkblue;">Graph </a> </td></tr><tr><td valign=top> <a href="PieGraph.html#_PIEGRAPH_ADD">Add()</a> <br>
|
|
|
10 |
<a href="PieGraph.html#_PIEGRAPH_PIEGRAPH">PieGraph()</a> <br>
|
|
|
11 |
<a href="PieGraph.html#_PIEGRAPH_SETANTIALIASING">SetAntiAliasing()</a> <br>
|
|
|
12 |
<a href="PieGraph.html#_PIEGRAPH_SETCOLOR">SetColor()</a> <br>
|
|
|
13 |
<a href="PieGraph.html#_PIEGRAPH_STROKE">Stroke()</a> <br>
|
|
|
14 |
</td><td valign=top> </td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>The canvas for use with PiePlots. You add pie plots by calling the Add() method.
|
|
|
15 |
<p>
|
|
|
16 |
You can add several PiePlots by adjusting their size and positioning each PiePlot so it doesn't overlap eachother.
|
|
|
17 |
<p>
|
|
|
18 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="PiePlot.html">PiePlot</a> and <a href="PiePlot3D.html">PiePlot3D</a> <p> <hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
|
19 |
<p> <p> <span style='font-size:110%;'><a name="_PIEGRAPH_ADD"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
20 |
function Add($aObj)</font>
|
|
|
21 |
</b></div></a></span>
|
|
|
22 |
|
|
|
23 |
<span style='font-family:arial;font-size:90%;'><i>Add object to the pie graph</i></span><p>
|
|
|
24 |
|
|
|
25 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
26 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
27 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
28 |
$aObj</font>
|
|
|
29 |
|
|
|
30 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Object to add</td></tr>
|
|
|
31 |
</table>
|
|
|
32 |
|
|
|
33 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Add a pieplots or text object to the pie graph. You can specify either a single object or an array. If you specify an array all object in the array must be of the same type. <br>
|
|
|
34 |
|
|
|
35 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
36 |
$piegraph = new PieGraph(300,400);
<br />$pieplot = new PiePlot($ydata);
<br />$piegraph->Add($pieplot);
<br /></font>
|
|
|
37 |
</span><br>
|
|
|
38 |
<p>
|
|
|
39 |
<p> <p> <span style='font-size:110%;'><a name="_PIEGRAPH_PIEGRAPH"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
40 |
function PieGraph($width,$height,$cachedName,$timeout,$inline)</font>
|
|
|
41 |
</b></div></a></span>
|
|
|
42 |
|
|
|
43 |
<span style='font-family:arial;font-size:90%;'><i>//---------------// CONSTRUCTOR
|
|
|
44 |
</i></span><p>
|
|
|
45 |
|
|
|
46 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
47 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
48 |
|
|
|
49 |
$width</font>
|
|
|
50 |
|
|
|
51 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
52 |
300</font>
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
56 |
$height</font>
|
|
|
57 |
|
|
|
58 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
59 |
200</font>
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
63 |
$cachedName</font>
|
|
|
64 |
|
|
|
65 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
66 |
""</font>
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
70 |
$timeout</font>
|
|
|
71 |
|
|
|
72 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
73 |
0</font>
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
77 |
$inline</font>
|
|
|
78 |
|
|
|
79 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
80 |
1</font>
|
|
|
81 |
|
|
|
82 |
</table>
|
|
|
83 |
|
|
|
84 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>See Graph::Graph() <br>
|
|
|
85 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Graph.html#_GRAPH_GRAPH">Graph::Graph</a>
|
|
|
86 |
|
|
|
87 |
$piegraph = new PieGraph(300,400);
<br /></font>
|
|
|
88 |
</span><br>
|
|
|
89 |
<p>
|
|
|
90 |
<p> <p> <span style='font-size:110%;'><a name="_PIEGRAPH_SETANTIALIASING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
91 |
function SetAntiAliasing($aFlg)</font>
|
|
|
92 |
</b></div></a></span>
|
|
|
93 |
|
|
|
94 |
<span style='font-family:arial;font-size:90%;'><i>Enable/disable anti-alias for Pie Graphs</i></span><p>
|
|
|
95 |
|
|
|
96 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
97 |
|
|
|
98 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
102 |
true</font>
|
|
|
103 |
</td><td>true=enable anti-aliasing</td></tr>
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Enable/disable anti-alias for Pie Graphs. This makes for much nicer looking PieGraphs. Please note that enabling anti-alias imposes some restrictions:
|
|
|
107 |
<ul>
|
|
|
108 |
<li> Enabling anti-alias will severely impact performance. As a rule of thumb you can expect drawing to take 5-8 times longer !
|
|
|
109 |
|
|
|
110 |
</ul>
|
|
|
111 |
<br>
|
|
|
112 |
|
|
|
113 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
114 |
$piegraph->SetAntiAlias();</font>
|
|
|
115 |
</span><br>
|
|
|
116 |
|
|
|
117 |
<p> <p> <span style='font-size:110%;'><a name="_PIEGRAPH_SETCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
118 |
function SetColor($c)</font>
|
|
|
119 |
</b></div></a></span>
|
|
|
120 |
|
|
|
121 |
<span style='font-family:arial;font-size:90%;'><i>Set the background color. Synonym to SetMarginColor()</i></span><p>
|
|
|
122 |
|
|
|
123 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
124 |
|
|
|
125 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Color</td></tr>
|
|
|
129 |
</table>
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Graph.html#_GRAPH_GRAPH">Graph::Graph</a>
|
|
|
133 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
134 |
|
|
|
135 |
</span><br>
|
|
|
136 |
<p>
|
|
|
137 |
<p> <p> <span style='font-size:110%;'><a name="_PIEGRAPH_STROKE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
138 |
function Stroke($aStrokeFileName)</font>
|
|
|
139 |
</b></div></a></span>
|
|
|
140 |
|
|
|
141 |
<span style='font-family:arial;font-size:90%;'><i>// Method description</i></span><p>
|
|
|
142 |
|
|
|
143 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
144 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
145 |
|
|
|
146 |
$aStrokeFileName</font>
|
|
|
147 |
|
|
|
148 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
149 |
""</font>
|
|
|
150 |
</td><td>Filename</td></tr>
|
|
|
151 |
</table>
|
|
|
152 |
|
|
|
153 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Stroke the piegraph to the browser or to a specified file if specified. Works exactly the same as Graph::Stroke()
|
|
|
154 |
<br>
|
|
|
155 |
|
|
|
156 |
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
|
157 |
|
|
|
158 |
</span><br>
|
|
|
159 |
<p> <hr> <p>
|