HTMLcopy
1
<div id="container">
2
</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
3
// set stage
4
var stage = anychart.graphics.create("container");
5
6
// create variable for custom theme
7
var customTheme = {
8
"defaultFontSettings": {
9
"fontSize": 9
10
},
11
"chart": {
12
"title": false,
13
"legend": false
14
}
15
};
16
17
// apply custom theme
18
anychart.theme(customTheme);
19
20
21
//chart 1
22
23
// set data
24
var data_1 = [
25
['CSS Burgess Hill', 5, 'drillDown':[
26
{'Wifi':'Jan','value': 25},
27
{'Skype':'Jan','value': 40},
28
{'Application X':'Jan','value':30}]
29
]},
30
['Fen House',5],
31
['Hollyrood',5],
32
['Franklynn Road',5],
33
['Kerwin Court',5],
34
['Shinewater Court',5],
35
['Beech Hill - Sussex Community Houses',5],
36
['Rosewood - Sussex Community Houses',5],
37
['The Willows - Sussex Community Houses',5],
38
['Home Support - South East',5],
39
['Bedford-Stolford Rise',5],
40
['Bedford-Porthcawl Green',5],
41
['Mill Road',5],
42
['Myland House',5],
43
['17 Duchells Copse',5],
44
['18 Wellington Road',5],
45
['2 Stor Meadow',5],
46
['Dovercourt House',5]
47
48
];
49
50
// set chart_1
51
var chart_1 = anychart.bar(data_1);
52
chart_1.title("South East");
53
54
// chart size and position
55
chart_1.bounds("0%", "0%", "35%", "60%");
56
57
// draw
58
chart_1.container(stage);
59
chart_1.draw();
60
61
//chart 2
62
63
// set data
64
var data_2 = [
65
['The Maples',5],
66
['Welby Close',5],
67
['The Woodmill',5],
68
['The Woodmill - Spindlebury',5],
69
['The Woodmill - The Paddock',5],
70
['Ty Aberddafen',5],
71
['Home Support - South / South West',5],
72
['Briants Avenue',5],
73
['Pages Orchard',5],
74
['Woodlands Road',5],
75
['14 Old Road',5],
76
['60 Salmonpool Lane',5],
77
['Heathermount',5]
78
];
79
80
// set chart_2
81
var chart_2 = anychart.bar(data_2);
82
chart_2.title('South West');
83
84
// chart size and position
85
chart_2.bounds("40%", "0%", "50%", "50%");
86
87
// draw
88
chart_2.container(stage);
89
chart_2.draw();
90
91
92
93
});