datetime - d3.time.format full weekday 24-hour unmatched output -
i'm using this d3 graph brushing graph template. i've changed far data being loaded , parsedate function match input (full day name , 24-hour hour digit, quantity of commits @ day , time).
my input:
date, commits monday 00,23 monday 1,10 monday 2,14 monday 3,13 monday 4,14 monday 5,7 monday 6,2 ... the parsedate change:
from-
var parsedate = d3.time.format("%b %y").parse; d3.csv("sp500.csv", function(error, data) { data.foreach(function(d) { d.date = parsedate(d.date); d.price = +d.price; }); to:
var parsedate = d3.time.format("%a %h").parse; d3.csv("d3js.csv", function(error, data) { data.foreach(function(d) { d.date = parsedate(d.date); console.log(d.date); d.commits = +d.commits; }); this prints in console d.date:
mon jan 01 1900 00:00:00 gmt-0500 (est) brush.html:84 mon jan 01 1900 01:00:00 gmt-0500 (est) brush.html:84 mon jan 01 1900 02:00:00 gmt-0500 (est) brush.html:84 mon jan 01 1900 03:00:00 gmt-0500 (est) brush.html:84 mon jan 01 1900 04:00:00 gmt-0500 (est) ... any insight may happening?
Comments
Post a Comment