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 title1 = anychart.standalones.title();
5
title1.text('First title');
6
title1.parentBounds(0, 0, 200, 200);
7
title1.container(stage);
8
title1.draw();
9
10
// Get container.
11
var container = title1.container();
12
13
var title2 = anychart.standalones.title();
14
title2.text('Second title');
15
title2.parentBounds(100, 0, 200, 200);
16
title2.container(container);
17
title2.draw();
18
});