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
var data = [
3
{x: 'A', value: 20},
4
{x: 'B', value: 12},
5
{x: 'C', value: 17},
6
{x: 'A&B', value: 4},
7
{x: 'B&C', value: 5},
8
{x: 'A&C', value: 7},
9
{x: 'A&B&C', value: 1}
10
];
11
12
var chart = anychart.venn(data);
13
chart.stroke('3 #FFFFFF');
14
15
var intersections = chart.intersections();
16
17
var customHatchFill = anychart.graphics.hatchFill('zig-zag', '#ffffff', 0.9, 20);
18
19
// Set hatch fill.
20
intersections.hatchFill(customHatchFill);
21
22
chart.title('Set hatch fill parameter as an instance');
23
chart.container('container');
24
chart.draw();
25
});