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.area();
3
4
var series = chart.rangeArea([
5
{x: 'Meat', high: 12, low: -10},
6
{x: 'Fruit', high: 2, low: 11},
7
{x: 'Nuts', high: 20, low: -10},
8
{x: 'Milk', high: 2, low: 11},
9
{x: 'Fish', high: 11, low: -9}
10
]);
11
12
var state = series.normal();
13
14
// Set high fill.
15
state.highFill({
16
src: 'https://static.anychart.com/images/underwater.jpg',
17
mode: 'stretch',
18
opacity: 0.7
19
});
20
21
chart.title('Set state high fill as an image');
22
chart.container('container');
23
chart.draw();
24
});