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_AXIS"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>Axis</b></div>
9
<i>(Defined in: jpgraph.php : 3483)</i><table border=1><tr><td>&nbsp;<a href="Axis.html" style="font-family:arial;font-weight:bold;color:darkblue;">Axis</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="Axis.html#_AXIS_HIDE">Hide()</a>&nbsp;<br>
10
&nbsp;<a href="Axis.html#_AXIS_HIDEFIRSTLASTLABEL">HideFirstLastLabel()</a>&nbsp;<br>
11
&nbsp;<a href="Axis.html#_AXIS_HIDEFIRSTTICKLABEL">HideFirstTickLabel()</a>&nbsp;<br>
12
&nbsp;<a href="Axis.html#_AXIS_HIDELABELS">HideLabels()</a>&nbsp;<br>
13
&nbsp;<a href="Axis.html#_AXIS_HIDELASTTICKLABEL">HideLastTickLabel()</a>&nbsp;<br>
14
&nbsp;<a href="Axis.html#_AXIS_HIDELINE">HideLine()</a>&nbsp;<br>
15
&nbsp;<a href="Axis.html#_AXIS_HIDETICKS">HideTicks()</a>&nbsp;<br>
16
&nbsp;<a href="Axis.html#_AXIS_HIDEZEROLABEL">HideZeroLabel()</a>&nbsp;<br>
17
&nbsp;<a href="Axis.html#_AXIS_SETCOLOR">SetColor()</a>&nbsp;<br>
18
&nbsp;<a href="Axis.html#_AXIS_SETFONT">SetFont()</a>&nbsp;<br>
19
&nbsp;<a href="Axis.html#_AXIS_SETLABELALIGN">SetLabelAlign()</a>&nbsp;<br>
20
&nbsp;<a href="Axis.html#_AXIS_SETLABELANGLE">SetLabelAngle()</a>&nbsp;<br>
21
&nbsp;<a href="Axis.html#_AXIS_SETLABELFORMAT">SetLabelFormat()</a>&nbsp;<br>
22
&nbsp;<a href="Axis.html#_AXIS_SETLABELFORMATCALLBACK">SetLabelFormatCallback()</a>&nbsp;<br>
23
&nbsp;<a href="Axis.html#_AXIS_SETLABELFORMATSTRING">SetLabelFormatString()</a>&nbsp;<br>
24
&nbsp;<a href="Axis.html#_AXIS_SETLABELMARGIN">SetLabelMargin()</a>&nbsp;<br>
25
&nbsp;<a href="Axis.html#_AXIS_SETLABELPOS">SetLabelPos()</a>&nbsp;<br>
26
&nbsp;<a href="Axis.html#_AXIS_SETLABELSIDE">SetLabelSide()</a>&nbsp;<br>
27
&nbsp;<a href="Axis.html#_AXIS_SETMAJTICKPOSITIONS">SetMajTickPositions()</a>&nbsp;<br>
28
&nbsp;<a href="Axis.html#_AXIS_SETPOS">SetPos()</a>&nbsp;<br>
29
&nbsp;<a href="Axis.html#_AXIS_SETPOSABSDELTA">SetPosAbsDelta()</a>&nbsp;<br>
30
&nbsp;<a href="Axis.html#_AXIS_SETTEXTLABELINTERVAL">SetTextLabelInterval()</a>&nbsp;<br>
31
&nbsp;<a href="Axis.html#_AXIS_SETTEXTTICKINTERVAL">SetTextTickInterval()</a>&nbsp;<br>
32
&nbsp;<a href="Axis.html#_AXIS_SETTEXTTICKS">SetTextTicks()</a>&nbsp;<br>
33
&nbsp;<a href="Axis.html#_AXIS_SETTICKDIRECTION">SetTickDirection()</a>&nbsp;<br>
34
&nbsp;<a href="Axis.html#_AXIS_SETTICKLABELMARGIN">SetTickLabelMargin()</a>&nbsp;<br>
35
&nbsp;<a href="Axis.html#_AXIS_SETTICKLABELS">SetTickLabels()</a>&nbsp;<br>
36
&nbsp;<a href="Axis.html#_AXIS_SETTICKPOSITIONS">SetTickPositions()</a>&nbsp;<br>
37
&nbsp;<a href="Axis.html#_AXIS_SETTICKSIDE">SetTickSide()</a>&nbsp;<br>
38
&nbsp;<a href="Axis.html#_AXIS_SETTITLE">SetTitle()</a>&nbsp;<br>
39
&nbsp;<a href="Axis.html#_AXIS_SETTITLEMARGIN">SetTitleMargin()</a>&nbsp;<br>
40
&nbsp;<a href="Axis.html#_AXIS_SETTITLESIDE">SetTitleSide()</a>&nbsp;<br>
41
&nbsp;<a href="Axis.html#_AXIS_SETWEIGHT">SetWeight()</a>&nbsp;<br>
42
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>The Axis class represents either the X or Y axis in a graph. This class is noramlly accessed through the instance variables graph->xaxis, $graph->yaxis, or $graph->y2axis
43
 
44
Public properties:
45
<table border=1 width=80%>
46
<tr><th width=20%> Name </th><th width=20%> Type </th><th> Description </th></tr>
47
 
48
<tr><td> title </td><td> Text </td><td> Axis title text </td></tr>
49
 
50
<tr><td> scale </td><td> LinearScale/LogScale </td><td> Scale used for axis </td></tr>
51
 
52
</table> <p> &nbsp;
53
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="LinearScale.html">LinearScale</a>, <a href="LogScale.html">LogScale</a> and <a href="Text.html">Text</a> <p> &nbsp;<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
54
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
55
function&nbsp;Hide($aHide)</font>
56
</b></div></a></span>
57
 
58
<span style='font-family:arial;font-size:90%;'><i>Hide the axis</i></span><p>
59
 
60
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
61
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
62
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
63
$aHide</font>
64
 
65
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
66
true</font>
67
</td><td>Flag.</td></tr>
68
</table>
69
 
70
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>This method is used to hide the axis.&nbsp;<br>
71
 
72
<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">
73
$graph-&gt;xaxis-&gt;Hide();&nbsp;//&nbsp;Hide&nbsp;xaxis
<br />$graph-&gt;yaxis-&gt;Hide();&nbsp;//&nbsp;Hide&nbsp;y-axis
<br /></font>
74
</span><br>
75
<p>
76
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDEFIRSTLASTLABEL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
77
function&nbsp;HideFirstLastLabel()</font>
78
</b></div></a></span>
79
80
<span style='font-family:arial;font-size:90%;'><i>Hide the first and last label on the scale.</i></span><p>
81
 
82
83
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide the first and last label on the scale. Usefull whe you are using Axis Type of AXSTYLE_BOXIN or AXSTYLE_BOXOUT to avoid the labels to owerwrite a box around the plot.&nbsp;<br>
84
 
85
<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">
86
//...
<br />$graph-&gt;SetAxisStyle(AXSTYLE_BOXOUT);
<br />$graph-&gt;SetBox();
<br />$graph-&gt;xaxis-&gt;HideFirstLastLabel();
<br />$graph-&gt;yaxis-&gt;HideFirstLastLabel();
<br />//...
<br /></font>
87
</span><br>
88
<p>
89
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDEFIRSTTICKLABEL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
90
function&nbsp;HideFirstTickLabel($aShow)</font>
91
</b></div></a></span>
92
93
<span style='font-family:arial;font-size:90%;'><i>Hide the first label</i></span><p>
94
95
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
96
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
97
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
98
$aShow</font>
99
100
 
101
false</font>
102
 
103
</table>
104
105
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Calling this method will hide the first label on the axis. This is  usefull when the y axis have negative values and a value on the x-axis would be partially obscured by the values on the y-axis.
106
This gets automatically called in this case.
107
 
108
This is probably of less use for the end user of the library.&nbsp;<br>
109
110
<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">
111
$graph-&gt;xaxis-&gt;HideFirstTicklabel()</font>
112
 
