-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-02-graph-pie.html
51 lines (50 loc) · 2.09 KB
/
demo-02-graph-pie.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D3 - Pie chart</title>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
crossorigin="anonymous"
>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.0.2/firebase-app.js"></script>
<!-- Not in the provided script, add it manually -->
<script src="https://www.gstatic.com/firebasejs/8.0.2/firebase-firestore.js"></script>
</head>
<body class="bg-dark">
<h2 class="text-center display-4 text-white m-5">D3 - Pie graph</h2>
<div class="container">
<div class="row">
<!-- INPUTS -->
<div class="col-md-5 mt-5 mr-5">
<form>
<div class="form-group">
<label class="text-white" for='name'>Item name</label>
<input type="text" class="form-control" id="name">
</div>
<div class="form-group">
<label class="text-white" for='price'>Item price</label>
<input type="text" class="form-control" id="price">
</div>
<button type="submit" class="btn btn-primary btn-block">Add</button>
<p class="text-white" id="error"></p>
</form>
</div>
<!-- PIE CHART -->
<div class="col-md-5 ml-5">
<div class="box ml-5 mt-5"></div>
</div>
</div>
</div>
<script src="assets/js/d3/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.25.6/d3-legend.min.js"></script>
<script src="assets/js/demo-02-graph-pie-firebase.js"></script>
<script src="assets/js/demo-02-graph-pie-inputs.js"></script>
<script src="assets/js/demo-02-graph-pie.js"></script>
</body>
</html>