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({
6
open: 1,
7
high: 2,
8
low: 3,
9
close: 4
10
});
11
12
var chart = anychart.stock();
13
chart.padding(10, 10, 10, 50);
14
15
var plot = chart.plot();
16
17
var series = plot.candlestick(mapping);
18
19
// Set rising hatchFill.
20
series.risingHatchFill("horizontal", "#004D40", 1, 3);
21
22
chart.title("Set rising hatchFill.");
23
chart.container("container");
24
chart.draw();
25
});