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
var text1 = stage.text(10, 10, "By Letter Text Wrap Mode." +
4
" This is another custom text element, which is made multiline with the help of AnyChart Graphics methods." +
5
" It shows how the natural text behaves.");
6
text1.width(150);
7
text1.height(150);
8
9
// Set wrap mode.
10
text1.textWrap(acgraph.vector.Text.TextWrap.BY_LETTER);
11
12
var text2 = stage.text(180, 10, "By Word Text Wrap Mode." +
13
" This is another custom text element, which is made multiline with the help of AnyChart Graphics methods." +
14
" It shows how the natural text behaves.");
15
text2.width(150);
16
text2.height(150);
17
18
// Set wrap mode.
19
text2.textWrap(acgraph.vector.Text.TextWrap.BY_WORD);