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 chart = anychart.line([
3
{x: 'Cycling', value: 18},
4
{x: 'Swimming', value: 25},
5
{x: 'Run', value: 10},
6
{x: 'Hiking', value: 20}
7
]);
8
9
var title = chart.title();
10
title.background({stroke: 'black'});
11
title.textIndent(20);
12
title.fontSize(14);
13
title.enabled(true);
14
title.text('The text \n direction is rtl');
15
16
// Set text direction.
17
title.textDirection('rtl');
18
19
chart.container('container');
20
chart.draw();
21
});