|
|
|
@ -50,22 +50,18 @@ svg {
|
|
|
|
|
<script src="../src/models/scatter.js"></script>
|
|
|
|
|
<script src="../src/models/line.js"></script>
|
|
|
|
|
<script src="../src/models/lineChart.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
// Wrapping in nv.addGraph allows for '0 timeout render', stores rendered charts in nv.graphs, and may do more in the future... it's NOT required
|
|
|
|
|
var chart;
|
|
|
|
|
|
|
|
|
|
nv.addGraph(function() {
|
|
|
|
|
chart = nv.models.lineChart();
|
|
|
|
|
|
|
|
|
|
chart
|
|
|
|
|
.x(function(d,i) { return i })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chart.xAxis // chart sub-models (ie. xAxis, yAxis, etc) when accessed directly, return themselves, not the parent chart, so need to chain separately
|
|
|
|
|
// chart sub-models (ie. xAxis, yAxis, etc) when accessed directly, return themselves, not the parent chart, so need to chain separately
|
|
|
|
|
chart.xAxis
|
|
|
|
|
.tickFormat(d3.format(',.1f'));
|
|
|
|
|
|
|
|
|
|
chart.yAxis
|
|
|
|
@ -89,8 +85,6 @@ nv.addGraph(function() {
|
|
|
|
|
return chart;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sinAndCos() {
|
|
|
|
|
var sin = [],
|
|
|
|
|
cos = [],
|
|
|
|
@ -131,5 +125,4 @@ function sinAndCos() {
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|