Built with blockbuilder.org
Created
April 16, 2018 18:04
-
-
Save micha2jm/e12b08090bacf90d2864707b57fb6693 to your computer and use it in GitHub Desktop.
Bubble Attempt Lol
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 bubbleChart = function () { | |
var width = 600, | |
height = 400; | |
function chart (selection) { | |
// we'll come back to this | |
} | |
chart.width = function(value) { | |
if (!arguments.length) { return width; } | |
width = value; | |
return chart; | |
} | |
chart.height = function(value) { | |
if (!arguments.length) { return height; } | |
height = value; | |
return chart; | |
} | |
return chart; | |
} |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<style> | |
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } | |
</style> | |
</head> | |
<body> | |
<script> | |
var chart = bubbleChart(); | |
console.log(bubbleChart().width()) | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment