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/sales-call-centre/data.json
4
anychart.data.loadJsonFile(
5
'https://cdn.anychart.com/samples/resource-charts/sales-call-centre/data.json',
6
function (data) {
7
var chart = anychart.resource();
8
chart.data(data);
9
10
chart
11
.zoomLevel(0)
12
.timeTrackingMode('activity-per-resource')
13
.currentStartDate('2016-10-03');
14
15
chart.calendar().availabilities([
16
{
17
each: 'day',
18
from: 8,
19
to: 18,
20
isWorking: true
21
}
22
]);
23
24
chart.logo().fill({
25
src: 'https://cdn.anychart.com/images/resource-chart/logo.png'
26
});
27
28
var resourceList = chart.resourceList();
29
resourceList.types({
30
fontColor: '#4CAF50',
31
fontSize: 12
32
});
33
34
// Set images settings.
35
resourceList.images().size(85);
36
37
// Set tags settings.
38
resourceList.tags().background('#70d0f5').fontColor('#fff');
39
40
// set container id for the chart
41
chart.container('container');
42
// initiate chart drawing
43
chart.draw();
44
}
45
);
46
});