]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/external_packages/phplot/examples/example3.php
a518e1315e1a73a125fed03e462dc6c0bd4983a8
[bacula/bacula] / gui / bacula-web / external_packages / phplot / examples / example3.php
1 <?php
2 //Include the code
3 include("../phplot.php");
4
5 //Include the code for manipulating data (scaling, moving averages, etc.)
6 include("../phplot_data.php");
7
8 //Define the object
9 $graph = new PHPlot_Data();
10
11 //Define some data
12 include("./data.php");
13
14 //Set the data type 
15 $graph->SetDataType("data-data");
16
17 //Load the data into the data array
18 $graph->SetDataValues($example_data);
19 $graph->DoMovingAverage(4,2,TRUE);
20
21 //Call Scaling Function (in phplot_data.php)
22 //$graph->DoScaleData(1,1);
23
24 //Draw a Legend at pixel location 100,100
25 $graph->SetLegendPixels(100,100,"");
26
27 //have no labels on Y axis
28 //$graph->SetYGridLabelType("none");
29
30 //Print that puppy!
31 $graph->DrawGraph();
32 ?>