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([44, 30, 25, 20, 15]);
3
chart.bar(0);
4
chart.bar(1);
5
chart.bar(2);
6
chart.bar(3);
7
chart.bar(4);
8
9
// Set palette.
10
chart.palette(['#482311', '#8d5932', '#d8b597', '#f2d1be', '#9b301c']);
11
12
chart.title('Set gauge palette parameters as an array of colors');
13
chart.container('container');
14
chart.draw();
15
});