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({value: 1});
6
7
var chart = anychart.stock();
8
9
chart.grouping({minPixPerPoint: 5});
10
chart.scrollerGrouping({minPixPerPoint: 5});
11
12
var plot = chart.plot();
13
plot.line(mapping);
14
15
var scroller = chart.scroller();
16
scroller.height('50%');
17
18
var series = scroller.marker(mapping);
19
series.size(6);
20
21
// Enable hatch fill.
22
series.hatchFill(true);
23
24
chart.title('Enable hatch fill');
25
chart.container('container');
26
chart.draw();
27
28
chart.selectRange('2007-01-02', '2010-01-02');
29
});