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
{x: "John", value: 10000},
6
{x: "Jake", value: 12000},
7
{x: "Peter", value: 13000,
8
normal: {
9
fill: "#5cd65c",
10
stroke: null,
11
label: {enabled: true}
12
},
13
hovered: {
14
fill: "#5cd65c",
15
label: {enabled: true}
16
},
17
selected: {
18
fill: "#5cd65c",
19
label: {enabled: true}
20
}
21
},
22
{x: "James", value: 10000},
23
{x: "Mary", value: 9000}
24
];
25
26
// create a chart
27
var chart = anychart.column();
28
29
// create a column series and set the data
30
var series = chart.column(data);
31
32
// set the chart title
33
chart.title("Column Chart: Appearance (Individual Points)");
34
35
// set the titles of the axes
36
chart.xAxis().title("Manager");
37
chart.yAxis().title("Sales, $");
38
39
// set the container id
40
chart.container("container");
41
42
// initiate drawing the chart
43
chart.draw();
44
});