-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaxis.html
91 lines (71 loc) · 2.96 KB
/
axis.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Axis Attempts</title>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script src="//d3js.org/d3-scale-chromatic.v0.3.min.js"></script>
<link rel="stylesheet" href="index.css">
</head>
<body>
<script src="radar1.js"></script>
<script src="scatter.js"></script>
<script src="//d3js.org/d3-scale-chromatic.v0.3.min.js"></script>
<h1>Find a Car in your Price Range</h1>
<h3>Range anxiety is one of the biggest barriers to purchasing an electric car. When in reality 93% of trips are less than 160km.
An electric car can substitute the vast majority of your driving.</h3>
<h2>Use the inputs and drop downs below to help you find an electric car that suits your needs.</h2>
<h2>Select individual cars by clicking on their dot and use the radar chart below to compare their features.</h2>
<svg id="scatter2" width="1300" height="640" viewBox="0 0 1300 640">
<rect class="bg"></rect>
</svg>
<script>
setupModel("scatter2", "price", "range", "Price (CDN$)", "Range (km)", "avgPrice", "avgTrip");
</script>
<div style="float:left;margin-right:20px;">
<button id="switchDots", onclick="switchDots()">Switch to Brand View</button>
</div>
<div style="float:right;">
<label for="changePrice">Select Price</label>
<input id="changePrice" type="text" onchange="changePrice()" value=33500>
<label for="changeRange">Select Range</label>
<input id="changeRange" type="text" onchange="changeRange()" value=160>
</div>
<div style="float:right;">
<label for="filterBody">Body Style:</label>
<select id="filterBody" onchange="filterData()">
<option value="none"></option>
<option value="SUV">SUV</option>
<option value="Sedan">Sedan</option>
<option value="Hatchback">Hatchback</option>
<option value="Pickup">Pickup</option>
</select>
</div>
<div style="float:right;">
<label for="filterPower">Drive Wheels:</label>
<select id="filterPower" onchange="filterData()">
<option value="none"></option>
<option value="AWD">AWD</option>
<option value="FWD">FWD</option>
<option value="RWD">RWD</option>
</select>
</div>
<div style="float:right;">
<label for="filterSeats">Number of Seats:</label>
<select id="filterSeats" onchange="filterData()">
<option value="none"></option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
</div>
<h1 style="float:left;">Compare your Selected Cars</h1>
<svg id="radar1" width="700" height="400" viewBox="0 0 700 400">
<rect class="bg"></rect>
</svg>
<script>
setupRadar1("radar1");
</script>
</body>
</html>