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([
3
{x: 'Cycling', value: 10},
4
{x: 'Swimming', value: 12},
5
{x: 'Run', value: 18}
6
]);
7
chart.labels(null).legend(null).hatchFill(true);
8
9
// Set hatch fill palette.
10
chart.hatchFillPalette({type: ['horizontal', 'grid', 'vertical'], thickness: 3});
11
12
chart.title('Set hatch fill palette as an object');
13
chart.container('container');
14
chart.draw();
15
});