Tutorial: Introduction to D3

Following Jan Willem Tulp's Tutorials on D3

HTML

<script src="http://d3js.org/d3.v3.min.js"></script>
<textarea cols="50" rows="10"></textarea>

JavaScript

var dateArray = d3.time.scale()
                .domain([new Date(2013, 2, 28), new Date(2013, 3, 2)])
                .ticks(d3.time.days, 1);

document.getElementsByTagName('textArea')[0].value = dateArray.map(String).join('\n')