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
// create data
4
var data = [
5
["January", 10000],
6
["February", 12000],
7
["March", 18000],
8
["April", 11000],
9
["May", 9000]
10
];
11
12
// create a line chart
13
var chart = anychart.line(data);
14
chart.title("Side Position");
15
16
// change the side position of labels on the y-axis
17
chart.yAxis().labels().position("inside");
18
19
// change the side position of labels on the x-axis
20
chart.xAxis().labels().position("inside");
21
22
// set the container id
23
chart.container("container");
24
25
// initiate drawing the chart
26
chart.draw();
27
28
});