-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrafik.php
170 lines (167 loc) · 4.72 KB
/
grafik.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
include_once 'header.php';
include_once 'includes/nilai.inc.php';
$pro3 = new Nilai($db);
$stmt3 = $pro3->readAll();
include_once 'includes/alternatif.inc.php';
$pro1 = new Alternatif($db);
$stmt1 = $pro1->readAll();
$stmt4 = $pro1->readAll();
include_once 'includes/kriteria.inc.php';
$pro2 = new Kriteria($db);
$stmt2 = $pro2->readAll();
include_once 'includes/bobot.inc.php';
$pro5 = new Bobot($db);
$stmt5 = $pro5->readAll();
?>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-4">
<br/>
<!-- <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Input Data</h3>
</div>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
<li role="presentation"><a href="nilai.php">Nilai</a></li>
<li role="presentation"><a href="kriteria.php">Kriteria</a></li>
<li role="presentation"><a href="alternatif.php">Alternatif</a></li>
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Analisa Data</h3>
</div>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
<li role="presentation"><a href="bobot.php">Bobot</a></li>
<li role="presentation"><a href="rangking.php">Rangking</a></li>
<li role="presentation"><a href="laporan.php">Laporan</a></li>
</ul>
</div> -->
<!-- </div> -->
</div>
<div class="col-xs-12 col-sm-12 col-md-8" style="margin-left: -120px;">
<div id="container2" style="min-width: 100%; height: 400px; margin: 0 auto"></div>
</div>
</div>
<!-- <div class="row" >
<div class="col-xs-12 col-sm-12 col-md-3" >
<div class="panel panel-default" >
<div class="panel-heading">
<h3 class="panel-title" >Nilai Preferensi</h3>
</div>
<div class="panel-body">
<ol>
<?php
while ($row3 = $stmt3->fetch(PDO::FETCH_ASSOC)){
?>
<li><?php echo $row3['ket_nilai'] ?> (<?php echo $row3['jum_nilai'] ?>)</li>
<?php
}
?>
</ol>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Kriteria-Kriteria</h3>
</div>
<div class="panel-body">
<ol>
<?php
while ($row2 = $stmt2->fetch(PDO::FETCH_ASSOC)){
?>
<li><?php echo $row2['nama_kriteria'] ?></li>
<?php
}
?>
</ol>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Bobot Kriteria</h3>
</div>
<div class="panel-body">
<ol class="list-unstyled">
<?php
while ($row5 = $stmt5->fetch(PDO::FETCH_ASSOC)){
?>
<li><?php echo $row5['hasil_bobot'] ?></li>
<?php
}
?>
</ol>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Alternatif Produk</h3>
</div>
<div class="panel-body">
<ol>
<?php
while ($row1 = $stmt1->fetch(PDO::FETCH_ASSOC)){
?>
<li><?php echo $row1['nama_alternatif'] ?></li>
<?php
}
?>
</ol>
</div>
</div>
</div>
</div> -->
<!-- <footer class="text-center">© 2015</footer> -->
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script src="js/highcharts.js"></script>
<script src="js/exporting.js"></script>
<script>
var chart1; // globally available
$(document).ready(function() {
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container2',
type: 'column'
},
title: {
text: 'Grafik Perangkingan '
},
xAxis: {
categories: ['Alternatif']
},
yAxis: {
title: {
text: 'Jumlah Nilai'
}
},
series:
[
<?php
while ($row4 = $stmt4->fetch(PDO::FETCH_ASSOC)){
?>
//data yang diambil dari database dimasukan ke variable nama dan data
//
{
name: '<?php echo $row4['nama_alternatif'] ?>',
data: [<?php echo $row4['vektor_v'] ?>]
},
<?php } ?>
]
});
});
</script>
</body>
</html>