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 data = getData();
3
4
var chart = anychart.resource();
5
chart.data(data).zoomLevel(1);
6
7
// Get chart as an invisible HTML table.
8
// You can use inspect element tool to see the table.
9
var a11yTable = chart.toA11yTable('Chart table');
10
// Do something with an HTML table.
11
12
chart.title('Get chart as an invisible HTML table');
13
chart.container('container');
14
chart.draw();
15
});
16
17
function getData() {
18
return [
19
{
20
name: 'Vasil Kiryienka',
21
description: 'Rider',
22
activities: [
23
{
24
name: 'World Championships',
25
start: '2016-10-12',
26
end: '2016-10-12'
27
}
28
]
29
},
30
{
31
name: 'Elia Viviani',
32
description: 'Rider',
33
activities: [
34
{
35
name: 'Paris - Tours',
36
start: '2016-10-09',
37
end: '2016-10-09',
38
fill: ['#1A237E', '#FFFFFF', '#D50000']
39
},
40
{
41
name: 'World Championships',
42
start: '2016-10-16',
43
end: '2016-10-16'
44
},
45
{
46
name: 'Abu Dhabi Tour',
47
start: '2016-10-20',
48
end: '2016-10-23',
49
fill: '#FFA000'
50
}
51
]
52
},
53
{
54
name: 'Ben Swift',
55
description: 'Rider',
56
activities: [
57
{
58
name: 'World Championships',
59
start: '2016-10-09',
60
end: '2016-10-09'
61
},
62
{
63
name: 'World Championships',
64
start: '2016-10-16',
65
end: '2016-10-16'
66
}
67
]
68
},
69
{
70
name: 'Michal Kwiatkowski',
71
description: 'Rider',
72
activities: [
73
{
74
name: 'World Championships',
75
start: '2016-10-09',
76
end: '2016-10-09'
77
},
78
{
79
name: 'Abu Dhabi Tour',
80
start: '2016-10-20',
81
end: '2016-10-23',
82
fill: '#FFA000'
83
}
84
]
85
},
86
{
87
name: 'Alex Peters',
88
description: 'Rider',
89
activities: [
90
{
91
name: 'Japan Cup',
92
start: '2016-10-23',
93
end: '2016-10-23',
94
fill: '#EF9A9A'
95
}
96
]
97
},
98
{
99
name: 'Ian Stannard',
100
description: 'Rider',
101
activities: [
102
{
103
name: 'Paris - Tours',
104
start: '2016-10-09',
105
end: '2016-10-09',
106
fill: ['#1A237E', '#FFFFFF', '#D50000']
107
},
108
{
109
name: 'World Championships',
110
start: '2016-10-16',
111
end: '2016-10-16'
112
}
113
]
114
},
115
{
116
name: 'Lars Petter Nordhaug',
117
description: 'Rider',
118
activities: [
119
{
120
name: 'Paris - Tours',
121
start: '2016-10-09',
122
end: '2016-10-09',
123
fill: ['#1A237E', '#FFFFFF', '#D50000']
124
},
125
{
126
name: 'Japan Cup',
127
start: '2016-10-23',
128
end: '2016-10-23',
129
fill: '#EF9A9A'
130
}
131
]
132
},
133
{
134
name: 'Nicolas Roche',
135
description: 'Rider',
136
activities: [
137
{
138
name: 'World Championships',
139
start: '2016-10-09',
140
end: '2016-10-09'
141
},
142
{
143
name: 'World Championships',
144
start: '2016-10-12',
145
end: '2016-10-12'
146
},
147
{
148
name: 'Abu Dhabi Tour',
149
start: '2016-10-20',
150
end: '2016-10-23',
151
fill: '#FFA000'
152
}
153
]
154
},
155
{
156
name: 'Geraint Thomas',
157
description: 'Rider',
158
activities: [
159
{
160
name: 'World Championships',
161
start: '2016-10-09',
162
end: '2016-10-09'
163
},
164
{
165
name: 'World Championships',
166
start: '2016-10-16',
167
end: '2016-10-16'
168
}
169
]
170
},
171
{
172
name: 'Danny van Poppel',
173
description: 'Rider',
174
activities: [
175
{
176
name: 'World Championships',
177
start: '2016-10-09',
178
end: '2016-10-09'
179
},
180
{
181
name: 'World Championships',
182
start: '2016-10-16',
183
end: '2016-10-16'
184
},
185
{
186
name: 'Abu Dhabi Tour',
187
start: '2016-10-20',
188
end: '2016-10-23',
189
fill: '#FFA000'
190
}
191
]
192
},
193
{
194
name: 'David Lopez',
195
description: 'Rider',
196
activities: [
197
{
198
name: 'Japan Cup',
199
start: '2016-10-23',
200
end: '2016-10-23',
201
fill: '#EF9A9A'
202
}
203
]
204
},
205
{
206
name: 'Xabier Zandio',
207
description: 'Rider',
208
activities: [
209
{
210
name: 'Japan Cup',
211
start: '2016-10-23',
212
end: '2016-10-23',
213
fill: '#EF9A9A'
214
}
215
]
216
}
217
];
218
}