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
10
chart.bar(4).hatchFill(true);
11
chart.bar(3).hatchFill(true);
12
chart.bar(2).hatchFill(true);
13
chart.bar(1).hatchFill(true);
14
chart.bar(0).hatchFill(true);
15
16
// Set hatchFill palette.
17
chart.hatchFillPalette(['divot', 'checker-board', 'confetti', 'diagonal-cross', 'zig-zag']);
18
19
chart.title('Set hatch fill palette');
20
chart.container('container');
21
chart.draw();
22
});