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
normal: {fill: "#455a64 0.5"},
7
hovered: {fill: "#455a64 0.5"},
8
selected: {fill: "#455a64 0.5"}
9
},
10
{x: "B", value: 100,
11
normal: {fill: "#00bfa5 0.5"},
12
hovered: {fill: "#00bfa5 0.5"},
13
selected: {fill: "#00bfa5 0.5"}
14
},
15
{x: "C", value: 200,
16
normal: {fill: "#1976d2 0.5"},
17
hovered: {fill: "#1976d2 0.5"},
18
selected: {fill: "#1976d2 0.5"}
19
},
20
{x: ["A", "B"], value: 10},
21
{x: ["B", "C"], value: 10,
22
normal: {stroke: "2 white"},
23
hovered: {stroke: "2 white"},
24
selected: {stroke: "4 white"}
25
}
26
];
27
28
// create a chart and set the data
29
chart = anychart.venn(data);
30
31
// disable labels of intersections
32
chart.intersections().labels(false);
33
34
// disable the legend
35
chart.legend(false);
36
37
// set the chart title
38
chart.title("Venn Diagram: Appearance (Individual Points)");
39
40
// set the container id
41
chart.container('container');
42
43
// initiate drawing the chart
44
chart.draw();
45
});