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 currentPlot = chart.plot();
10
currentPlot.line(mapping);
11
12
var rangePicker = anychart.ui.rangePicker();
13
var rangeSelector = anychart.ui.rangeSelector();
14
15
chart.title("Render the range selectors into a chart instance");
16
17
chart.container("container");
18
chart.draw();
19
20
// Render the range picker into an instance of a stock chart
21
rangePicker.render(chart);
22
rangeSelector.render(chart);
23
});