Skip to content

Instantly share code, notes, and snippets.

@tangert tangert/.block
Last active Feb 21, 2018

What would you like to do?
Data Binding learning
license: mit
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
.bar-container {
display: flex;
flex-direction: horizontal;
.bar {
display: inline-block;
width: 50px;
margin: 0px 20px 0px 20px;
height: 50px;
background-color: red;
// Feel free to change or delete any of the code you see in this editor!
var testData = [ 25, 7, 5, 26, 11, 8, 25, 14, 23];
//Playign with text and styles"body")
return "Hello! " + d;
.style("color", function(d) {
return "red";
} else {
return "blue"
return d + "px"
var barContainer ="body")
// Basic bars
.style("height", function(d){
return d*10 + "px";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.