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.gauges.linear([300, 250, 150]);
3
chart.addPointer(0, 1, 2);
4
5
// Set left bound
6
chart.left('10%');
7
8
// Set right bound
9
chart.right('10%');
10
11
// Set top bound
12
chart.top('30%');
13
14
// Set bottom bound
15
chart.bottom('30%');
16
17
chart.title('Set left/right/top/bottom bound');
18
chart.container('container');
19
chart.draw();
20
});