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 stage = anychart.graphics.create("container", 600, 400);
3
4
var chart = anychart.gauges.linear([15, 20, 25, 30, 44]);
5
chart.bar(4).hatchFill(true);
6
chart.bar(3).hatchFill(true);
7
chart.bar(2).hatchFill(true);
8
chart.bar(1).hatchFill(true);
9
chart.bar(0).hatchFill(true);
10
11
// Get hatchFill palette.
12
var hatchFillPalette = chart.hatchFillPalette();
13
hatchFillPalette.itemAt(0, false);
14
15
chart.title("Get and modify hatchFill palette.");
16
chart.container(stage);
17
chart.draw();
18
});