Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
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_PIEPLOT3D"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>PiePlot3D</b> EXTENDS <a href="PiePlot .html#_C_PIEPLOT " style="font-face:arial;font-weight:bold;">PiePlot </a></div>
9
<i>(Defined in: jpgraph_pie3d.php : 17)</i><table border=1><tr><td>&nbsp;<a href="PiePlot3D.html" style="font-family:arial;font-weight:bold;color:darkblue;">PiePlot3D</a>&nbsp;</td><td>&nbsp;<a href="PiePlot .html" style="font-family:arial;font-weight:bold;color:darkblue;">PiePlot </a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_PIEPLOT3D">PiePlot3d()</a>&nbsp;<br>
10
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETANGLE">SetAngle()</a>&nbsp;<br>
11
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETCSIMTARGETS">SetCSIMTargets()</a>&nbsp;<br>
12
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETEDGE">SetEdge()</a>&nbsp;<br>
13
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETHEIGHT">SetHeight()</a>&nbsp;<br>
14
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETLABELMARGIN">SetLabelMargin()</a>&nbsp;<br>
15
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETLABELS">SetLabels()</a>&nbsp;<br>
16
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETLEGENDS">SetLegends()</a>&nbsp;<br>
17
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETSLICECOLORS">SetSliceColors()</a>&nbsp;<br>
18
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SETSTARTANGLE">SetStartAngle()</a>&nbsp;<br>
19
&nbsp;<a href="PiePlot3D.html#_PIEPLOT3D_SHOWBORDER">ShowBorder()</a>&nbsp;<br>
20
</td><td valign=top>&nbsp;</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>A 3D pie plot is much like a normal pie plot but in a 3D setting. You can control the apperance by specifying the angle of attack for the pie. A small angle show a very "flat" pie while a large angle shows almost a 2D pie.
21
 
22
Please note that a 3D pie is <b>much</b> more CPU intensive to draw then the normal pie. To reduce the time you might want to keep the height of the pie as small as you think looks good.  The height has a direct linear impact on how long it takes to draw a 3D pie. (See SetHeight()).
23
 
24
To view a 3D pieplot you start by constructing a PieGraph() and then adding a numerb of constructed PiePlot3D to this graph.
25
 <p> &nbsp;
26
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="PieGraph.html">PieGraph</a> and <a href="PiePlot.html">PiePlot</a> <p> &nbsp;<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
27
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_PIEPLOT3D"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
28
function&nbsp;PiePlot3d(&amp;$data)</font>
29
</b></div></a></span>
30
 
31
<span style='font-family:arial;font-size:90%;'><i>Construct a new 3D pie plot</i></span><p>
32
 
33
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
34
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
35
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
36
&amp;$data</font>
37
 
38
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Data array for slices</td></tr>
39
</table>
40
 
41
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>This creates a new pie plot using the data supplied. This plot can then be added to the pie graph.&nbsp;<br>
42
 
43
<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">
44
$pieplot3d&nbsp;=&nbsp;new&nbsp;PiePlot3d($ydata);
<br />
<br />$piegraph-&gt;Add($pieplot3d);
<br /></font>
45
</span><br>
46
<p>
47
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETANGLE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
48
function&nbsp;SetAngle($a)</font>
49
</b></div></a></span>
50
51
<span style='font-family:arial;font-size:90%;'><i>Specify projection angle for 3D in degrees.</i></span><p>
52
53
 
54
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
55
 
56
$a</font>
57
58
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Projection angle in degrees</td></tr>
59
</table>
60
 
61
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify projection angle for 3D in degrees. Must be between 10 and 80 degrees. A small angle will make the pie very flat and a large angle will make it present much more of pie circle.&nbsp;<br>
62
63
 
64
$pieplot-&gt;SetAngle(45);
<br /></font>
65
 
66
<p>
67
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETCSIMTARGETS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
68
function&nbsp;SetCSIMTargets($targets,$alts)</font>
69
</b></div></a></span>
70
71
<span style='font-family:arial;font-size:90%;'><i>Specify URL for each slice for the image map</i></span><p>
72
73
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
74
 
75
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
76
 
77
78
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Array of URL targets</td></tr>
79
80
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
81
 
82
83
 
84
null</font>
85
</td><td>Array of Alt texts</td></tr>
86
 
87
88
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify URL for each slice for the image map&nbsp;<br>
89
90
<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">
91
 
