-
-
Save rlugojr/6baef8f48a11600eb72b5c884219bd04 to your computer and use it in GitHub Desktop.
Venn Diagram with Opacity
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: gpl-3.0 |
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> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v3.min.js"></script> | |
<script> | |
var width = 960, | |
height = 500; | |
var svg = d3.select("body").append("svg") | |
.attr("width", width) | |
.attr("height", height); | |
svg.append("circle") | |
.attr("cx", 350) | |
.attr("cy", 200) | |
.attr("r", 200) | |
.style("fill", "brown") | |
.style("fill-opacity", ".5"); | |
svg.append("circle") | |
.attr("cx", 550) | |
.attr("cy", 200) | |
.attr("r", 200) | |
.style("fill", "steelblue") | |
.style("fill-opacity", ".5"); | |
svg.append("circle") | |
.attr("cx", 450) | |
.attr("cy", 300) | |
.attr("r", 200) | |
.style("fill", "green") | |
.style("fill-opacity", ".5"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment