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([
3
{value: 15},
4
{value: 20},
5
{value: 25},
6
{value: 30},
7
{value: 44}
8
]);
9
chart.thermometer(3);
10
11
// Get axis.
12
var rightAxis = chart.axis();
13
rightAxis.labels(false);
14
rightAxis.width('0');
15
rightAxis.offset('3.15%');
16
rightAxis.orientation('right');
17
18
// Get axis by index.
19
var leftAxis = chart.axis(1);
20
leftAxis.labels({fontSize: 10, rotation: -30});
21
leftAxis.offset('-0.18%');
22
leftAxis.width('0');
23
24
chart.title('Get and modify axis');
25
chart.container('container');
26
chart.draw();
27
});