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
];
8
9
// create a chart and set the data
10
chart = anychart.venn(data);
11
12
// configure the visual settings of the chart
13
chart.normal().fill("#00cc99", 0.3);
14
chart.hovered().fill("#00cc99", 0.1);
15
chart.selected().fill("#00cc99", 0.5);
16
chart.normal().hatchFill("percent50", "#004d39");
17
chart.hovered().hatchFill("percent50", "#004d39");
18
chart.selected().hatchFill("percent50", "#004d39");
19
chart.normal().stroke("#004d39");
20
chart.hovered().stroke("#004d39", 2);
21
chart.selected().stroke("#004d39", 4);
22
23
// disable labels of intersections
24
chart.intersections().labels(false);
25
26
// disable the legend
27
chart.legend(false);
28
29
// set the chart title
30
chart.title("Venn Diagram: Appearance");
31
32
// set the container id
33
chart.container('container');
34
35
// initiate drawing the chart
36
chart.draw();
37
});