HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 100%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
// The data used in this sample can be obtained from the CDN
3
// https://cdn.anychart.com/samples/resource-charts/uefa-stadiums-time-tracking-off/data.json
4
anychart.data.loadJsonFile(
5
'https://cdn.anychart.com/samples/resource-charts/uefa-stadiums-time-tracking-off/data.json',
6
function (data) {
7
var chart = anychart.resource();
8
var dateSet = anychart.data.set(data);
9
10
chart.data(dateSet.mapAs({ description: 'city' }));
11
12
chart
13
.zoomLevel(0)
14
.pixPerHour(30)
15
.minRowHeight(80)
16
.currentStartDate('2016-06-11');
17
18
chart
19
.activities()
20
.labels()
21
.useHtml(true)
22
.format(function () {
23
return (
24
this.activityName +
25
'<br><span style="color: #ccc">' +
26
this.activityInfo.group +
27
'</span>'
28
);
29
});
30
31
// set container id for the chart
32
chart.container('container');
33
// initiate chart drawing
34
chart.draw();
35
}
36
);
37
});