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
3
var chart = anychart.line();
4
5
// chart title
6
chart.title("Enable/Disable Axes Labels");
7
8
// disable x axis labels and title adjusting
9
var xAxis = chart.xAxis();
10
xAxis.labels(false);
11
xAxis.title("X-Axis without labels");
12
13
// adjusting y axis title and setting additional axis
14
var yAxis = chart.yAxis(0);
15
yAxis.title("Y-Axis with labels");
16
var yAxis1 = chart.yAxis(1);
17
yAxis1.orientation("right");
18
yAxis1.title("Secondary Y-Axis with labels");
19
20
// data
21
var data = anychart.data.set([
22
["January", 10000],
23
["February", 12000],
24
["March", 10000],
25
["April", 11000],
26
["May", 19000]
27
]);
28
29
// set data
30
chart.line(data);
31
32
// draw chart
33
chart.container("container");
34
chart.draw();
35
});