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.pie([2, 6, 12, 3]);
3
chart.hatchFill(true);
4
5
var palette = anychart.palettes.hatchFills();
6
7
var myHatchFill = anychart.graphics.hatchFill("divot", "#BDBDBD", 1, 25);
8
9
// Set hatch fill using instance by index.
10
palette.itemAt(1, myHatchFill);
11
12
chart.hatchFillPalette(palette);
13
chart.container("container");
14
chart.draw();
15
});