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
// data
4
var data = anychart.data.set([
5
["John", 10000, 12000],
6
["Jake", 12000, 15000],
7
["Peter", 18000, 16000],
8
["James", 11000, 13000],
9
["Mary", 9000, 19000]
10
]);
11
12
// map data for the each series
13
var Sales2013 = data.mapAs({x: 0, value: 1});
14
var Sales2014 = data.mapAs({x: 0, value: 2});
15
16
// chart type
17
var chart = anychart.column();
18
19
// set data
20
var series2013 = chart.column(Sales2013);
21
// set series name
22
series2013.name("Sales in 2013");
23
24
// set series data
25
var series2014 = chart.column(Sales2014);
26
// set series name
27
series2014.name("Sales in 2014");
28
29
// chart title
30
chart.title("Enable the accessibility support on the chart");
31
32
// set axes titles
33
chart.xAxis().title("Retail Channel");
34
chart.yAxis().title("Sales");
35
36
// enable legend
37
chart.legend(true);
38
39
// enable the accessibility of the chart
40
chart.a11y(true);
41
42
// enable the accessibility support for series
43
series2013.a11y(true);
44
series2014.a11y(true);
45
46
// draw
47
chart.container("container");
48
chart.draw();
49
});