positioning circles horizontally

master
Matt Huntington 8 years ago
parent 12326c5b96
commit da1e90572a

@ -36,7 +36,7 @@ var xScale = d3.scaleTime();
xScale.range([0,WIDTH]); xScale.range([0,WIDTH]);
xScale.domain([new Date('2017-10-1'), new Date('2017-10-31')]); xScale.domain([new Date('2017-10-1'), new Date('2017-10-31')]);
var parseTime = d3.timeParse("%B%e, %Y"); d3.selectAll('circle')
console.log(parseTime('October 2, 2017')); .attr('cx', function(datum, index){
var formatTime = d3.timeFormat("%B%e, %Y"); return xScale(parseTime(datum.date));
console.log(formatTime(new Date('2017-10-1'))); });

Loading…
Cancel
Save