Published
Edited
May 19, 2020
Importers
3 stars
Insert cell
Insert cell
sets = [
{sets: [0], label: '175 Introduced', size: 170, fill: "#85c0f9"},
{sets: [1], label: '37 Leaving', size: 40, fill: "#f5793a"},
{sets: [0, 1], label: '36 ⋂', size: 20}
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chart = d3.select(DOM.svg(600, 350))
.call(svg => {
svg.datum(sets)
.call(venn.VennDiagram())
// Circle stylings
svg.selectAll(".venn-circle path")
.style("fill", (d, i) => d['fill'])
.style("fill-opacity", .25)
// Label stylings
svg.selectAll(".venn-circle text")
.style("fill", (d, i) => d['fill'])
})
.node()
Insert cell
height = 400
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more