Commit 76a9606d8775ffbc6162017769791637076f08ae
Exists in
master
alterções
Showing
2 changed files
with
0 additions
and
247 deletions
Show diff stats
wscacicneo.wsgi
wscacicneo/static/teste-helder.js
... | ... | @@ -1,243 +0,0 @@ |
1 | -Ext.define('User',{ | |
2 | - extend: 'Ext.data.Model', | |
3 | - fields: [ 'codigo', 'orgao', 'date' ] | |
4 | -}); | |
5 | - | |
6 | -var userStore = Ext.create('Ext.data.Store', { | |
7 | - model: 'User', | |
8 | - data: [ | |
9 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
10 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
11 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
12 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
13 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
14 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
15 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
16 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
17 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
18 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
19 | - { codigo: '27236', orgao: 'Ministério da Fazenda', date: '12/12/2014' }, | |
20 | - ] | |
21 | -}); | |
22 | - | |
23 | -table = Ext.create('Ext.grid.Panel', { | |
24 | - store: userStore, | |
25 | - width: 400, | |
26 | - height: 200, | |
27 | - // title: 'Application Users', | |
28 | - columns: [ | |
29 | - { | |
30 | - text: 'Codigo', | |
31 | - width: 75, | |
32 | - sortable: true, | |
33 | - hideable: false, | |
34 | - dataIndex: 'codigo' | |
35 | - }, | |
36 | - { | |
37 | - text: 'Orgao', | |
38 | - width: 300, | |
39 | - dataIndex: 'orgao', | |
40 | - hidden: false, | |
41 | - }, | |
42 | - { | |
43 | - text: 'Data', | |
44 | - sortable: false, | |
45 | - width:80, | |
46 | - renderer: Ext.util.Format.dateRenderer('m/d/Y'), | |
47 | - flex: 1, | |
48 | - dataIndex: 'date' | |
49 | - }, | |
50 | - | |
51 | - ] | |
52 | -}); | |
53 | - | |
54 | -tabela = Ext.create('Ext.panel.Panel', { | |
55 | - layout: 'fit', | |
56 | - title: 'Relatorios de Coletas', | |
57 | - width: '75%', | |
58 | - frame: true, | |
59 | - draggable: true, | |
60 | - collapsible: true, | |
61 | - border : true, | |
62 | - style: { | |
63 | - "text-align": 'center', | |
64 | - margin: '0px auto 15px auto' | |
65 | - }, | |
66 | - items: table, | |
67 | -}); | |
68 | - | |
69 | -Ext.onReady(function(){ | |
70 | - | |
71 | - | |
72 | - Ext.create('Ext.Container', { | |
73 | - padding: '15px', | |
74 | - items: [tabela], | |
75 | - renderTo: 'widgets' | |
76 | - }); | |
77 | - | |
78 | -}); | |
79 | - | |
80 | - | |
81 | -// **** GRAFICO DE PIZZA **** | |
82 | - | |
83 | -var store = Ext.create('Ext.data.JsonStore', { | |
84 | - fields: ['name', 'data'], | |
85 | - data: [ | |
86 | - { 'name': 'dado1', 'data': 2 }, | |
87 | - { 'name': 'dado2', 'data': 2 }, | |
88 | - { 'name': 'dado3', 'data': 4 }, | |
89 | - { 'name': 'dado4', 'data': 10 } | |
90 | -]}); | |
91 | - | |
92 | -var chart = Ext.create('Ext.chart.Chart', { | |
93 | - layout: 'fit', | |
94 | - width: 500, | |
95 | - height: 350, | |
96 | - animate: true, | |
97 | - store: store, | |
98 | - theme: 'Base:gradients', | |
99 | - shadow: true, | |
100 | - legend: { | |
101 | - position: 'right' | |
102 | - }, | |
103 | - series: [{ | |
104 | - type: 'pie', | |
105 | - angleField: 'data', | |
106 | - showInLegend: true, | |
107 | - tips: { | |
108 | - trackMouse: true, | |
109 | - width: 140, | |
110 | - height: 28, | |
111 | - renderer: function(storeItem, item) { | |
112 | - // calculate and display percentage on hover | |
113 | - var total = 0; | |
114 | - store.each(function(rec) { | |
115 | - total += rec.get('data'); | |
116 | - }); | |
117 | - this.setTitle(storeItem.get('name') + ': ' + Math.round(storeItem.get('data') / total * 100) + '%'); | |
118 | - } | |
119 | - }, | |
120 | - highlight: { | |
121 | - segment: { | |
122 | - margin: 20 | |
123 | - } | |
124 | - }, | |
125 | - label: { | |
126 | - field: 'name', | |
127 | - display: 'rotate', | |
128 | - contrast: true, | |
129 | - font: '18px Arial' | |
130 | - } | |
131 | - }] | |
132 | -}); | |
133 | - | |
134 | -widget = Ext.create('Ext.panel.Panel', { | |
135 | - layout: 'fit', | |
136 | - title: 'Widgets', | |
137 | - width: '75%', | |
138 | - frame: true, | |
139 | - draggable: true, | |
140 | - collapsible: true, | |
141 | - border : true, | |
142 | - style: { | |
143 | - "text-align": 'center', | |
144 | - margin: '-35px auto 15px auto' | |
145 | - }, | |
146 | - items: chart | |
147 | -}); | |
148 | - | |
149 | -Ext.onReady(function(){ | |
150 | - | |
151 | - | |
152 | - Ext.create('Ext.Container', { | |
153 | - padding: '15px', | |
154 | - items: [widget], | |
155 | - renderTo: 'widgets' | |
156 | - }); | |
157 | - | |
158 | -}); | |
159 | - | |
160 | -// **** GRAFICO DE PIZZA **** | |
161 | - | |
162 | -var store = Ext.create('Ext.data.JsonStore', { | |
163 | - fields: ['name', 'data'], | |
164 | - data: [ | |
165 | - { 'name': 'dado1', 'data': 2 }, | |
166 | - { 'name': 'dado2', 'data': 2 }, | |
167 | - { 'name': 'dado3', 'data': 4 }, | |
168 | - { 'name': 'dado4', 'data': 10 } | |
169 | -]}); | |
170 | - | |
171 | -var chart = Ext.create('Ext.chart.Chart', { | |
172 | - layout: 'fit', | |
173 | - width: 500, | |
174 | - height: 350, | |
175 | - animate: true, | |
176 | - store: store, | |
177 | - theme: 'Base:gradients', | |
178 | - shadow: true, | |
179 | - | |
180 | - axes:[ | |
181 | - | |
182 | - ] | |
183 | - | |
184 | - legend: { | |
185 | - position: 'right' | |
186 | - }, | |
187 | - series: [{ | |
188 | - type: 'pie', | |
189 | - angleField: 'data', | |
190 | - showInLegend: true, | |
191 | - tips: { | |
192 | - trackMouse: true, | |
193 | - width: 140, | |
194 | - height: 28, | |
195 | - renderer: function(storeItem, item) { | |
196 | - // calculate and display percentage on hover | |
197 | - var total = 0; | |
198 | - store.each(function(rec) { | |
199 | - total += rec.get('data'); | |
200 | - }); | |
201 | - this.setTitle(storeItem.get('name') + ': ' + Math.round(storeItem.get('data') / total * 100) + '%'); | |
202 | - } | |
203 | - }, | |
204 | - highlight: { | |
205 | - segment: { | |
206 | - margin: 20 | |
207 | - } | |
208 | - }, | |
209 | - label: { | |
210 | - field: 'name', | |
211 | - display: 'rotate', | |
212 | - contrast: true, | |
213 | - font: '18px Arial' | |
214 | - } | |
215 | - }] | |
216 | -}); | |
217 | - | |
218 | -widget = Ext.create('Ext.panel.Panel', { | |
219 | - layout: 'fit', | |
220 | - title: 'Widgets', | |
221 | - width: '75%', | |
222 | - frame: true, | |
223 | - draggable: true, | |
224 | - collapsible: true, | |
225 | - border : true, | |
226 | - style: { | |
227 | - "text-align": 'center', | |
228 | - margin: '-65px auto 15px auto' | |
229 | - }, | |
230 | - items: chart | |
231 | -}); | |
232 | - | |
233 | -Ext.onReady(function(){ | |
234 | - | |
235 | - | |
236 | - Ext.create('Ext.Container', { | |
237 | - padding: '15px', | |
238 | - items: [widget], | |
239 | - renderTo: 'widgets' | |
240 | - }); | |
241 | - | |
242 | -}); | |
243 | - |