javascript - Line not following x os correctly & first tick isn't being shown -


see: http://jsfiddle.net/bqhjj/

following green line, circles should vertically aligned x axis, of them moved few pixels right.

the x axis isn't showing it's first tick, should 01.05.2013.

my x axis settings:

var xaxis = d3.svg.axis().scale(x).ticks(d3.time.days, 1).tickformat(d3.time.format("%d.%m.%y"));  graph.append("svg:g")         .attr("class", "x axis")         .attr("transform", "translate(0," + h + ")")         .call(xaxis)         .selectall("text")         .style("text-anchor", "end")         .attr("dx", "-.8em")         .attr("dy", ".15em")         .attr("transform", function (d) {         return "rotate(-65)"     }); 

can tell me what's wrong?

your date parsing function not correct, seems mess time zones, since new date(string) apparently assumes utc. work:

var format = d3.time.format("%y-%m-%d"); function getdate(d) {     return format.parse(d.date); } 

cf updated fiddle.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -