-
Notifications
You must be signed in to change notification settings - Fork 2
/
lifeflowWithStuff.html
95 lines (91 loc) · 3.19 KB
/
lifeflowWithStuff.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
93
94
95
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<meta charset="UTF-8">
<meta http-equiv="Content-Language" content="en-US" >
</head>
<body>
<style>
.axis {
shape-rendering: crispEdges;
}
.x.axis line {
stroke: #ccc;
}
.x.axis .minor {
stroke-opacity: .5;
}
.x.axis path {
display: none;
}
/*
.bar {
fill: steelblue;
}
*/
text {
color: black;
}
</style>
<link href="./nv.d3.css" rel="stylesheet" type="text/css">
<style>
svg { height: auto; }
</style>
<script type="text/javascript" src="./d3/d3.js"></script>
<script type="text/javascript" src="./underscore/underscore.js"></script>
<script type="text/javascript" src="./jquery-1.9.1.js"></script>
<script type="text/javascript" src="./enlightened-data/enlightened-data.js"></script>
<script type="text/javascript" src="./nvd3/nv.d3.js"></script>
<script src="./nvd3/src/tooltip.js"></script>
<script src="./nvd3/src/utils.js"></script>
<script src="./legend.js"></script>
<script src="./nvd3/src/models/axis.js"></script>
<script src="./evtData.js"></script>
<script src="./lifeflowWithStuff.js"></script>
<script src="./timelines.js"></script>
<script src="./lifeflowChartWithStuff.js"></script>
<script src="./jquery-contextMenu/jquery.contextMenu.js"></script>
<link href="./jquery-contextMenu/jquery.contextMenu.css" rel="stylesheet" type="text/css">
<script>
$(document).ready(function() {
var tooltip = d3.select("body")
.append("div")
.style("position", "absolute")
.style("z-index", "10")
.style("visibility", "hidden")
.text("a simple tooltip");
d3.csv('./sampleData/hurricane.csv', function (data) {
var container = d3.select('body')
.append('div')
;
var lifeflowChart = nv.models.lifeflowChart()
.entityIdProp('hur_id')
.eventNameProp('status')
.startDateProp('date')
.eventOrder([
'Subtropical storm',
'Genesis',
'Disturbance',
'Subtropical Depression',
'Tropical Wave',
'Tropical Depression',
'Tropical Storm',
'Hurricane',
'Landfall',
'Extratropical',
'Low',
'Intensity Peak',
'Maximum wind',
'Status change'])
.unitProp(1000*60*60) // hours
.height(window.innerHeight - 100)
.width(window.innerWidth - 100)
;
container
.datum(data)
.call(lifeflowChart);
});
});
</script>
</body>
</html>