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 chart = anychart.scatter();
3
4
chart.marker([
5
{x: 4.1, value: 10},
6
{x: 2.3, value: 6},
7
{x: 3.4, value: 17}
8
]).hatchFill(true).size(20);
9
10
chart.marker([
11
{x: 4.4, value: 20},
12
{x: 2.3, value: 11},
13
{x: 3.1, value: 22}
14
]).hatchFill(true).size(20);
15
16
chart.marker([
17
{x: 4.8, value: 1},
18
{x: 2.6, value: 16},
19
{x: 3.9, value: 7}
20
]).hatchFill(true).size(20);
21
22
// Set hatch fill palette.
23
chart.hatchFillPalette(['percent50', 'diagonal-brick', 'zig-zag']);
24
25
chart.title('Set hatch fill palette');
26
chart.container('container');
27
chart.draw();
28
});