I'm plotting a time series line chart which takes time on x-axis, other resp values on y-axis. I need help doing that. The graph is not plotted with the following code. It shows only the lines(axes) and labels but no graph nor the values on axes.
data = [{"date": "31-03-2015 11:05:36", "snr": 3.2}, {"date": "31-03-2015 11:05:36", "snr": 4.9},...{"date": "31-03-2015 11:05:36", snr: 5.0}];
var parseDate = d3.time.format("%d-%m-%Y %H:%M:%S").parse;
data.forEach(function(d) {
d.date = parseDate(d.date);
});
var dimByTime = cf.dimension(function(d) { return d.date;});
var groupForSNR = dimByTime.groupAll();
groupForSNR.all = function() { return 1; };
var snrAP = dc.lineChart("#snrAP");
snrAP
.dimension(dimByTime)
.group(groupForSNR).valueAccessor(function(d) { return d.value.snr; })
.x(d3.time.scale())
.xUnits(d3.time.day);
dc.renderAll();
I want to show snr on y-axis and the corresponding time on x-axis.