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 stage = anychart.graphics.create("container");
3
4
var chart = anychart.waterfall([166, 43, -79, -46, 84, NaN]);
5
6
chart.title("Get and use plot bounds object");
7
chart.container(stage);
8
chart.draw();
9
10
// Get plot bounds.
11
var bounds = chart.getPlotBounds();
12
13
var customBackground = anychart.standalones.background();
14
customBackground.fill("#BDBDBD 0.2");
15
customBackground.parentBounds(bounds);
16
customBackground.container(stage);
17
customBackground.draw();
18
});