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: 'January', value: 1.1},
4
{x: 'February', value: 1.6},
5
{x: 'March', value: 1.4},
6
{x: 'April', value: 1.9}
7
]);
8
9
var yAxis = chart.yAxis();
10
11
// Get title.
12
var titleSettings = yAxis.title();
13
titleSettings.enabled(true);
14
titleSettings.text('Axis title');
15
16
chart.title('Get and modify axis title');
17
chart.container('container');
18
chart.draw();
19
});