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 queue = anychart.math.cycledQueue(3);
5
queue.enqueue('a');
6
queue.enqueue('b');
7
queue.enqueue('c');
8
9
// Get queue length.
10
var length = queue.getLength();
11
12
var result = stage.text(30, 20);
13
result.text('Queue length: ' + length);
14
result.fontSize(12);
15
});