-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (55 loc) · 1.89 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
<!DOCTYPE html>
<div id="container">
<svg width="960" height="500"></svg>
</div>
<div>
<input type="range" min="1" max="10" step="0.1" value="10" style="width: 1280px;">
</div>
<div id="Ford"></div>
<div id="Jarrah"></div>
<div id="Kwon"></div>
<div id="Locke"></div>
<div id="Reyes"></div>
<div id="Shephard"></div>
<button id="btn">click me</button>
<script src="dist/timeline.js"></script>
<!-- <script src="https://d3js.org/d3.v4.min.js"></script> -->
<script>
/*
var w = 500,
h = 300,
x = d3.scaleTime().range([0, w]).domain([new Date(1999, 0, 1), new Date(2014, 0, 0)]),
xAxis = d3.axisBottom(x).tickSize(-h, 0).tickPadding(6).tickArguments([20]);
var svg = d3.select("svg")
.attr("width", w)
.attr("height", h+50);
svg.append("svg:g")
.attr("class", "x axis")
.attr("transform", "translate(0," + h + ")")
.call(xAxis);
*/
/*
var svg = d3.select("svg"),
margin = {top: 250, right: 40, bottom: 250, left: 40},
width = svg.attr("width") - margin.left - margin.right,
height = svg.attr("height") - margin.top - margin.bottom;
d3.json("https://unpkg.com/d3-time-format@2/locale/ru-RU.json", function(error, locale) {
if (error) throw error;
d3.timeFormatDefaultLocale(locale);
var x = d3.scaleTime()
.domain([new Date(2000, 0, 1), new Date(2001, 0, 1)])
.range([0, width]);
svg.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
.call(d3.axisBottom(x));
x = d3.scaleTime()
.domain([new Date(2001, 0, 1), new Date(2002, 0, 1)])
.range([0, width]);
setTimeout(function(){
svg.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
.call(d3.axisBottom(x));
}, 1000);
});
*/
</script>