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 data1 = dataTable.mapAs({open: 1, high: 2, low: 3, close: 4});
6
var data2 = dataTable.mapAs({value: 1});
7
8
var chart = anychart.stock();
9
10
chart.grouping({minPixPerPoint: 20});
11
chart.scrollerGrouping({minPixPerPoint: 20});
12
13
var plot = chart.plot();
14
plot.line(data2);
15
16
var scroller = chart.scroller();
17
scroller.height('50%');
18
19
var series = scroller.candlestick(data1);
20
21
var customHatchFill = anychart.graphics.hatchFill('zig-zag', '#ffffff', 0.9, 10);
22
23
// Set rising hatch fill.
24
series.risingHatchFill(customHatchFill);
25
26
chart.title('Set rising hatch fill parameter as an instance');
27
chart.container('container');
28
chart.draw();
29
30
chart.selectRange('2007-01-02', '2010-01-02');
31
});