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