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.column3d();
5
chart.data([
6
['Apples', 5, 8, 4],
7
['Pears', 6, 2, 5],
8
['Bananas', 2, 6, 4],
9
['Peaches', 6, 3, 8]
10
]);
11
chart.title('Get and use pixel bounds object');
12
chart.container(stage);
13
chart.draw();
14
15
// Gets pixel bounds.
16
var bounds = chart.getPixelBounds();
17
18
var customBackground = anychart.standalones.background();
19
customBackground.fill('#ff7f50 0.2');
20
customBackground.parentBounds(bounds);
21
customBackground.container(stage);
22
customBackground.draw();
23
});