This repository has been archived by the owner on Sep 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
testcharts.html
56 lines (52 loc) · 1.79 KB
/
testcharts.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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javaScript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="DynamicChartJS.js"></script>
<style type="text/css">
body {
padding: 16px;
}
.otherContent {
display: block;
min-height: 1200px;
}
#chart-container {
position: relative;
margin: auto;
height: 80%;
width: 80%;
max-width: 400px;
max-height: 320px;
min-height: 320px;
}
</style>
</head>
<body>
<noscript>
<style>
.js-feature {display: none;}
</style>
</noscript>
<p>Works with select tags, divs, etc...</p>
<p>Click on the different divs that are labelled 'Data Set #' to see the chart update & change.</p>
<p>Or... Use the select tag/drop down...</p>
<div>
<div class="demo" data-value="0">Data Set 1</div>
<div class="demo" data-value="1">Data Set 2</div>
<div class="demo" data-value="2">Data Set 3</div>
</div>
<select id="demo">
<option value="0">Data Set 1</option>
<option value="1">Data Set 2</option>
<option value="2">Data Set 3</option>
</select>
<div id="chart-container">
<canvas id="chart"></canvas>
</div>
<div class="otherContent"></div>
<script type="text/javaScript" src="index.js"></script>
</body>
</html>