-
Notifications
You must be signed in to change notification settings - Fork 22
/
app.js
87 lines (79 loc) · 2.21 KB
/
app.js
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Ext.Loader.setConfig({
enabled : true,
disableCaching : true, // For debug only
paths : {
// 'Chart' : HOME + '/highcharts_extjs4' // For website
'Chart' : 'Chart'
}
});
Ext.require('Chart.ux.HighChart');
Ext.require('Chart.ux.SampleConfigs');
// ALWAYS POST!!
Ext.override(Ext.data.proxy.Ajax,{
getMethod: function(request) {
return 'POST';
}
});
Ext.ns("Demo");
Ext.application({
name : 'HighCharts',
// appFolder : HOME + '/demos/Highcharts_ExtJs_4/app', // For website
appFolder : 'app',
controllers : ['Charts'],
launch : function() {
// For joekuan.org website
if (Ext.get('loading-mask'))
Ext.get('loading-mask').fadeOut({remove:true});
Ext.create('Ext.container.Viewport', {
layout : 'border',
border : '5 5 5 5',
items : [{
region : 'north',
listeners: {
'render': function(panel) {
panel.body.on('click', function() {
Ext.Msg.alert('Info',
'ExtJs version: ' + Ext.versions.core.version + ", <br/>" +
'Highcharts version: ' + Highcharts.version + ", <br/>" +
'Chart.ux.Highchart: ' + Chart.ux.HighChart.version);
});
}
},
html : '<h1 class="x-panel-header">Highcharts examples</h1>',
height: 40,
id: 'banner',
border : false,
margins : '0 0 5 0',
bodyStyle: { 'background-image': 'url(./images/banner.gif)',
'background-repeat': 'repeat-x',
color: '#7a7a7a'
}
}, {
region : 'west',
width : 200,
title : 'Charts',
id: 'leftTree',
xtype : 'chartsTree',
margins : '0 0 5 5',
split: true
}, {
region : 'center',
id : 'centerpane',
xtype : 'panel',
layout : 'fit',
margins : '0 5 5 0',
tbar : [{
text : 'Reload Data',
id : 'reload',
disabled : true,
action: 'reload'
}, {
text: 'Add Series',
id: 'addSeries',
disabled: true,
action: 'addSeries'
}]
}]
});
}
});