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 firstSeriesData = dataSet.mapAs({x: [0], value: [1]});
15
var secondSeriesData = dataSet.mapAs({x: [0], value: [2]});
16
var thirdSeriesData = dataSet.mapAs({x: [0], value: [3]});
17
18
var chart = anychart.line();
19
20
chart.line(firstSeriesData);
21
chart.line(secondSeriesData);
22
chart.line(thirdSeriesData);
23
24
var a11y = chart.a11y();
25
26
// Set title text.
27
// Title text is available for listening through VoiceOver.
28
// You can use inspect element tool to see the table.
29
a11y.titleFormat("Custom title text.");
30
31
chart.title("Set title text.");
32
chart.container("container");
33
chart.draw();
34
});