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({open: 1, high: 2, low: 3, close: 4});
11
12
var chart = anychart.stock();
13
14
var plot = chart.plot();
15
16
var series = plot.candlestick(mapping);
17
18
// Set falling hatchFill.
19
series.fallingHatchFill(pattern);
20
21
chart.title('Set falling hatch fill as a pattern');
22
chart.container(stage);
23
chart.draw();
24
25
chart.selectRange('2009-05-01', '2009-07-02')
26
});