PieGraph.html
18.6 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><style type="text/css">
<!--
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: underline; color: #FF0000}
A.no:link {font-family:inherit; font-size: inhreit;text-decoration: none; color: #000000}
A.no:visited {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
A.no:hover {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
th {font-family: helvetica, arial; color : black; font-size:90%; background : #b7c8b7; border-right:black solid 1pt; border-bottom:black solid 1pt;}
td {font-family: helvetica, arial; color : black; font-size:90%; background : white; border-right:black solid 1pt; border-bottom:black solid 1pt;}
//-->
</style></HEAD><hr><div style="padding-left:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;background-color:#deaa87;font-family:courier new;font-size:16pt;">Class <a class="no" name="_C_PIEGRAPH"><b>PieGraph</b></a> Extends <a style="font-size:14pt;text-decoration:underline;"href="Graph.html#_C_GRAPH " style="font-face:arial;font-weight:bold;">Graph </a></div>
<i>(Defined in: jpgraph_pie.php : 1210)</i><br> <br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" > <a href="PieGraph.html" style="font-family:arial;font-weight:bold;color:darkblue;">PieGraph</a> </td><td align="center" style="background:lightgray;" > <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>
<a href="PieGraph.html#_PIEGRAPH_SETANTIALIASING">SetAntiAliasing()</a> <br>
<a href="PieGraph.html#_PIEGRAPH_SETCOLOR">SetColor()</a> <br>
<a href="PieGraph.html#_PIEGRAPH_STROKE">Stroke()</a> <br>
<a href="PieGraph.html#_PIEGRAPH___CONSTRUCT">__construct()</a> <br>
</td><td valign=top> <a href="Graph.html#_GRAPH_ADD" style="color:darkgrey;">Add() </a><br>
<a href="Graph.html#_GRAPH_ADDBAND">AddBand()</a> <br>
<a href="Graph.html#_GRAPH_ADDLINE">AddLine()</a> <br>
<a href="Graph.html#_GRAPH_ADDTEXT">AddText()</a> <br>
<a href="Graph.html#_GRAPH_ADDY">AddY()</a> <br>
<a href="Graph.html#_GRAPH_ADDY2">AddY2()</a> <br>
<a href="Graph.html#_GRAPH_CHECKCSIMCACHE">CheckCSIMCache()</a> <br>
<a href="Graph.html#_GRAPH_GETCSIMIMGHTML">GetCSIMImgHTML()</a> <br>
<a href="Graph.html#_GRAPH_GETHTMLIMAGEMAP">GetHTMLImageMap()</a> <br>
<a href="Graph.html#_GRAPH_SET3DPERSPECTIVE">Set3DPerspective()</a> <br>
<a href="Graph.html#_GRAPH_SET90ANDMARGIN">Set90AndMargin()</a> <br>
<a href="Graph.html#_GRAPH_SETALPHABLENDING">SetAlphaBlending()</a> <br>
<a href="Graph.html#_GRAPH_SETANGLE">SetAngle()</a> <br>
<a href="Graph.html#_GRAPH_SETAXISLABELBACKGROUND">SetAxisLabelBackground()</a> <br>
<a href="Graph.html#_GRAPH_SETAXISSTYLE">SetAxisStyle()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDCFLAG">SetBackgroundCFlag()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDCOUNTRYFLAG">SetBackgroundCountryFlag()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDGRADIENT">SetBackgroundGradient()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGE">SetBackgroundImage()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGEMIX">SetBackgroundImageMix()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGEPOS">SetBackgroundImagePos()</a> <br>
<a href="Graph.html#_GRAPH_SETBOX">SetBox()</a> <br>
<a href="Graph.html#_GRAPH_SETCLIPPING">SetClipping()</a> <br>
<a href="Graph.html#_GRAPH_SETCOLOR" style="color:darkgrey;">SetColor() </a><br>
<a href="Graph.html#_GRAPH_SETCSIMIMGALT">SetCSIMImgAlt()</a> <br>
<a href="Graph.html#_GRAPH_SETFRAME">SetFrame()</a> <br>
<a href="Graph.html#_GRAPH_SETFRAMEBEVEL">SetFrameBevel()</a> <br>
<a href="Graph.html#_GRAPH_SETGRIDDEPTH">SetGridDepth()</a> <br>
<a href="Graph.html#_GRAPH_SETICONDEPTH">SetIconDepth()</a> <br>
<a href="Graph.html#_GRAPH_SETIMGFORMAT">SetImgFormat()</a> <br>
<a href="Graph.html#_GRAPH_SETMARGIN">SetMargin()</a> <br>
<a href="Graph.html#_GRAPH_SETMARGINCOLOR">SetMarginColor()</a> <br>
<a href="Graph.html#_GRAPH_SETSCALE">SetScale()</a> <br>
<a href="Graph.html#_GRAPH_SETSHADOW">SetShadow()</a> <br>
<a href="Graph.html#_GRAPH_SETTEXTSCALEABSCENTEROFF">SetTextScaleAbsCenterOff()</a> <br>
<a href="Graph.html#_GRAPH_SETTICKDENSITY">SetTickDensity()</a> <br>
<a href="Graph.html#_GRAPH_SETTITLEBACKGROUND">SetTitleBackground()</a> <br>
<a href="Graph.html#_GRAPH_SETTITLEBACKGROUNDFILLSTYLE">SetTitleBackgroundFillStyle()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT">SetUserFont()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT1">SetUserFont1()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT2">SetUserFont2()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT3">SetUserFont3()</a> <br>
<a href="Graph.html#_GRAPH_SETY2ORDERBACK">SetY2OrderBack()</a> <br>
<a href="Graph.html#_GRAPH_SETY2SCALE">SetY2Scale()</a> <br>
<a href="Graph.html#_GRAPH_SETYDELTADIST">SetYDeltaDist()</a> <br>
<a href="Graph.html#_GRAPH_SETYSCALE">SetYScale()</a> <br>
<a href="Graph.html#_GRAPH_STROKE" style="color:darkgrey;">Stroke() </a><br>
<a href="Graph.html#_GRAPH_STROKECSIM">StrokeCSIM()</a> <br>
<a href="Graph.html#_GRAPH_STROKECSIMIMAGE">StrokeCSIMImage()</a> <br>
<a href="Graph.html#_GRAPH_STROKEFRAMEBACKGROUND">StrokeFrameBackground()</a> <br>
<a href="Graph.html#_GRAPH_STROKESTORE">StrokeStore()</a> <br>
<a href="Graph.html#_GRAPH___CONSTRUCT" style="color:darkgrey;">__construct() </a><br>
</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.
<p>
You can add several PiePlots by adjusting their size and positioning each PiePlot so it doesn't overlap eachother.
<p>
<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>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PIEGRAPH_ADD"><span style="color:#555555;">PieGraph ::</span><br><b>Add</b>($aObj)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add object to the pie graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aObj</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Object to add</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">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>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$piegraph </span><span style="color: #007700">= new </span><span style="color: #0000BB">PieGraph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">400</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pieplot </span><span style="color: #007700">= new </span><span style="color: #0000BB">PiePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$ydata</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$piegraph</span><span style="color: #007700">-></span><span style="color: #0000BB">Add</span><span style="color: #007700">(</span><span style="color: #0000BB">$pieplot</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PIEGRAPH_SETANTIALIASING"><span style="color:#555555;">PieGraph ::</span><br><b>SetAntiAliasing</b>($aFlg)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Enable/disable anti-alias for Pie Graphs</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFlg</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>true=enable anti-aliasing</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">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:
<ul>
<li> Enabling anti-alias will severely impact performance. As a rule of thumb you can expect drawing to take 5-8 times longer !
<li> You can't use background images or gradient backgrounds together with anti-alias
</ul>
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$piegraph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAntiAlias</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PIEGRAPH_SETCOLOR"><span style="color:#555555;">PieGraph ::</span><br><b>SetColor</b>($c)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set the background color. Synonym to SetMarginColor()</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$c</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Color</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set the background color. Synonym to SetMarginColor() <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH___CONSTRUCT">Graph::__construct()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$piegraph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'gray'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PIEGRAPH_STROKE"><span style="color:#555555;">PieGraph ::</span><br><b>Stroke</b>($aStrokeFileName)</a></div>
<span style='font-family:arial;font-size:95%;'><i>// Method description</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStrokeFileName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">""</span><span style="color: #0000BB"></span>
</span>
</td><td>Filename</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Stroke the piegraph to the browser or to a specified file if specified. Works exactly the same as Graph::Stroke()
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">...<br /></span><span style="color: #0000BB">$piegraph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">()<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PIEGRAPH___CONSTRUCT"><span style="color:#555555;">PieGraph ::</span><br><b>__construct</b>($width, $height, $cachedName, $timeout, $inline)</a></div>
<span style='font-family:arial;font-size:95%;'><i>//---------------// CONSTRUCTOR
</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$width</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">300</span>
</span>
</td><td>Width of graph</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$height</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">200</span>
</span>
</td><td>Height of graph</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$cachedName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">""</span><span style="color: #0000BB"></span>
</span>
</td><td>Cache file name</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$timeout</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Cache timeout in s</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$inline</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Should the image be inline.</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>See Graph::Graph() <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH___CONSTRUCT">Graph::__construct()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$piegraph </span><span style="color: #007700">= new </span><span style="color: #0000BB">PieGraph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">400</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p> <hr> <p></html>