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 chart = anychart.line([
3
{x: 'Cycling', value: 4},
4
{x: 'Swimming', value: 20},
5
{x: 'Run', value: 8},
6
{x: 'Hiking', value: 17}
7
]);
8
9
// Set bounds using several parameters.
10
chart.bounds(0, 50, '50%', '250px');
11
12
chart.title('Set bounds using several parameters');
13
chart.container('container');
14
chart.draw();
15
});