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 dataTable = anychart.data.table();
8
dataTable.addData(get_dji_daily_short_data());
9
10
var mapping = dataTable.mapAs({high: 1, low: 3});
11
12
var chart = anychart.stock();
13
chart.grouping({minPixPerPoint: 50});
14
15
var plot = chart.plot();
16
17
var series = plot.rangeColumn(mapping);
18
series.pointWidth(7);
19
20
// Set hatch fill.
21
series.hatchFill(pattern);
22
23
chart.title('Set hatch fill as a pattern');
24
chart.container(stage);
25
chart.draw();
26
});