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
var stage = acgraph.create('container');
2
stage.title('Green rectangle');
3
4
var rectangle = stage.rect(50, 50, 150, 75);
5
rectangle.fill('#90CAF9');
6
7
// Get title text from node of the stage.
8
var titleText = stage.title();
9
10
stage.text(65, 75, titleText, {fontSize: '15px'});