-
Notifications
You must be signed in to change notification settings - Fork 1
/
bc.html
43 lines (34 loc) · 1.4 KB
/
bc.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D3 Bubble Chart with Year Filter</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<link rel="stylesheet" href="css/bcStyles.css">
</head>
<body>
<h1>Renewable, Non-Renewable vs GDP</h1>
<button id="backButton" class="navigation-button">Back</button>
<button id="nextButton" class="navigation-button">Next</button>
<!-- Year Filter -->
<label for="yearFilter">Select Year:</label>
<select id="yearFilter"></select>
<!-- Wrap the chart in a container div -->
<div id="bc-chart-container">
<script src="js/bc.js"></script>
</div>
<script>
// Back button logic
const backButton = document.getElementById("backButton");
backButton.addEventListener("click", function () {
window.location.href = "pareto.html" // Go to the previous page
});
// Next button logic
const nextButton = document.getElementById("nextButton");
nextButton.addEventListener("click", function () {
window.location.href = "sac.html"; // Navigate to sac.html
});
</script>
</body>
</html>