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
// create the text element as html
4
text1 = stage.text(0, 0, "By Letter Text Wrap Mode. This is another custom text element, which is made multiline with the help of AnyChart Graphics methods. It shows how the natural text behaves.");
5
// text settings
6
text1.width(150);
7
text1.height(150);
8
text1.wordWrap("break-word");
9
text1.wordBreak("break-all");
10
11
// create second text
12
text2 = stage.text(170, 0, "By Word Text Wrap Mode. This is another custom text element, which is made multiline with the help of AnyChart Graphics methods. It shows how the natural text behaves.");
13
// text settings
14
text2.width(150);
15
text2.height(150);
16
text2.wordWrap("break-word");
17
text2.wordBreak("normal");