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
chart.padding(10, 10, 10, 60);
7
8
var plot1 = chart.plot(0);
9
plot1.line(dataTable.mapAs({value: 1}));
10
11
var plot2 = chart.plot(1);
12
plot2.line(dataTable.mapAs({value: 2}));
13
14
// Set line markers settings.
15
plot1.lineMarker(0, {stroke: '#F44336', value: 12483, axis: plot1.yAxis()});
16
plot1.lineMarker(1, {stroke: {color: '#F44336', thickness: 2, dash: '6 6'}, value: (new Date('2007-04-12').getTime()), axis: plot1.xAxis()});
17
18
chart.title('Set the line markers parameters as an object by indexes');
19
chart.container('container');
20
chart.draw();
21
});