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: 400},
6
{x: "B", value: 200},
7
{x: ["A", "B"], value: 200}
8
];
9
10
// create a chart and set the data
11
chart = anychart.venn(data);
12
13
// configure visual settings
14
chart.fill("#00cc99", 0.3);
15
chart.hoverFill("#00cc99", 0.3);
16
chart.selectFill("#00cc99", 0.5);
17
chart.hatchFill("percent20", "#808080");
18
chart.hoverHatchFill("percent20", "#808080");
19
chart.selectHatchFill("percent20", "#808080");
20
chart.stroke("#00cc99");
21
chart.hoverStroke("#00cc99", 2);
22
chart.selectStroke("#00cc99", 4);
23
24
// disable labels of intersections
25
chart.intersections().labels(false);
26
27
// disable the legend
28
chart.legend(false);
29
30
// set the chart title
31
chart.title("Venn Diagram: Appearance");
32
33
// set the container id
34
chart.container('container');
35
36
// initiate drawing the chart
37
chart.draw();
38
});