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, hatchFill: "forward-diagonal"},
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
// configure the states of the series
19
series.fill("#0066cc", 0.5);
20
series.stroke("#0066cc", 2);
21
series.markers(true);
22
series.labels(true);
23
24
// set the chart title
25
chart.title("States: Shortcuts (Normal State)");
26
27
// set the container id
28
chart.container("container");
29
30
// initiate drawing the chart
31
chart.draw();
32
});