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.padding(10, 10, 10, 50);
9
10
var plot = chart.plot();
11
12
var series = plot.splineArea(mapping);
13
series.hoverFill("#c5e1a5");
14
15
// Get hover fill.
16
var hoverFill = series.hoverFill();
17
18
chart.title({fontColor: hoverFill, text: "Get and use hover fill. Hover on the legend."});
19
chart.container("container");
20
chart.draw();
21
});