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([15, 20, 25, 30, 44]);
3
4
var barPointer = chart.bar(2);
5
barPointer.fill('#a03623').stroke(null);
6
7
// Set hatch fill.
8
barPointer.hatchFill(function () {
9
return {type: 'horizontal-brick', color: '#fffaf0', size: 19};
10
});
11
12
chart.title('Set hatch fill parameter as a function');
13
chart.width(600).height(400);
14
chart.container('container');
15
chart.draw();
16
});