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('#ffffff');
6
7
var chart = anychart.column3d();
8
9
var series = chart.column([
10
{x: 'January', value: 2},
11
{x: 'February', value: 5},
12
{x: 'March', value: 3},
13
{x: 'April', value: 9},
14
{x: 'May', value: 4}
15
]);
16
17
// Set hatch fill.
18
series.hatchFill(pattern);
19
20
chart.title('Set series hatch fill as a pattern');
21
chart.container(stage);
22
chart.draw();
23
});