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.circle(450, 500, 350);
3
stage.rect(100, 150, 700, 700);
4
5
var grayLabel = anychart.standalones.label();
6
grayLabel.background({fill: "#9E9E9E"});
7
grayLabel.text("Print stage");
8
grayLabel.fontColor("#fff");
9
grayLabel.padding(5);
10
grayLabel.offsetX(5);
11
grayLabel.listen("click", function () {
12
13
// Sets paper size.
14
stage.print(acgraph.vector.PaperSize.A3);
15
});
16
grayLabel.container(stage);
17
grayLabel.draw();