-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathparallelCoordinatesOrdinal.html
More file actions
86 lines (75 loc) · 1.63 KB
/
parallelCoordinatesOrdinal.html
File metadata and controls
86 lines (75 loc) · 1.63 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="../build/nv.d3.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.2/d3.min.js" charset="utf-8"></script>
<script src="../build/nv.d3.js"></script>
<style>
text {
font: 12px sans-serif;
}
svg {
display: block;
}
html, body, #chart1, svg {
margin: 0px;
padding: 0px;
height: 100%;
width: 100%;
box-sizing: border-box;
}
</style>
</head>
<body>
<div id="chart1" class="chart">
<svg></svg>
</div>
<script>
sampleData3 = [
{
id: "",
year: 73,
weight: 25.5
},
{
id: "Tudor",
year: 62,
weight: 23.2
},
{
id: "Windsor",
year: 72,
weight: NaN
},
{
id: "Plantagenet",
year: 72,
weight: 20.3
},
{
id: "",
year: 71,
weight: 19.5
},
{
id: "Plantagenet",
year: 76,
weight: 29.8
}
];
var chart;
nv.addGraph(function() {
chart = nv.models.parallelCoordinates()
.dimensionNames(['id', 'year', 'weight'])
.lineTension(0.85)
.enumerateNonNumericDimensions(true);
d3.select('#chart1 svg')
.datum(sampleData3)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
</script>
</body>
</html>