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.bubble();
3
4
var series = chart.bubble([
5
{x: 1, value: 1.0, size: 2},
6
{x: 2, value: 1.6, size: -7},
7
{x: 3, value: 1.2, size: -4},
8
{x: 4, value: 1.9, size: 3}
9
]);
10
11
series.displayNegative(true);
12
13
var state = series.normal();
14
15
// Set negative fill.
16
state.negativeFill({
17
src: 'https://static.anychart.com/images/underwater.jpg',
18
mode: 'stretch',
19
opacity: 0.5
20
});
21
22
chart.title('Set state negative fill as an image');
23
chart.container('container');
24
chart.draw();
25
});