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.polar();
3
4
var series = chart.rangeColumn([
5
{x: 1, low: 1, high: 3},
6
{x: 2, low: 2, high: 4},
7
{x: 3, low: 3, high: 5},
8
{x: 4, low: 2, high: 4},
9
{x: 5, low: 1, high: 3},
10
{x: 6, low: 2, high: 4}
11
]);
12
13
// Set hatch fill.
14
series.hatchFill(function () {
15
if (this.index > 3)
16
return {type: 'backward-diagonal', color: '#FFFFFF', thickness: 1.5, size: 30}
17
});
18
19
chart.xScale('ordinal').sortPointsByX(true);
20
chart.title('Set hatch fill parameter as a function');
21
chart.container('container');
22
chart.draw();
23
});