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
var dataSet = anychart.data.set([
3
['1986', 41, 36, 31],
4
['1987', 37, 34, 29],
5
['1988', 48, 47, 40],
6
['1989', 41, 39, 33],
7
['1990', 39, 36, 31],
8
['1991', 34, 31, 27],
9
['1992', 38, 35, 30],
10
['1993', 29, 28, 24],
11
['1994', 33, 32, 27]
12
]);
13
14
var data1 = dataSet.mapAs({x: 0, value: 1});
15
var data2 = dataSet.mapAs({x: 0, value: 2});
16
var data3 = dataSet.mapAs({x: 0, value: 3});
17
18
var chart = anychart.line();
19
20
var blueSeries = chart.line(data1);
21
chart.line(data2);
22
chart.line(data3);
23
24
var a11y = blueSeries.a11y();
25
26
// Set title text.
27
// Title text is available for listening through VoiceOver.
28
// You can use inspect element tool to check the title.
29
a11y.titleFormat('Custom title text');
30
31
chart.title('Set title text for the series');
32
chart.container('container');
33
chart.draw();
34
});