-
Notifications
You must be signed in to change notification settings - Fork 3
/
PieChart.php
143 lines (122 loc) · 4.13 KB
/
PieChart.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<?php
include('session.php');
?>
<html>
<head>
<title>Online Election</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="css/login.css" type="text/css">
<link href="css/head.css" rel="stylesheet">
<link href="css/result.css" rel="stylesheet">
<link href="css/PieChart.css" rel="stylesheet">
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="http://www.amcharts.com/lib/3/plugins/dataloader/dataloader.min.js"type="text/javascript"></script>
<script type="text/javascript">
var chart = AmCharts.makeChart( "chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider": [ {
"country": "UNP",
"visits": 5098916
}, {
"country": "UPFA",
"visits": 4732664
}, {
"country": "TNA",
"visits": 515963
}, {
"country": "JVP",
"visits": 543944
}, {
"country": "SMC",
"visits": 44193
}, {
"country": "EPDP",
"visits": 33481
} ],
"valueField": "visits",
"titleField": "country",
"balloon":{
"fixedPosition":true
},
"titles": [
{
"id": "Title-1",
"size": 15,
"text": "2015 Sri Lankan Parliamentary Elections"
}],
"export": {
"enabled": true
}
} );
</script>
</head>
<body>
<div class="head">
<div class="container-fluid">
<div class="navbar-header">
<b>Online Election System</b>
</div>
<div>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="VoterHome.php">Home</a>
</li>
<li>
<a href="#services">Search Candidate</a>
</li>
<li>
<a href="#contact">Contact us</a>
</li>
<li>
<a href="VLogout.php">Log Out</a>
</li>
</ul>
</div>
</div>
</div>
<div class= "search">
<form class="form-horizontal" action="" method="post">
<fieldset>
<hr class="colorgraph">
<!-- Name input-->
<div class="form-group">
<div class="col-md-9">
<input id="name" name="name" type="text" placeholder="Election Name " class="form-control">
</div>
</div>
<!-- Email input-->
<div class="form-group">
<div class="col-md-9">
<input id="email" name="email" type="text" placeholder="Election Year" class="form-control">
</div>
</div>
<div id='button' align="center">
<input type='submit' name='vote' value='Search' class='btn btn-primary'/>
<input action="action" type="button" class="btn btn-primary" value="clear" /> </div>
<hr class="colorgraph">
</fieldset>
</form>
<h3><b> Lastest Election Results <b> </h3>
<br>
<h4><a href="#" >2015 Sri Lankan Parliamentary Elections</a> </h4>
<br>
<h4><a href="#" >2015 Sri Lankan Presidential Elections</a> </h4>
<br>
<br>
<input type="submit" value="Column Chart" onclick="location.href ='result.php'" class="btn btn-primary btn-cons">
<!-- Contextual button for informational alert messages -->
<input type="submit" value="Pie Chart" onclick="location.href ='PieChart.php'" class="btn btn-success btn-cons">
<!-- Contextual button for informational alert messages -->
<input type="submit" value="Line Chart" onclick="location.href ='LineChart.php'" class="btn btn-warning btn-cons">
</div>
<div class= "diagram">
<div id="chartdiv" style="width:95% ; height: 500px; margin:10px 50px" color="red"></div>
</div>
</body>
</html>