-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCarGauges.html
More file actions
144 lines (139 loc) · 3.55 KB
/
Copy pathCarGauges.html
File metadata and controls
144 lines (139 loc) · 3.55 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>MindFusion Charting Sample - Car Gauges Redesign</title>
<link href="common/samples.css" rel="stylesheet" />
<script type="text/javascript" src="common/samples.js"></script>
<style type="text/css">
#content {
background-color: #0f111a;
color: #ffffff;
}
.dashboard {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
padding: 40px;
justify-items: center;
align-items: start;
}
.gauge-card {
background: #1a1d2e;
border-radius: 16px;
padding: 24px;
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
text-align: center;
width: 100%;
max-width: 400px;
}
.gauge-card h3 {
margin-top: 0;
margin-bottom: 20px;
font-weight: 500;
color: #90a4ae;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 14px;
}
.gauge-controls {
margin-top: 20px;
display: flex;
gap: 15px;
justify-content: center;
align-items: center;
}
.gauge-controls label {
font-size: 12px;
color: #b0bec5;
}
.gauge-controls input {
background: #262a3f;
border: 1px solid #37474f;
color: #ffffff;
width: 60px !important;
}
.small-gauges {
grid-column: span 2;
display: flex;
gap: 40px;
width: 100%;
justify-content: center;
}
</style>
</head>
<body>
<input type="hidden" id="collapsed" />
<div id="header">
<div style="float: left; margin-left: 5px;">
<a href="index.html" style="margin-left: 10px;">Index</a>
</div>
<div style="float: right; margin-right: 5px;">
<a href="CarGauges.js" style="margin-right: 10px;">View source</a>
<button id="expandButton" onclick="onExpandCollapse()">
›
</button>
</div>
</div>
<div id="info">
<div id="infoTab" style="padding: 10px;">
<h1>
Car Dashboard
</h1>
<p id="pinfo">
A modern automotive dashboard demonstration using MindFusion OvalGauge controls.
Custom drawing is used for the sleek, dark aesthetic and high-performance feel.
</p>
</div>
</div>
<div id="content">
<div class="dashboard">
<div class="gauge-card">
<h3>Speedometer</h3>
<canvas id="speedometer" width="340" height="340"></canvas>
<div class="gauge-controls">
<label>Speed</label>
<input id="speed" value="80" />
<label>Fuel</label>
<input id="fuel" value="65" />
</div>
</div>
<div class="gauge-card">
<h3>Tachometer</h3>
<canvas id="cyclometer" width="340" height="340"></canvas>
<div class="gauge-controls">
<label>RPM (x100)</label>
<input id="rpm" value="35" />
</div>
</div>
<div class="small-gauges">
<div class="gauge-card">
<h3>Battery</h3>
<canvas id="batteryMeter" width="280" height="160"></canvas>
<div class="gauge-controls">
<label>Volt</label>
<input id="volt" value="12" />
</div>
</div>
<div class="gauge-card">
<h3>Oil Pressure</h3>
<canvas id="oilMeter" width="280" height="160"></canvas>
<div class="gauge-controls">
<label>Oil</label>
<input id="oil" value="45" />
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<span id="copyright"></span>
</div>
<script src="Scripts/drawing.js" type="text/javascript"></script>
<script src="Scripts/controls.js" type="text/javascript"></script>
<script src="Scripts/common.js" type="text/javascript"></script>
<script src="Scripts/common-collections.js" type="text/javascript"></script>
<script src="Scripts/gauges.js" type="text/javascript"></script>
<script type="text/javascript" src="CarGauges.js"></script>
</body>
</html>