113
<p>
114
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDELABELS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
115
function&nbsp;HideLabels($aHide)</font>
116
</b></div></a></span>
117
 
118
<span style='font-family:arial;font-size:90%;'><i>Hide all labels on the axis</i></span><p>
119
120
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
121
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
122
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
123
$aHide</font>
124
125
 
126
true</font>
127
 
128
</table>
129
130
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide all labels on the axis but keep tick marks and axis line.&nbsp;<br>
131
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_HIDE">Axis::Hide</a>, <a href="Axis.html#_AXIS_HIDELINE">Axis::HideLine</a> and <a href="Axis.html#_AXIS_HIDETICKS">Axis::HideTicks</a>
132
 
133
$graph-&gt;xaxis-&gt;HideLabels()</font>
134
</span><br>
135
<p>
136
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDELASTTICKLABEL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
137
 
138
</b></div></a></span>
139
140
<span style='font-family:arial;font-size:90%;'><i>Hide the last tick label on the axis.</i></span><p>
141
142
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
143
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
144
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
145
$aShow</font>
146
147
 
148
false</font>
149
 
150
</table>
151
152
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>The mirror of HideFirstTickLabel()&nbsp;<br>
153
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_HIDEFIRSTTICKLABEL">Axis::HideFirstTickLabel</a> and <a href="Axis.html#_AXIS_HIDEFIRSTLASTLABEL">Axis::HideFirstLastLabel</a>
154
 
155
$graph-&gt;xaxis-&gt;HideLastTickLabel();</font>
156
</span><br>
157
<p>
158
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDELINE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
159
 
160
</b></div></a></span>
161
162
<span style='font-family:arial;font-size:90%;'><i>// Hide the actual axis-line, but still print the labels</i></span><p>
163
164
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
165
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
166
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
167
$aHide</font>
168
169
 
170
true</font>
171
 
172
</table>
173
174
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide the line of the axis. This <strong>only</strong> hides the axis-line but will keep the tick marks and labels. If you want to hide the tick marks you should call HideTicks(). To hide the axis completely, line, ticks and labels use Hide().&nbsp;<br>
175
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_HIDETICKS">Axis::HideTicks</a> and <a href="Axis.html#_AXIS_HIDE">Axis::Hide</a>
176
 
177
//&nbsp;Hide&nbsp;line&nbsp;and&nbsp;tick&nbsp;marks
<br />$graph-&gt;yaxis-&gt;HideLine();
<br />$graph-&gt;yaxis-&gt;HideTicks();
<br /></font>
178
</span><br>
179
<p>
180
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDETICKS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
181
 
182
</b></div></a></span>
183
184
<span style='font-family:arial;font-size:90%;'><i>Hide minor or major tick marks.</i></span><p>
185
186
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
187
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
188
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
189
$aHideMinor</font>
190
191
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
192
true</font>
193
</td><td>True = Hide minor tick marks</td></tr>
194
 
195
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
196
 
197
198
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
199
true</font>
200
</td><td>True = Hide major tick marks</td></tr>
201
 
202
203
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide major or minor tick makrs on the axis.&nbsp;<br>
204
205
 
206
//&nbsp;Only&nbsp;display&nbsp;major&nbsp;tick&nbsp;marks
<br />$graph-&gt;yaxis-&gt;HideTicks(true,false);</font>
207
</span><br>
208
 
209
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_HIDEZEROLABEL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
210
function&nbsp;HideZeroLabel($aFlag)</font>
211
</b></div></a></span>
212
213
 
214
215
 
216
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
217
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
218
$aFlag</font>
219
220
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
221
true</font>
222
</td><td>Flag.</td></tr>
223
</table>
224
 
225
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hide the zero label. Usefull if the axis cross at zero and the label would owerwrite the other axis scale.
226
 
227
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_HIDEFIRSTTICKLABEL">Axis::HideFirstTickLabel</a>
228
<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">
229
$graph-&gt;yaxis-&gt;HideZeroLabel();
<br /></font>
230
</span><br>
231
 
