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
chart.grouping({minPixPerPoint: 20});
9
10
var plot = chart.plot();
11
12
var series = plot.line(mapping);
13
14
// Get state.
15
var state = series.hovered();
16
17
state.markers(true);
18
state.markers().type('diamond');
19
state.stroke('#4CAF50');
20
21
chart.title('Get and modify hovered state. Move mouse over the legend item to see');
22
chart.container('container');
23
chart.draw();
24
});