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 chart = anychart.stock();
6
7
var plot = chart.plot();
8
plot.area(dataTable.mapAs({value: 1}));
9
10
var eventMarkers = plot.eventMarkers();
11
eventMarkers.group(['2006-10-12']);
12
eventMarkers.group(1, ['2006-10-12', '2006-12-06']).format('B');
13
eventMarkers.position('series');
14
15
// Set direction.
16
eventMarkers.direction('down');
17
18
chart.selectRange('2006-09-01', '2006-12-21');
19
chart.title('Set direction');
20
chart.container('container');
21
chart.draw();
22
});