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 a chart
4
var chart = anychart.column([
5
{x: "Thesis", value: 1770},
6
{x: "Antithesis", value: 1807},
7
{x: "Synthesis", value: 1831}
8
]);
9
10
// set labels position
11
labels = chart.getSeries(0).labels();
12
labels.enabled(true);
13
labels.position("TopCenter");
14
labels.anchor("Left");
15
labels.offsetY(-10);
16
labels.rotation(-90);
17
18
// set title
19
chart.title("Labels position");
20
21
// draw
22
chart.container("container");
23
chart.draw();
24
});