-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomp_graph.php
71 lines (60 loc) · 1.54 KB
/
comp_graph.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
include_once ("graph/jpgraph.php");
include_once ("graph/jpgraph_pie.php");
// Some data
if (isset($_GET['full']))
{
$data[] = $_GET['full'];
$titles[] = 'Full and open competition %d';
}
if (isset($_GET['exlusion']))
{
$data[] = $_GET['exlusion'];
$titles[] = "Competition after exclusion of sources";
}
if (isset($_GET['one_bid']))
{
$data[] = $_GET['one_bid'];
$titles[] = "Full and open competition but only one bid";
}
if (isset($_GET['follow_on']))
{
$data[] = $_GET['follow_on'];
$titles[] = "Follow on contract";
}
if (isset($_GET['not_available']))
{
$data[] = $_GET['not_available'];
$titles[] = "Not available for competition";
}
if (isset($_GET['no_comp']))
{
$data[] = $_GET['no_comp'] ;
$titles[] = "Not competed";
}
if (isset($_GET['unknown']))
{
$data[] = $_GET['unknown'];
$titles[] = "Unkown";
}
// Create the Pie Graph.
$graph = new PieGraph(300,400,'auto');
//$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("Competition");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
// Create
$p1 = new PiePlot($data);
$p1->SetCenter(0.5,0.3);
$p1->SetLegends($titles);
$graph->legend->Pos(0.01,0.6,'left','top');
$graph->legend->SetLayout(LEGEND_VERT);
/*$targ=array("pie_csimex1.php#1","pie_csimex1.php#2","pie_csimex1.php#3",
"pie_csimex1.php#4","pie_csimex1.php#5","pie_csimex1.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);*/
$graph->Add($p1);
// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->Stroke();
?>