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.polygon([
5
{x: 0, value: 2},
6
{x: 1, value: 1},
7
{x: 2, value: 2},
8
{x: 3, value: 3},
9
{x: 4, value: 2},
10
{x: 5, value: 1}
11
]);
12
13
// Set select fill.
14
series.selectFill({
15
src: "https://static.anychart.com/images/underwater.jpg",
16
mode: "stretch",
17
opacity: 0.5
18
});
19
20
// Selects series.
21
series.select();
22
23
chart.title("Set select fill as an image");
24
chart.container("container");
25
chart.draw();
26
});