4
<link href="../src/d3.css" rel="stylesheet" type="text/css">
13
font: 12px sans-serif;
22
Minimum height and width is a good idea to prevent negative SVG dimensions...
23
For example width should be =< margin.left + margin.right + 1,
24
of course 1 pixel for the entire chart would not be very useful, BUT should not have errors
34
<script src="../lib/d3.v2.js"></script>
35
<script src="../lib/jquery.min.js"></script>
36
<script src="../nv.d3.js"></script>
37
<!-- including all the components so I don't have to minify every time I test in development -->
38
<script src="../src/nvtooltip.js"></script>
39
<script src="../src/models/legend.js"></script>
40
<script src="../src/models/xaxis.js"></script>
41
<script src="../src/models/yaxis.js"></script>
42
<script src="../src/models/line.js"></script>
43
<script src="../src/models/lineWithLegend.js"></script>
44
<script src="../src/charts/lineChart.js"></script>
52
.y(function(d) { return d.voltage })
53
.yAxisLabel('Voltage (v)')
59
function sinAndCos() {
65
for (var i = 0; i < 100; i++) {
66
sin.push({x: i, voltage: r2 * Math.sin(i/10)});
67
cos.push({x: i, voltage: r1 * Math.cos(i/10)});