Created
February 17, 2015 15:28
-
-
Save tmcw/84041d75095e8912bd21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
d3.select(document.body).append('h3').text('Select only Years'); | |
var yearOutput = d3.select(document.body).append('h2'); | |
d3.select(document.body) | |
.append('div') | |
.call( | |
chroniton() | |
.domain([new Date('1/1/2000'), new Date('1/1/2015')]) | |
.width(500) | |
.on('change', function(d) { | |
yearOutput.text(d3.time.year(d)); | |
})); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment