Repository navigation
Expand file tree
/
Copy pathheatmap.js
More file actions
73 lines (72 loc) · 2.34 KB
/
Copy pathheatmap.js
File metadata and controls
73 lines (72 loc) · 2.34 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Heatmap sample
*/
this.default = function () {
var maps = new ej.maps.Maps({
load: function (args) {
var theme = location.hash.split('/')[1];
theme = theme ? theme : 'Material';
args.maps.theme = (theme.charAt(0).toUpperCase() + theme.slice(1));
},
format: 'n',
useGroupingSeparator: true,
titleSettings: {
text: "State wise India's population - 2011",
textStyle: {
size: '16px'
}
},
legendSettings: {
visible: true,
mode: 'Interactive',
position: 'Bottom',
height: '10',
width: '350',
alignment: 'Center',
labelDisplayMode: 'Trim'
},
zoomSettings: {
enable: false
},
layers: [
{
shapeData: window.India,
shapePropertyPath: 'NAME_1',
shapeDataPath: 'Name',
dataSource: window.india_Population,
tooltipSettings: {
visible: true,
valuePath: 'population',
format: 'State: ${Name} <br> Population: ${population} <br>'
},
shapeSettings: {
border: {
width: 0.2,
color: 'white'
},
colorValuePath: 'population',
colorMapping: [{
from: 60000, to: 400000, color: '#9fdfdf', label: '<0.4M'
},
{
from: 400000, to: 10000000, color: '#79d2d2', label: '0.4-10M'
},
{
from: 10000000, to: 20000000, color: '#53C6C6', label: '10-20M'
},
{
from: 20000000, to: 70000000, color: '#39acac', label: '20-70M'
},
{
from: 70000000, to: 100000000, color: '#339999', label: '70-100M'
},
{
from: 100000000, to: 200000000, color: '#2d8686', label: '>100M'
}
]
}
}
]
});
maps.appendTo('#container');
};