Repository navigation
Expand file tree
/
Copy pathbubble.js
More file actions
59 lines (58 loc) · 1.8 KB
/
Copy pathbubble.js
File metadata and controls
59 lines (58 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* Bubble sample
*/
this.default = function () {
var maps = new ej.maps.Maps({
// custom code start
load: function (args) {
var bubbletheme = location.hash.split('/')[1];
bubbletheme = bubbletheme ? bubbletheme : 'Material';
args.maps.theme = (bubbletheme.charAt(0).toUpperCase() + bubbletheme.slice(1));
},
// custom code end
bubbleRendering: function (args) {
args.radius = args.data.value;
},
format: 'n',
useGroupingSeparator: true,
zoomSettings: {
enable: true,
horizontalAlignment: 'Near',
toolBarOrientation: 'Vertical',
pinchZooming: true
},
titleSettings: {
text: 'Top 30 countries with highest Internet users',
textStyle: {
size: '16px'
}
},
layers: [
{
shapeDataPath: 'name',
shapePropertyPath: 'name',
shapeData: new ej.maps.MapAjax('./src/maps/map-data/world-map.json'),
shapeSettings: {
fill: '#E5E5E5'
},
bubbleSettings: [
{
visible: true,
valuePath: 'value',
colorValuePath: 'color',
minRadius: 3,
maxRadius: 70,
opacity: 0.8,
dataSource: window.internetUsers,
tooltipSettings: {
visible: true,
valuePath: 'population',
template: '#template'
},
}
]
}
]
});
maps.appendTo('#container');
};