]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/external_packages/phplot/examples/example7.php
Update
[bacula/bacula] / gui / bacula-web / external_packages / phplot / examples / example7.php
1 <?php
2 include("./data_date2.php");
3 include("../phplot.php");
4 $graph = new PHPlot;
5 $graph->SetDataType("data-data-error");  //Must be called before SetDataValues
6
7 $graph->SetImageArea(600,400);
8 $graph->SetPrecisionY(0);
9 $graph->SetXLabel("");
10 $graph->SetYLabel("Volume");
11 $graph->SetVertTickIncrement(20);
12 $graph->SetXAxisPosition(1);
13 //$graph->SetSkipBottomTick(1);
14
15 //Set Unixtime Increment and X Axis Settings
16 $graph->SetHorizTickIncrement(2679000);
17 $graph->SetXGridLabelType("time");
18 $graph->SetXTimeFormat("%b %y");
19 $graph->SetXDataLabelAngle(90);
20
21 $graph->SetDataValues($example_data);
22 $graph->SetPlotType("lines");
23 $graph->SetErrorBarShape("line");
24 $graph->SetPointShape("halfline");
25 $graph->SetYScaleType("log");
26 $graph->SetLineWidth(1);
27 $graph->SetDrawXDataLabels(false);
28
29 //Since X axis is in Unixtime format we set the limits accordingly
30 $graph->SetPlotAreaWorld(883634400,1,915095000,140);
31
32 $graph->DrawGraph();
33 ?>