HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
3
//create data
4
var data = [
5
{x: "A", value: 100},
6
{x: "B", value: 100},
7
{x: ["A", "B"], value: 25}
8
];
9
10
// create a chart and set the data
11
chart = anychart.venn(data);
12
13
// configure labels of intersections
14
chart.intersections().labels().format("{%x}");
15
16
// set the chart title
17
chart.title("Venn Diagram: Basic Sample");
18
19
// set the container id
20
chart.container('container');
21
22
// initiate drawing the chart
23
chart.draw();
24
});