Accepted answer

Maybe the array is not sorted by timestamp (the sample provided is unsorted). In your code, you assume that those values are sorted. You can try using

// Compute the timestamp extent
var timeExtent = d3.extent(, function(d) { return d.timestamp; });

    // more settings here
    .x(d3.time.scale().domain( { return new Date(d); })))

It would be easier to tell what is the problem if you provide a jsFiddle.


I started using dc.js few days ago, so I don't know for sure. But, I think your code should go in

d3.csv("data.csv", function(data) { //your-code }; or d3.json("data.json", function(data) {//your-code}; or jQuery.getJson("data.json", function(data){//your-code});

Related Query

More Query from same tag