Repository navigation
Expand file tree
/
Copy pathopposed.js
More file actions
56 lines (52 loc) · 1.88 KB
/
Copy pathopposed.js
File metadata and controls
56 lines (52 loc) · 1.88 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
this.default = function () {
var heatmap = new ej.heatmap.HeatMap({
titleSettings: {
text: 'Monthly Flight Traffic at JFK Airport',
textStyle: {
size: '15px',
fontWeight: '500',
fontStyle: 'Normal',
fontFamily: 'Segoe UI'
}
},
xAxis: {
labels: ['2007', '2008', '2009', '2010', '2011',
'2012', '2013', '2014', '2015', '2016', '2017'],
opposedPosition: true,
labelRotation: 45,
labelIntersectAction: 'None',
},
yAxis: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May',
'Jun', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
opposedPosition: true
},
legendSettings: {
visible: false,
},
cellSettings: {
showLabel: false,
border: {
width: 0,
},
format: '{value} flights'
},
dataSource: window.opposedAxisData,
load: function (args) {
var opposedAxisTheme = location.hash.split('/')[1];
opposedAxisTheme = opposedAxisTheme ? opposedAxisTheme : 'Material';
args.heatmap.theme = (opposedAxisTheme.charAt(0).toUpperCase() + opposedAxisTheme.slice(1));
},
});
heatmap.appendTo('#container');
var xlistObj = new ej.buttons.CheckBox({ label: 'Change X-Axis Position', checked: true, change: valueXChange });
xlistObj.appendTo('#XOpposedPosition');
function valueXChange() {
heatmap.xAxis.opposedPosition = xlistObj.checked;
}
var ylistObj = new ej.buttons.CheckBox({ label: 'Change Y-Axis Position', checked: true, change: valueYChange });
ylistObj.appendTo('#YOpposedPosition');
function valueYChange() {
heatmap.yAxis.opposedPosition = ylistObj.checked;
}
};