I am new to NVD3 libraries. I am trying to use the cumulative line chart but unable to render the y axis. I have two series, Input and Output.. with x showing the date while y showing the values from 50 - 400 range. However I am able to render the xaxis but not able to get the yaxis rendered. Please help.
My code is as below.
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
nv.addGraph(function() {
var chart = nv.models.cumulativeLineChart()
.x(function(d) { return d.x })
.y(function(d) { return d.y })
.color(d3.scale.category10().range())
.useInteractiveGuideline(true);
chart.forceY([0]);
chart.xScale(d3.time.scale());
chart.xAxis
.tickFormat(function(d) {
return d3.time.format('%x')(new Date(d));
});
var format = ',f';
chart.yAxis
.axisLabel(' ')
.tickFormat(d3.format(format));
d3.select('#recordChartDiv svg')
.datum(data)
.transition().duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
However I am getting below output with incorrect yaxis.
Can someone pls guide me ?