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 dataTable = anychart.data.table();
3
dataTable.addData(get_dji_daily_short_data());
4
5
var mapping = dataTable.mapAs({high: 1, low: 3});
6
7
var chart = anychart.stock();
8
chart.grouping({minPixPerPoint: 50});
9
10
var plot = chart.plot();
11
12
var series = plot.rangeColumn(mapping);
13
14
// Set hatch fill.
15
series.hatchFill(function () {
16
if (this.x < new Date('2006-01-02').getTime())
17
return {type: 'zig-zag', color: '#FFFFFF', size: 10}
18
});
19
20
chart.title('Set hatch fill parameter as a function');
21
chart.container('container');
22
chart.draw();
23
});