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
9
var plot = chart.plot();
10
plot.line(mapping);
11
12
var scroller = chart.scroller();
13
scroller.height('50%');
14
scroller.maxHeight(200);
15
16
// Get scroller minimum height.
17
var scrollerHeight = scroller.maxHeight();
18
19
chart.title({text: 'Get and use scroller minimum height', fontSize: scrollerHeight - 180});
20
chart.container('container');
21
chart.draw();
22
});