92
</span><br>
93
 
94
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETEDGE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
95
function&nbsp;SetEdge($aColor,$aWeight)</font>
96
</b></div></a></span>
97
98
<span style='font-family:arial;font-size:90%;'><i>Add a line around pie slices</i></span><p>
99
100
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
101
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
102
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
103
$aColor</font>
104
105
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
106
 
107
</td><td>Color for line</td></tr>
108
 
109
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
110
$aWeight</font>
111
112
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
113
 
114
</td><td>Width of line</td></tr>
115
</table>
116
117
 
118
119
Default is to not show any lines.&nbsp;<br>
120
 
121
<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">
122
$pieplot3d-&gt;SetEdge('blue',1);</font>
123
</span><br>
124
<p>
125
 
126
function&nbsp;SetHeight($aHeight)</font>
127
 
128
129
 
130
131
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
132
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
133
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
134
$aHeight</font>
135
136
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Height in pixels</td></tr>
137
 
138
139
 
140
141
<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">
142
$pieplot-&gt;SetHeight(20);</font>
143
</span><br>
144
 
145
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETLABELMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
146
function&nbsp;SetLabelMargin($m)</font>
147
 
148
149
 
150
151
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
152
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
153
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
154
$m</font>
155
156
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Margin in pixels</td></tr>
157
 
158
159
 
160
161
<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">
162
$pieplot3d-&gt;SetLabelMargin(20);</font>
163
</span><br>
164
 
165
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETLABELS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
166
function&nbsp;SetLabels($aLabels,$aLblPosAdj)</font>
167
 
168
169
 
170
171
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
172
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
173
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
174
$aLabels</font>
175
176
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Label arrays</td></tr>
177
 
178
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
179
 
180
181
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
182
"auto"</font>
183
</td><td>Label position [0.2- 1]</td></tr>
184
 
185
186
 
187
<p>
188
The labels may include an optional sprintf() formatting string. Before stroking the label to the graph it will be formatted with the actual value (absolute or percentage)  depending on what has been specified with the SetLabelType() method.
189
 
190
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="PiePlot.html#_PIEPLOT_SETLABELTYPE">PiePlot::SetLabelType</a>
191
<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">
192
//&nbsp;Specify&nbsp;explicit&nbsp;labels&nbsp;and&nbsp;position&nbsp;them&nbsp;outside&nbsp;the&nbsp;pie
<br />$p1-&gt;SetLabels(array("Jan\n%.1f%%","Feb\n%.1f%%","Mar\n%.1f%%","Apr\n%.1f%%"),1);
<br /></font>
193
</span><br>
194
 
195
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETLEGENDS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
196
function&nbsp;SetLegends($aLegend)</font>
197
</b></div></a></span>
198
199
<span style='font-family:arial;font-size:90%;'><i>Set legends for slices</i></span><p>
200
201
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
202
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
203
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
204
$aLegend</font>
205
206
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Array of legends</td></tr>
207
</table>
208
209
 
210
211
 
212
$plot-&gt;SetLegends(array('Jan','Feb','Mar','Apr');</font>
213
</span><br>
214
<p>
215
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETSLICECOLORS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
216
 
217
</b></div></a></span>
218
219
 
220
221
 
222
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
223
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
224
$aColors</font>
225
226
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Array of colors</td></tr>
227
</table>
228
229
 
230
231
 
232
$pieplot-&gt;SetSliceColors(array('red','blue','green','navy','orange'));</font>
233
</span><br>
234
<p>
235
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SETSTARTANGLE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
236
 
237
</b></div></a></span>
238
239
 
240
241
 
242
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
243
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
244
$aStart</font>
245
246
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Start angle (in degrees)</td></tr>
247
</table>
248
249
 
250
251
 
252
$pieplot-&gt;SetStartAngle(45);</font>
253
</span><br>
254
<p>
255
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_PIEPLOT3D_SHOWBORDER"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
256
 
257
</b></div></a></span>
258
259
 
260
261
 
262
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
263
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
264
$exterior</font>
265
266
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
267
true</font>
268
</td><td>Display interior borders</td></tr>
269
 
270
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
271
 
272
273
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
274
true</font>
275
</td><td>Display exterior borders</td></tr>
276
 
277
278
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Select which borders should be displayed. Note that when anti-aliasing is enabled no borders can be shown.&nbsp;<br>
279
<p> <hr> <p>