Created
July 11, 2012 11:27
-
-
Save heracek/3089765 to your computer and use it in GitHub Desktop.
just another inlet to tributary
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 svg = d3.select("svg") | |
var rectBar = function(svg, x, y, width, height, color) { | |
return svg.append("svg:rect") | |
.attr("x", x + 0.5) | |
.attr("y", y + 0.5) | |
.attr("width", width) | |
.attr("height", height) | |
.style("fill", color) | |
.style("stroke", 'black') | |
.style('stroke-width', 1) | |
.style("opacity", 1); | |
}; | |
var redBar = rectBar(svg, 5, 5, 130, 20, 'red'); | |
var greenBar = rectBar(svg, 5 + 130, 5, 160, 20, 'green'); | |
var sliderBar = rectBar(svg, 100, 0, 10, 30, 'brown'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment