]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/external_packages/phplot/examples/format_chart.php
Update
[bacula/bacula] / gui / bacula-web / external_packages / phplot / examples / format_chart.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3 <head>
4     <title>Example-o-matic</title>
5     <link type="text/css" rel="stylesheet" href="../doc/style.css" />
6 </head>
7 <body>
8
9 <div class="nav"> [ <a href="../doc/index.php">Go to the index</a> ] </div>
10
11 <h2>PHPlot test graph form</h2>
12
13 <p>Use this form to test many different options of PHPlot. You can test
14 every graph type supported for any of four different data types. You can
15 tweak as you like or you can leave everything as is and press "Submit" for
16 automatic values.
17 </p>
18 <form action="create_chart.php" method="post">
19 <center>
20 <table border="0">
21
22         <tr><td colspan="2" class="hdr">Data Settings</td></tr>
23         
24 <tr>
25   <td colspan="2">
26     <p>
27       Data type: [
28         <a href="format_chart.php?which_data_type=text-data">text-data</a> |
29         <a href="format_chart.php?which_data_type=data-data">data-data</a> |
30         <a href="format_chart.php?which_data_type=function">function</a> |
31         <a href="format_chart.php?which_data_type=data-data-error">data-data-error</a> |
32         <a href="format_chart.php?which_data_type=randfunction">randfunction</a> ]
33     </p>
34     <?php
35         if ($_GET['which_data_type'] == 'text-data')
36             include('data_sample1.php'); 
37         elseif ($_GET['which_data_type'] == 'data-data')
38             include('data_sample2.php');
39         elseif ($_GET['which_data_type'] == 'data-data-error')
40             include('data_sample3.php');
41         elseif ($_GET['which_data_type'] == 'function') 
42             include('data_sample4.php');
43         elseif ($_GET['which_data_type'] == 'randfunction')
44             include('data_sample5.php');
45         else
46             include('data_sample1.php');
47     ?>
48   </td>
49 </tr>
50         <tr><td colspan="2" class="hdr"><input name="submit" type="submit" /></td></tr>
51         <tr>
52           <td colspan="2">
53             <br />
54               <h3 style="text-align:center;margin:0;">Optional values</h3>
55             <br />
56           </td>
57         </tr>
58         <tr><td colspan="2" class="hdr">Sizes</td></tr>
59         
60 <tr>
61   <td>Width of graph in pixels:</td>
62   <td><input type="text" name="xsize_in" value="600" size="4" /></td>
63 </tr>
64 <tr>
65   <td> Height of graph in pixels:</td>
66   <td><input type="text" name="ysize_in" value="400" size="4" /></td>
67 </tr>
68 <tr>  
69   <td>Maximum height of graph in y axis units:</td>
70   <td><input type="text" name="maxy_in" value="" size="4" /></td>
71 </tr>
72 <tr>
73   <td>Minimum height of graph in y axis units:</td>
74   <td><input type="text" name="miny_in" value="" size="4" /></td>
75 </tr>
76
77             <tr><td colspan="2" class="hdr">Titles and data labels</td></tr>
78             
79 <tr>
80   <td>Title:</td>
81   <td><input type="text" name="title" value="This is a title" /></td>
82 </tr>
83 <tr>
84   <td>Y axis title:</td>
85   <td><input type="text" name="ylbl" value="Revenue in millions" /></td>
86 </tr>
87 <tr>
88   <td>Y axis title position:</td>
89   <td>
90     <select name="which_ytitle_pos">
91       <option value="plotleft">Left of plot</option>
92       <option value="plotright">Right of plot</option>
93       <option value="both" selected>Both right and left</option>
94       <option value="none">No Y axis title</option>
95     </select>
96   </td>
97 </tr>
98 <tr>
99   <td>Y axis data labels position:</td>
100   <td>
101     <select name="which_ydata_label_pos">
102       <option value="plotleft">Left of plot</option>
103       <option value="plotright">Right of plot</option>
104       <option value="both">Both right and left</option>
105       <option value="plotin">In the plot (To Do)</option>
106       <option value="none" selected>No data labels</option>
107     </select>
108   </td>
109 </tr>
110 <tr>
111   <td>Y axis labels angle:</td>
112   <td><input name="which_ylabel_angle" value="0" size="3" /></td>
113 </tr>
114
115
116 <tr>
117   <td>X axis title:</td>
118   <td><input type="text" name="xlbl" value="years" /></td>
119 </tr>
120 <tr>
121   <td>X axis title position:</td>
122   <td>
123     <select name="which_xtitle_pos">
124       <option value="plotup">Up of plot</option>
125       <option value="plotdown">Down of plot</option>
126       <option value="both" selected>Both up and down</option>
127       <option value="none">No X axis title</option>
128     </select>
129   </td>
130 </tr>
131 <tr>
132   <td>X axis data labels position:</td>
133   <td>
134     <select name="which_xdata_label_pos">
135       <option value="plotup">Up of plot</option>
136       <option value="plotdown">Down of plot</option>
137       <option value="both" selected>Both up and down</option>
138       <option value="plotin">In the plot (To Do)</option>
139       <option value="none" selected>No data labels</option>
140     </select>
141   </td>
142 </tr>
143 <tr>
144   <td>X axis labels angle:</td>
145   <td><input name="which_xlabel_angle" value="0" size="3" /></td>
146 </tr>
147
148             <tr><td colspan="2" class="hdr">Grid and ticks</td></tr>
149
150
151 <tr>
152   <td>Grid drawn:</td>
153   <td>
154     <select name="which_draw_grid">
155       <option value="x">Vertical grid</option>
156       <option value="y">Horizontal grid</option>
157       <option value="both" selected>Both grids</option>
158       <option value="none">No grid</option>
159     </select>
160   </td>
161 </tr>
162 <tr>
163   <td>Dashed grid?</td>
164   <td>
165     <select name="which_dashed_grid">
166       <option value="1" selected>Yes</option>
167       <option value="0">No</option>
168     </select>
169   </td>
170 </tr>
171 <tr>
172   <td>X axis ticks length:</td>
173   <td><input type="text" name="which_xtl" value="5" size="3"/></td>
174 </tr>
175 <tr>
176   <td>X axis ticks crossing:</td>
177   <td><input type="text" name="which_xtc" value="3" size="3"/></td>
178 </tr>
179 <tr>
180   <td>X axis ticks position:</td>
181   <td>
182     <select name="which_xtick_pos">
183       <option value="plotup">Up of plot</option>
184       <option value="plotdown">Down of plot</option>
185       <option value="both" selected>Both up and down</option>
186       <option value="xaxis">At X axis</option>
187       <option value="none">No ticks</option>
188     </select>
189   </td>
190 </tr>
191 <tr>
192   <td>X axis tick labels position:</td>
193   <td>
194     <select name="which_xtick_label_pos">
195       <option value="plotup">Up of plot</option>
196       <option value="plotdown">Down of plot</option>
197       <option value="both" selected>Both up and down</option>
198       <option value="xaxis">Below X axis</option>
199       <option value="none">No tick labels</option>
200     </select>
201   </td>
202 </tr>
203 <tr>
204   <td>Y axis ticks length:</td>
205   <td><input type="text" name="which_ytl" value="5" size="3"/></td>
206 </tr>
207 <tr>
208   <td>Y axis ticks crossing:</td>
209   <td><input type="text" name="which_ytc" value="3" size="3"/></td>
210 </tr>
211 <tr>
212   <td>Y axis ticks position:</td>
213   <td>
214     <select name="which_ytick_pos">
215       <option value="plotleft">Left of plot</option>
216       <option value="plotright">Right of plot</option>
217       <option value="both" selected>Both right and left</option>
218       <option value="yaxis">At Y axis</option>
219       <option value="none">No ticks</option>
220     </select>
221   </td>
222 </tr>
223 <tr>
224   <td>Y axis tick labels position:</td>
225   <td>
226     <select name="which_ytick_label_pos">
227       <option value="plotleft">Left of plot</option>
228       <option value="plotright">Right of plot</option>
229       <option value="both" selected>Both right and left</option>
230       <option value="yaxis">Left of Y axis</option>
231       <option value="none">No tick labels</option>
232     </select>
233   </td>
234 </tr>
235 <tr>
236   <td>X tick increment:</td>
237   <td><input type="text" name="which_xti" value="1" /></td>
238 </tr>
239 <tr>
240   <td>Y tick increment:</td>
241   <td><input type="text" name="which_yti" value="" /></td>
242 </tr>
243
244
245             <tr><td colspan="2" class="hdr">Other</td></tr>
246
247
248 <tr>
249   <td>X axis position:</td>
250   <td><input type="text" name="which_xap" value="0" size="5"/></td>
251 </tr>
252 <tr>
253   <td>Y axis position:</td>
254   <td><input type="text" name="which_yap" value="0" size="5"/></td>
255 </tr>
256 <tr>
257   <td>Plot Border:</td>
258   <td>
259     <select name="which_btype">
260       <option value="plotleft">Left of plot</option>
261       <option value="plotright">Right of plot</option>
262       <option value="both">Both sides of plot</option>
263       <option value="full" selected>All four sides</option>
264       <option value="none">None</option>
265     </select> 
266   </td>
267 </tr>
268
269
270 <tr>
271   <td>Shade height (0 for none):</td>
272   <td><input type="text" name="which_shading" value="5" size="3"/></td>
273 </tr>  
274 <tr>
275   <td>Plot line width:</td>
276   <td><input name="which_line_width" value="1" size="3" /></td>
277 </tr>
278 <tr>
279   <td>Error bar line width:</td>
280   <td><input name="which_errorbar_line_width" value="1" size="3" /></td>
281 </tr>
282 <tr>
283   <td>Point Type:</td>
284   <td>
285     <select name="which_point">
286           <option value="diamond">Diamond</option>
287           <option value="rect">Square</option>
288           <option value="circle">Circle</option>
289           <option value="triangle">Triangle</option>
290           <option value="trianglemid">Centered triangle</option>
291       <option value="dot">Filled dot</option>
292           <option value="line">Line</option>
293           <option value="halfline">Half line</option>
294       <option value="cross" selected>Cross</option>
295       <option value="plus" selected>Plus sign</option>
296     </select>
297   </td>
298 </tr>
299 <tr>
300   <td>Point Size:</td>
301   <td><input name="which_point_size" value="4" size="3" /></td>
302 </tr>
303 <tr>
304   <td>Draw broken lines with missing Y data:</td>
305   <td>
306     <select name="which_broken">
307       <option value="0" selected>No</option>
308       <option value="1">Yes</option>
309     </select>
310 <tr>
311   <td>Use TrueType font:</td>
312   <td>
313     <select name="which_use_ttf">
314       <option value="0" selected>No</option>
315       <option value="1">Yes</option>
316     </select>
317   </td>
318 </tr>
319 <tr>
320   <td>File format:</td>
321   <td>
322     <select name="which_fileformat">
323       <option value="png">png</option>
324       <option value="jpg">jpeg</option>
325       <option value="gif">gif</option>
326       <option value="wbmp">bmp</option>
327     </select>
328   </td>
329 </tr>
330         <tr><td colspan="2" class="hdr"><input name="submit" type="submit" /></td></tr>
331
332 </table>
333 </center>
334 </form>
335
336 <p>
337 Please visit <a href="http://phplot.sourceforge.net">PHPlot's site</a>, the
338 <a href="http://sourceforge.net/projects/phplot/">sourceforge project page</a>,
339 or see <a href="http://www.jeo.net/php/">more php code and examples</a> 
340 by Afan Ottenheimer of jeonet.
341 </p>
342
343 <p class="foot">$Id$</p>
344 </body>
345 </html>