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.enabled(true);
11
title.text('Set text font style');
12
13
// Set text font style.
14
title.fontStyle('italic');
15
16
chart.container('container');
17
chart.draw();
18
});