Built with blockbuilder.org
Last active
April 10, 2018 23:01
-
-
Save dima74/a3ce215843a5685cc4214093cbe06687 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
<html> | |
<body> | |
<div id="venn"> | |
<svg id="inner_svg_which_would_be_used_by_venn"></svg> | |
</div> | |
</body> | |
<script src="https://d3js.org/d3.v5.min.js"></script> | |
<script src="https://rawgit.com/benfred/venn.js/master/venn.js"></script> | |
<script> | |
// define sets and set set intersections | |
const sets = [ | |
{ sets: ['A'], size: 12 }, | |
{ sets: ['B'], size: 12 }, | |
{ sets: ['A', 'B'], size: 2 }, | |
]; | |
const chart = venn.VennDiagram(); | |
d3.select('#venn').datum(sets).call(chart); | |
const rootSvg = d3.select('#inner_svg_which_would_be_used_by_venn'); | |
// use rootSvg somehow | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment