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.sparkline([1.3, 2, 1.4, 4, 2.3, 6]);
3
4
// Set left bound
5
chart.left('10%');
6
7
// Set right bound
8
chart.right('10%');
9
10
// Set top bound
11
chart.top('20%');
12
13
// Set bottom bound
14
chart.bottom('20%');
15
16
chart.title({text: 'Set left/right/top/bottom bound', orientation: 'top'});
17
chart.container('container');
18
chart.draw();
19
});