Domanda

I am trying to do a line chart with time in millisecons on X-axis. Does not seems to be working. I have created a jfiddle. Can someone please have a look when you get a chance .

http://jsfiddle.net/5H3Ay/14/

I am creating the dimension like this

var datetimeDimension = ndx.dimension(function (d) {
    return d3.time.format.iso.parse(d.datetime);
});

Thanks a lot.

È stato utile?

Soluzione

There is a typo in the data. The first data entry specifies a different hour from the rest.

Here is a corrected fiddle: http://jsfiddle.net/gordonwoodhull/t5Un3/1/

var data = [
    {"id":1,"datetime":"2009-01-26T06:00:00.000Z","peopleVisited":452},
    {"id":2,"datetime":"2009-01-26T06:00:00.200Z","peopleVisited":62},

Glad to see that millisecond data does work!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top