Built with blockbuilder.org
Created
September 19, 2017 23:19
-
-
Save itiswicked/632766efcad0bd802b454bf7705af6a6 to your computer and use it in GitHub Desktop.
fresh block
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
license: mit |
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
var rectWidth = 100; | |
var height = 300; | |
var data = [100, 250, 175, 200, 120]; | |
let svg = d3.select('svg') | |
.selectAll('rect') | |
.data(data) | |
.enter() | |
.append('rect') | |
// .attr('x', (d, i) => { | |
// // console.log(d); | |
// // console.log(i); | |
// // console.log(i * rectWidth); | |
// return i * rectWidth; | |
// }) | |
// .attr('y', d => { | |
// console.log(height - d); | |
// return height - d; | |
// }) | |
// .attr('width', rectWidth) | |
// .attr('height', d => d) | |
// .attr('fill', 'blue') | |
// .attr('stroke', '#fff'); | |
console.log(svg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment