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.cartesian();
3
4
var series = chart.rangeArea([
5
{x: 'January', low: 2, high: 3},
6
{x: 'February', low: 3, high: 6},
7
{x: 'March', low: 2, high: 4}
8
]);
9
10
var customHatchFill = anychart.graphics.hatchFill('solid-diamond', '#ffffff', 0.9, 10);
11
12
// Set hatch fill.
13
series.hatchFill(customHatchFill);
14
15
chart.title('Set hatch fill parameter as an instance');
16
chart.container('container');
17
chart.draw();
18
});