-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
92 lines (87 loc) · 2.8 KB
/
index.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
92
<!DOCTYPE html>
<html>
<head>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-063933E3C2"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-063933E3C2");
</script>
<title>d3-dual-range-slider</title>
<link
rel="canonical"
href="https://evoluteur.github.io/d3-dual-range-slider/"
/>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="description" content="SVG range slider for d3.js" />
<meta
name="keywords"
content="d3, d3.js, dual, range, slider, svg, component, widget"
/>
<meta
property="og:image"
content="https://evoluteur.github.io/d3-dual-range-slider/screenshot.gif"
/>
<link rel="icon" type="image/png" href="favicon.png" />
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="css/pages.css" />
<link rel="stylesheet" type="text/css" href="css/graph.css" />
<link rel="stylesheet" type="text/css" href="css/slider.css" />
<script src="js/d3.v4.min.js"></script>
<script src="js/data.js"></script>
<script src="js/slider.js"></script>
<script src="js/graph.js"></script>
<script>
window.onload = function () {
var v1 = 3,
v2 = 7;
// want the same groups colors in both graph and slider
var color = d3.scaleOrdinal(d3.schemeCategory20);
for (var i = 0; i < 11; i++) {
color(i);
}
// graph is not fully componentized but returns a refresh function
var myGraph = graph(color);
function updateGraph(min, max) {
var data = getData(min, max);
myGraph.restart(data);
}
setupSlider(v1, v2, updateGraph, color);
updateGraph(v1, v2);
};
</script>
</head>
<body>
<div class="header">
<div class="slider-holder"></div>
<div class="github">
<a href="https://github.com/evoluteur/d3-dual-range-slider"
>d3-dual-range-slider</a
><br /><br />
<iframe
src="https://ghbtns.com/github-btn.html?user=evoluteur&repo=d3-dual-range-slider&type=star&count=true&size=small"
frameborder="0"
scrolling="0"
width="100px"
height="30px"
></iframe>
</div>
</div>
<svg id="graph" width="800" height="600"></svg>
<div class="more">
More of my D3 animations with
<a href="https://evoluteur.github.io/meet-the-fans">meet-the-fans</a>
and
<a href="https://evoluteur.github.io/d3-table-cards/">d3-table-cards</a>.
</div>
<footer>
© 2024 <a href="https://evoluteur.github.io/">Olivier Giulieri</a>
</footer>
</body>
</html>