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 stage = anychart.graphics.create('container');
3
4
var pattern = stage.pattern(new anychart.graphics.math.Rect(0, 0, 20, 20));
5
pattern.star5(11, 7, 8).stroke('#fffaf0');
6
7
var data = [
8
{x: 'A', value: 20},
9
{x: 'B', value: 12},
10
{x: 'C', value: 17},
11
{x: 'A&B', value: 4},
12
{x: 'B&C', value: 5},
13
{x: 'A&C', value: 7},
14
{x: 'A&B&C', value: 1}
15
];
16
17
var chart = anychart.venn(data);
18
chart.stroke('3 #FFFFFF');
19
20
var intersections = chart.intersections();
21
22
// Set hatch fill.
23
intersections.hatchFill(pattern);
24
25
chart.title('Set hatch fill as a pattern');
26
chart.container(stage);
27
chart.draw();
28
});