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
3
// 169 is a char code of copyright symbol
4
var text = acgraph.text().text(String.fromCharCode(169));
5
var pattern_font = stage.pattern(text.getBounds());
6
pattern_font.addChild(text);
7
8
// create chart
9
stage.rect(0, 0, 150, 50).fill(pattern_font);
10
stage.circle(150, 150, 50).fill(pattern_font);