I have existing <svg>
and want to include venn diagram into this element. Here is structure of my elements:
<svg id="main-svg">
... some elements, for example <g> or <svg> ...
<svg> // this is Venn.js root element
<g class="venn-area venn-circle" data-venn-sets="0">...</g>
...
</svg>
</svg>
How can I get <svg>
element, which was created by venn library?
Full code:
const sets = [
{ sets: ['A'], size: 12 },
{ sets: ['B'], size: 12 },
{ sets: ['A', 'B'], size: 2 },
];
const chart = venn.VennDiagram();
d3.select('#main-svg').datum(sets).call(chart);
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://rawgit.com/benfred/venn.js/master/venn.js"></script>
<svg width="800" height="800" id="main-svg"></svg>
And I want to get this <svg>
element:
Thanks to library author for answer in this issue