232
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_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">
233
function&nbsp;SetColor($aColor,$aLabelColor)</font>
234
</b></div></a></span>
235
236
 
237
238
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
239
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
240
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
241
$aColor</font>
242
243
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Color for axis</td></tr>
244
245
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
246
$aLabelColor</font>
247
248
 
249
false</font>
250
 
251
</table>
252
253
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specifies the color of the axis line as well as the labels on the axis. If the label color is not specified it will be the same as the axis color.&nbsp;<br>
254
255
 
256
$graph-&gt;xaxis-&gt;SetColor('blue');
<br />$graph-&gt;yaxis-&gt;SetColor('blue','black');</font>
257
 
258
<p>
259
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
260
 
261
</b></div></a></span>
262
263
<span style='font-family:arial;font-size:90%;'><i>Set the font for labels on the axis</i></span><p>
264
265
 
266
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
267
 
268
$aFamily</font>
269
270
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font family</td></tr>
271
272
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
273
$aStyle</font>
274
275
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
276
 
277
</td><td>Font style</td></tr>
278
 
279
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
280
$aSize</font>
281
282
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
283
 
284
</td><td>Font size</td></tr>
285
 
286
287
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify font for labels on axis. Please note that if you need labels to be rotated an angle other than 0 or 90 you must use TTF fonts and not the builtin fonts (i.e. FF_FONT1, FF_FONT2, FF_FONT3)
288
 
289
&nbsp;<br>
290
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELPOS">Axis::SetLabelPos</a> and <a href="Axis.html#_AXIS_SETLABELANGLE">Axis::SetLabelAngle</a>
291
<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">
292
 
293
</span><br>
294
<p>
295
 
296
function&nbsp;SetLabelAlign($aHAlign,$aVAlign,$aParagraphAlign)</font>
297
</b></div></a></span>
298
299
<span style='font-family:arial;font-size:90%;'><i>Specify horizontal and vertical alignment for labels</i></span><p>
300
 
301
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
302
 
303
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
304
$aHAlign</font>
305
306
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Horizontal alignment</td></tr>
307
308
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
309
$aVAlign</font>
310
311
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
312
 
313
</td><td>Vertical alignment</td></tr>
314
 
315
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
316
$aParagraphAlign</font>
317
318
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
319
 
320
</td><td>paragraph align for multi-line texts</td></tr>
321
 
322
323
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specifies the horizontal and vertical alignment for the labels on the axis. The alignment specifies how the labels is adjusted relative to the tickmark.
324
 
325
Note that this is handled automatically but on some occasion there is a genuine need to override the automtic values. For example if the graph is rotated it might be necessary to adjust the alignment to get a visual acceptable label alignment.
326
<p>
327
Possible horizontal alignment are: 'left', 'center', 'right' <br>
328
 
329
<p>
330
See horizbarex1.php, horizbarex2.php for real life examples.
331
 
332
333
<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">
334
$graph-&gt;xaxis-&gt;SetLabelAlign('right','center');</font>
335
</span><br>
336
 
337
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETLABELANGLE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
338
function&nbsp;SetLabelAngle($aAngle)</font>
339
</b></div></a></span>
340
341
<span style='font-family:arial;font-size:90%;'><i>Specify the angle for the tick labels</i></span><p>
342
343
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
344
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
345
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
346
 
347
348
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Angle in degrees</td></tr>
349
</table>
350
351
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the rotation angle for the labels on the axis.
352
<p>
353
Note:<br>
354
 
355
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETFONT">Axis::SetFont</a>
356
 
357
$graph-&gt;xaxis-&gt;SetFont(FF_ARIAL,FS_NORMAL,11);
<br />$graph-&gt;xaxis-&gt;SetLabelAngle(45);&nbsp;//&nbsp;45&nbsp;degrees&nbsp;angle</font>
358
</span><br>
359
<p>
360
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETLABELFORMAT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
361
 
362
</b></div></a></span>
363
364
 
365
366
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
367
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
368
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
369
$aFormStr</font>
370
371
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Format string</td></tr>
372
</table>
373
374
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify a printf() format string for the axis labels. if you need more advanced control of the formatting you can install a label format callbacl routine with Axis::SetLabelFormatCallback()&nbsp;<br>
375
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELFORMATCALLBACK">Axis::SetLabelFormatCallback</a>
376
<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">
377
$graph-&gt;xaxis-&gt;SetLabelFormat('%0.1f%%');</font>
378
 
379
<p>
380
 
381
function&nbsp;SetLabelFormatCallback($aFuncName)</font>
382
</b></div></a></span>
383
384
<span style='font-family:arial;font-size:90%;'><i>Specify callback function for labels on axis</i></span><p>
385
 
386
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
387
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
388
 
389
$aFuncName</font>
390
391
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Callback function</td></tr>
392
</table>
393
394
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>This can be used when more advance formatting of the axis labels are required. For example this could be used to format numbers with space or commas betwen the '1000.
395
<p>
396
The callback routine is called with one argument, the current number to be displayed and should return the number to be displayed.
397
<p>
398
 
399
<p>
400
 
401
global function or a class method, for example
402
403
<pre>
404
$SomeClass = new SomeClass(...);
405
 
406
$g->SetXLabelFormatCallback(array($SomeClass,'xLabelCallback'));
407
</pre>
408
 
409
There is, however, one caution. Any $this data used within LabelFormatCallbackInDerivedClass MUST BE SET BEFORE SetLabelFormatCallback is invoked! it appears that $this is bound/copied when SetLabelFormatCallback is invoked. Only $this data defined at that time is available within the callback function! Likewise, modifications to $this data AFTER SetLabelFormatCallback have no effect since the $this object used by the callback function has already been bound/copied.
410
<p>
411
The same issues obtain when the callback function is in a seperate class!
412
<p>
413
For a full example see barscalecallbackex1.php
414
&nbsp;<br>
415
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELFORMAT">Axis::SetLabelFormat</a>
416
<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">
417
 
418
</span><br>
419
<p>
420
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETLABELFORMATSTRING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
421
function&nbsp;SetLabelFormatString($aFormStr,$aDate)</font>
422
</b></div></a></span>
423
424
<span style='font-family:arial;font-size:90%;'><i>Specify a printf()-style format string for labels.</i></span><p>
425
426
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
427
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
428
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
429
$aFormStr</font>
430
431
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Format string</td></tr>
432
433
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
434
$aDate</font>
435
436
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
437
false</font>
438
</td><td>No description available</td></tr>
439
</table>
440
441
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Synonym for SetLabelFormat().
442
Will be deprecated in a future release. Use SetLabelFormat() instead.&nbsp;<br>
443
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELFORMAT">Axis::SetLabelFormat</a>
444
<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">
445
$graph-&gt;xaxis-&gt;SetLabelFormatString('%0.1f%%');</font>
446
</span><br>
447
 
448
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_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">
449
 
450
</b></div></a></span>
451
452
<span style='font-family:arial;font-size:90%;'><i>Specify margin between labels and tick marks</i></span><p>
453
454
 
455
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
456
 
457
$aMargin</font>
458
459
 
460
</table>
461
462
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify margin between labels and tick marks.&nbsp;<br>
463
464
 
465
$graph-&gt;xaxis-&gt;SetLabelMargin(15);
<br /></font>
466
</span><br>
467
<p>
468
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETLABELPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
469
function&nbsp;SetLabelPos($aSidePos)</font>
470
</b></div></a></span>
471
472
<span style='font-family:arial;font-size:90%;'><i>Specify what side of the axis labels should be on.</i></span><p>
473
474
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
475
 
476
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
477
 
478
479
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Position</td></tr>
480
</table>
481
482
 
483
<p>
484
See topaxisex1.php for an example when this is usefull.
485
 
486
Note: Synonym to SetLabelSide()&nbsp;<br>
487
 
488
<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">
489
$graph-&gt;xaxis-&gt;SetLabelPos(SIDE_TOP);</font>
490
</span><br>
491
<p>
492
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETLABELSIDE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
493
function&nbsp;SetLabelSide($aSidePos)</font>
494
</b></div></a></span>
495
496
 
497
498
 
499
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
500
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
501
$aSidePos</font>
502
503
 
504
</table>
505
506
 
507
<p>
508
See topaxisex1.php for an example when this is usefull.
509
<p>
510
Note: Synonym to SetLabelPos()
511
&nbsp;<br>
512
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELPOS">Axis::SetLabelPos</a>
513
<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">
514
$graph-&gt;xaxis-&gt;SetLabelSide(SIDE_UP);</font>
515
</span><br>
516
<p>
517
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETMAJTICKPOSITIONS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
518
function&nbsp;SetMajTickPositions($aMajPos,$aLabels)</font>
519
</b></div></a></span>
520
 
521
<span style='font-family:arial;font-size:90%;'><i>// Manually specify major tick positions and optional labels</i></span><p>
522
 
523
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
524
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
525
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
526
$aMajPos</font>
527
 
528
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>No description available</td></tr>
529
530
 
531
$aLabels</font>
532
533
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
534
NULL</font>
535
</td><td>No description available</td></tr>
536
</table>
537
538
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>No description available.<p>
539
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
540
function&nbsp;SetPos($aPosOnOtherScale)</font>
541
</b></div></a></span>
542
543
<span style='font-family:arial;font-size:90%;'><i>Position for axis line on the "other" scale</i></span><p>
544
545
 
546
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
547
 
548
$aPosOnOtherScale</font>
549
550
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Position in world-coordinate</td></tr>
551
</table>
552
 
553
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specifies the position of the axis on the other axis. This can be specified as either a numeric value (which gives the absolute position on the other scale). OIt can also be specified as a string value as either 'min' or 'max' which sould position the axis either at the beginning or the end of the opposite axis scale.
554
 
555
See topaxisex1.php for a real life example.&nbsp;<br>
556
557
 
558
$graph-&gt;xaxis-&gt;SetPos('max');&nbsp;//&nbsp;Locate&nbsp;x-axis&nbsp;at&nbsp;the&nbsp;top</font>
559
</span><br>
560
<p>
561
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETPOSABSDELTA"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
562
 
563
</b></div></a></span>
564
565
<span style='font-family:arial;font-size:90%;'><i>Position the multiple Y-axis</i></span><p>
566
567
 
568
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
569
 
570
$aDelta</font>
571
572
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Delta in pixels</td></tr>
573
</table>
574
 
575
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set the position of the Y-axis to be X-pixels delta to the right of the max X-position (used to position the multiple Y-axis)&nbsp;<br>
576
<p>
577
 
578
function&nbsp;SetTextLabelInterval($aStep,$aStart)</font>
579
</b></div></a></span>
580
581
 
582
583
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
584
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
585
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
586
$aStep</font>
587
588
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Intervall</td></tr>
589
 
590
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
591
 
592
593
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
594
0</font>
595
</td><td>No description available</td></tr>
596
 
597
598
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify that every $step tick mark should have a label
599
 
600
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETTICKLABELS">Axis::SetTickLabels</a>
601
<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">
602
//&nbsp;Only&nbsp;draw&nbsp;labels&nbsp;on&nbsp;every&nbsp;2nd&nbsp;tick&nbsp;mark
<br />$graph-&gt;xaxis-&gt;SetTextLabelInterval(2);</font>
603
</span><br>
604
<p>
605
 
606
function&nbsp;SetTextTickInterval($aStep,$aStart)</font>
607
 
608
609
<span style='font-family:arial;font-size:90%;'><i>Specify what ticks should be displayed  </i></span><p>
610
611
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
612
 
613
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
614
 
615
616
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Intervall between ticks</td></tr>
617
 
618
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
619
$aStart</font>
620
621
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
622
 
623
</td><td>Start tick</td></tr>
624
</table>
625
626
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify that every $step of the ticks should be displayed starting at $start.
627
&nbsp;<br>
628
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETTEXTLABELINTERVAL">Axis::SetTextLabelInterval</a> and <a href="Axis.html#_AXIS_SETTEXTTICKS">Axis::SetTextTicks</a>
629
<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">
630
$graph-&gt;SetTextTickInterval(1,2);</font>
631
</span><br>
632
<p>
633
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTEXTTICKS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
634
 
635
</b></div></a></span>
636
 
637
<span style='font-family:arial;font-size:90%;'><i>Specify intervall for ticks on a text scale</i></span><p>
638
639
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
640
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
641
 
642
$step</font>
643
 
644
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Intervall</td></tr>
645
646
 
647
$start</font>
648
649
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
650
0</font>
651
 
652
</table>
653
654
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>DEPRECATED FUNCTION: USE SetTextTickInterval() INSTEAD&nbsp;<br>
655
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETTEXTTICKINTERVAL">Axis::SetTextTickInterval</a>
656
<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">
657
NA</font>
658
</span><br>
659
<p>
660
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTICKDIRECTION"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
661
function&nbsp;SetTickDirection($aDir)</font>
662
 
663
664
 
665
666
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
667
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
668
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
669
 
670
671
 
672
</table>
673
674
 
675
<p>
676
This is a shortform for accessing the tick method directly via the scale in the axis.
677
<p>
678
See topaxisex1.php for real life example.&nbsp;<br>
679
 
680
<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">
681
$graph-&gt;xaxis-&gt;SetTickDirection(SIDE_TOP);</font>
682
</span><br>
683
<p>
684
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTICKLABELMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
685
function&nbsp;SetTickLabelMargin($aMargin)</font>
686
</b></div></a></span>
687
688
<span style='font-family:arial;font-size:90%;'><i>How far from the axis should the labels be drawn</i></span><p>
689
 
690
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
691
 
692
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
693
$aMargin</font>
694
695
</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>
696
 
697
698
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the margin (in pixels) between the axis and the label&nbsp;<br>
699
 
700
<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">
701
$graph-&gt;xaxis-&gt;SetTicklabelmargin(50);</font>
702
</span><br>
703
<p>
704
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTICKLABELS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
705
function&nbsp;SetTickLabels($aLabelArray,$aLabelColorArray)</font>
706
</b></div></a></span>
707
708
<span style='font-family:arial;font-size:90%;'><i>Specify text labels for the ticks. One label for each data point</i></span><p>
709
710
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
711
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
712
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
713
 
714
715
 
716
717
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
718
$aLabelColorArray</font>
719
720
 
721
null</font>
722
</td><td>Individual colors for each label</td></tr>
723
 
724
725
 
726
<p>
727
If fewer labels than data points are specified then the missing labels will be set to the data points ordinal numbers.
728
<p>
729
The color argment is an array that can be used to specify individual colors for each of the labels. If fewer colors than labels are specified then the colors will wrap around.
730
731
&nbsp;<br>
732
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETTEXTLABELINTERVAL">Axis::SetTextLabelInterval</a> and <a href="Axis.html#_AXIS_SETTICKLABELMARGIN">Axis::SetTickLabelMargin</a>
733
 
734
//&nbsp;Set&nbsp;the&nbsp;x-axel&nbsp;to&nbsp;the&nbsp;month&nbsp;of&nbsp;the&nbsp;years&nbsp;using&nbsp;the
<br />//&nbsp;gloablly&nbsp;available&nbsp;$gDateLocale
<br />
<br />$a&nbsp;=&nbsp;$gDateLocale-&gt;GetShortMonth();
<br />$graph-&gt;xaxis-&gt;SetTickLabels($a);
<br />$graph-&gt;xaxis-&gt;SetFont(FF_FONT2);
<br /></font>
735
 
736
<p>
737
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTICKPOSITIONS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
738
function&nbsp;SetTickPositions($aMajPos,$aMinPos,$aLabels)</font>
739
</b></div></a></span>
740
 
741
<span style='font-family:arial;font-size:90%;'><i>// Manually specify the major and (optional) minor tick position and labels</i></span><p>
742
 
743
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
744
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
745
 
746
$aMajPos</font>
747
748
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>No description available</td></tr>
749
750
 
751
$aMinPos</font>
752
753
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
754
NULL</font>
755
</td><td>No description available</td></tr>
756
 
757
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
758
$aLabels</font>
759
760
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
761
NULL</font>
762
</td><td>No description available</td></tr>
763
</table>
764
765
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>No description available.<p>
766
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTICKSIDE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
767
function&nbsp;SetTickSide($aDir)</font>
768
</b></div></a></span>
769
770
<span style='font-family:arial;font-size:90%;'><i>Specify what side of the axis the ticks should be at</i></span><p>
771
772
 
773
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
774
 
775
$aDir</font>
776
777
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Specify side</td></tr>
778
</table>
779
 
780
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify which side of the axis the tick marks should be on. Valid positions for a horizontal axis are SIDE_TOP, SIDE_BOTTOM and for verticla axis SIDE_LEFT and SIDE_RIGHT.
781
 
782
This is a shortform for accessing the tick method directly via the scale in the axis.
783
<p>
784
 
785
&nbsp;<br>
786
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETTICKDIRECTION">Axis::SetTickDirection</a>
787
<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">
788
 
789
</span><br>
790
<p>
791
 
792
function&nbsp;SetTitle($aTitle,$aAdjustAlign)</font>
793
</b></div></a></span>
794
795
<span style='font-family:arial;font-size:90%;'><i>Title for axis</i></span><p>
796
 
797
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
798
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
799
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
800
$aTitle</font>
801
 
802
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Title string</td></tr>
803
 
804
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
805
$aAdjustAlign</font>
806
807
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
808
 
809
</td><td>Alignment of title along the axis</td></tr>
810
</table>
811
 
812
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set the title for the axis. You can specify the alignment as being either "high", "middle" and "low". To adjust the titles font and color you have to access the label instance variable. For example, $graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD)&nbsp;<br>
813
814
<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">
815
$graph-&gt;xaxis-&gt;SetTitle('Values&nbsp;for&nbsp;2002','middle');
<br /></font>
816
</span><br>
817
<p>
818
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETTITLEMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
819
function&nbsp;SetTitleMargin($aMargin)</font>
820
</b></div></a></span>
821
822
<span style='font-family:arial;font-size:90%;'><i>Specify distance from the axis</i></span><p>
823
824
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
825
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
826
 
827
$aMargin</font>
828
 
829
</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>
830
</table>
831
832
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the distance between the axis and the title.&nbsp;<br>
833
 
834
<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">
835
 
836
</span><br>
837
<p>
838
 
839
function&nbsp;SetTitleSide($aSideOfAxis)</font>
840
</b></div></a></span>
841
842
<span style='font-family:arial;font-size:90%;'><i>Specify what side of the axis the title should be at</i></span><p>
843
 
844
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
845
 
846
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
847
$aSideOfAxis</font>
848
849
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Side</td></tr>
850
</table>
851
852
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>For horizontal axis the side can be either SIDE_TOP or SIDE_BOTTOM and for vertical axis the position can be either SIDE_LEF or SIDE_RIGHT.
853
<p>
854
 
855
<p>
856
 
857
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Axis.html#_AXIS_SETLABELSIDE">Axis::SetLabelSide</a> and <a href="Axis.html#_AXIS_SETTICKSIDE">Axis::SetTickSide</a>
858
<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">
859
$graph-&gt;xaxis-&gt;SetTitleSide(SIDE_TOP);
<br /></font>
860
</span><br>
861
 
862
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_AXIS_SETWEIGHT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
863
function&nbsp;SetWeight($aWeight)</font>
864
 
865
866
<span style='font-family:arial;font-size:90%;'><i>Weight of axis</i></span><p>
867
868
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
869
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
870
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
871
$aWeight</font>
872
873
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Weight in pixels</td></tr>
874
 
875
876
 
877
878
<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">
879
$graph-&gt;SetWeight(3);</font>
880
</span><br>
881