Commit 10485b5222b770ef0b404201ec36eb41330d26bc
1 parent
492c9a1b
Exists in
master
and in
7 other branches
opção para integração entre gráficos
Showing
3 changed files
with
713 additions
and
345 deletions
Show diff stats
ferramentas/graficointerativo1/dicionario.js
1 | //+$trad(1,i3GEOF.graficointerativo1.dicionario)+ | 1 | //+$trad(1,i3GEOF.graficointerativo1.dicionario)+ |
2 | -i3GEOF.graficointerativo1.dicionario = { | ||
3 | - "tipo" : [ { | ||
4 | - pt : "Tipo", | ||
5 | - en : "", | ||
6 | - es : "" | ||
7 | - } ], | ||
8 | - "dados" : [ { | ||
9 | - pt : "Dados", | ||
10 | - en : "", | ||
11 | - es : "" | ||
12 | - } ], | ||
13 | - "grafico" : [ { | ||
14 | - pt : "Gráfico", | ||
15 | - en : "", | ||
16 | - es : "" | ||
17 | - } ], | ||
18 | - "escolhatipo" : [ { | ||
19 | - pt : "Escolha o tipo de gráfico", | ||
20 | - en : "", | ||
21 | - es : "" | ||
22 | - } ], | ||
23 | - "pizza2d" : [ { | ||
24 | - pt : "pizza 2d", | ||
25 | - en : "", | ||
26 | - es : "" | ||
27 | - } ], | ||
28 | - "areasimp" : [ { | ||
29 | - pt : "área simples", | ||
30 | - en : "", | ||
31 | - es : "" | ||
32 | - } ], | ||
33 | - "distpt" : [ { | ||
34 | - pt : "distribuição de pontos", | ||
35 | - en : "", | ||
36 | - es : "" | ||
37 | - } ], | ||
38 | - "linhassimp" : [ { | ||
39 | - pt : "linhas simples", | ||
40 | - en : "", | ||
41 | - es : "" | ||
42 | - } ], | ||
43 | - "arvore" : [ { | ||
44 | - pt : "Árvore", | ||
45 | - en : "", | ||
46 | - es : "" | ||
47 | - } ], | ||
48 | - "barrasv" : [ { | ||
49 | - pt : "barras verticais", | ||
50 | - en : "", | ||
51 | - es : "" | ||
52 | - } ], | ||
53 | - "barrash" : [ { | ||
54 | - pt : "barras horizontais", | ||
55 | - en : "", | ||
56 | - es : "" | ||
57 | - } ], | ||
58 | - "configgr" : [ { | ||
59 | - pt : "Configuração do gráfico", | ||
60 | - en : "", | ||
61 | - es : "" | ||
62 | - } ], | ||
63 | - "tema" : [ { | ||
64 | - pt : "Tema", | ||
65 | - en : "", | ||
66 | - es : "" | ||
67 | - } ], | ||
68 | - "itemcx" : [ { | ||
69 | - pt : "Item com as classes ou eixo X", | ||
70 | - en : "", | ||
71 | - es : "" | ||
72 | - } ], | ||
73 | - "itemcy" : [ { | ||
74 | - pt : "Item(ns) com os valores ou eixo Y", | ||
75 | - en : "", | ||
76 | - es : "" | ||
77 | - } ], | ||
78 | - "excluirval" : [ { | ||
79 | - pt : "Excluir o seguinte valor", | ||
80 | - en : "", | ||
81 | - es : "" | ||
82 | - } ], | ||
83 | - "geracor" : [ { | ||
84 | - pt : "gera cores aleatórias", | ||
85 | - en : "", | ||
86 | - es : "" | ||
87 | - } ], | ||
88 | - "obterdados" : [ { | ||
89 | - pt : "Obter dados", | ||
90 | - en : "", | ||
91 | - es : "" | ||
92 | - } ], | ||
93 | - "seescolher" : [ { | ||
94 | - pt : "Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.", | ||
95 | - en : "", | ||
96 | - es : "" | ||
97 | - } ], | ||
98 | - "inclinax" : [ { | ||
99 | - pt : "Inclina os textos do eixo X", | ||
100 | - en : "", | ||
101 | - es : "" | ||
102 | - } ], | ||
103 | - "adlinbarras" : [ { | ||
104 | - pt : "Adiciona as linhas em gráficos de barras", | ||
105 | - en : "", | ||
106 | - es : "" | ||
107 | - } ], | ||
108 | - "utilizvalacum" : [ { | ||
109 | - pt : "Utiliza valores acumulados", | ||
110 | - en : "", | ||
111 | - titleFont : 'bold 14px sans-serif', | ||
112 | - titlePosition : "top", | ||
113 | - es : "" | ||
114 | - } ], | ||
115 | - "utilizvalrelat" : [ { | ||
116 | - pt : "Utiliza valores relativos", | ||
117 | - en : "", | ||
118 | - es : "" | ||
119 | - } ], | ||
120 | - "ordenax" : [ { | ||
121 | - pt : "Ordena o eixo X", | ||
122 | - en : "", | ||
123 | - es : "" | ||
124 | - } ], | ||
125 | - "naoprocessa" : [ { | ||
126 | - pt : "Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos", | ||
127 | - en : "", | ||
128 | - es : "" | ||
129 | - } ], | ||
130 | - "soma" : [ { | ||
131 | - pt : "Soma", | ||
132 | - en : "", | ||
133 | - es : "" | ||
134 | - } ], | ||
135 | - "media" : [ { | ||
136 | - pt : "Média", | ||
137 | - en : "", | ||
138 | - es : "" | ||
139 | - } ], | ||
140 | - "tipoagregay" : [ { | ||
141 | - pt : "Tipo de agregação dos valores do eixo Y", | ||
142 | - en : "", | ||
143 | - es : "" | ||
144 | - } ], | ||
145 | - "fatcalclarg" : [ { | ||
146 | - pt : "Fator de cálculo da largura do gráfico. O número de ocorrências será multiplicado por esse fator para calcular o tamanho final do gráfico em pixels. Deixe como 0 para usar o cálculo automático.", | ||
147 | - en : "", | ||
148 | - es : "" | ||
149 | - } ], | ||
150 | - "janelasep" : [ { | ||
151 | - pt : "abrir em uma janela separada", | ||
152 | - en : "", | ||
153 | - es : "" | ||
154 | - } ], | ||
155 | - 'selecionaTipoGrafico' : [ { | ||
156 | - pt : "Escolha um tipo de grafico", | ||
157 | - en : "", | ||
158 | - es : "" | ||
159 | - } ], | ||
160 | - 'erroTemaOrigem' : [ { | ||
161 | - pt : "erro ao ler os itens do tema de origem", | ||
162 | - en : "", | ||
163 | - es : "" | ||
164 | - } ], | ||
165 | - 'digitaTituloLegenda' : [ { | ||
166 | - pt : "Digite o título para legenda", | ||
167 | - en : "", | ||
168 | - es : "" | ||
169 | - } ], | ||
170 | - 'selecionaTema' : [ { | ||
171 | - pt : "Escolha um tema", | ||
172 | - en : "", | ||
173 | - es : "" | ||
174 | - } ], | ||
175 | - 'selecionaItemX' : [ { | ||
176 | - pt : "Escolha um item para X", | ||
177 | - en : "", | ||
178 | - es : "" | ||
179 | - } ], | ||
180 | - 'selecionaItemY' : [ { | ||
181 | - pt : "Escolha um item para Y", | ||
182 | - en : "", | ||
183 | - es : "" | ||
184 | - } ], | ||
185 | - 'dadosRegiaoMostrada' : [ { | ||
186 | - pt : "Os dados utilizados referem-se apenas à região atual mostrada no mapa", | ||
187 | - en : "", | ||
188 | - es : "" | ||
189 | - } ], | ||
190 | - 'tabelaGrafico' : [ { | ||
191 | - pt : "Tabela de dados para o gráfico. Os valores podem ser editados", | ||
192 | - en : "", | ||
193 | - es : "" | ||
194 | - } ], | ||
195 | - 39 : [ { | ||
196 | - pt : "nome", | ||
197 | - en : "", | ||
198 | - es : "" | ||
199 | - } ], | ||
200 | - 40 : [ { | ||
201 | - pt : "valor", | ||
202 | - en : "", | ||
203 | - es : "" | ||
204 | - } ], | ||
205 | - 'cor' : [ { | ||
206 | - pt : "cor", | ||
207 | - en : "", | ||
208 | - es : "" | ||
209 | - } ], | ||
210 | - 'exclui' : [ { | ||
211 | - pt : "excluir", | ||
212 | - en : "", | ||
213 | - es : "" | ||
214 | - } ], | ||
215 | - 'digitaNovoNome' : [ { | ||
216 | - pt : "digite o novo nome", | ||
217 | - en : "", | ||
218 | - es : "" | ||
219 | - } ], | ||
220 | - 44 : [ { | ||
221 | - pt : "digite o novo valor", | ||
222 | - en : "", | ||
223 | - es : "" | ||
224 | - } ], | ||
225 | - 'casos' : [ { | ||
226 | - pt : "casos", | ||
227 | - en : "", | ||
228 | - es : "" | ||
229 | - } ], | ||
230 | - 'numeroCasos' : [ { | ||
231 | - pt : "n. de casos", | ||
232 | - en : "", | ||
233 | - es : "" | ||
234 | - } ], | ||
235 | - 47 : [ { | ||
236 | - pt : "Atualiza o gráfico ao navegar pelo mapa", | ||
237 | - en : "", | ||
238 | - es : "" | ||
239 | - } ], | ||
240 | - "stacked" : [ { | ||
241 | - pt : "Utiliza barras divididas entre os valores (stacked)", | ||
242 | - en : "", | ||
243 | - es : "" | ||
244 | - } ], | ||
245 | - "linhasnascols" : [ { | ||
246 | - pt : "As linhas de dados ficam nas colunas", | ||
247 | - en : "", | ||
248 | - es : "" | ||
249 | - } ], | ||
250 | - "titulo" : [ { | ||
251 | - pt : "Título", | ||
252 | - en : "", | ||
253 | - es : "" | ||
254 | - } ], | ||
255 | - "titux" : [ { | ||
256 | - pt : "Título do eixo X", | ||
257 | - en : "", | ||
258 | - es : "" | ||
259 | - } ], | ||
260 | - "tituy" : [ { | ||
261 | - pt : "Título do eixo Y", | ||
262 | - en : "", | ||
263 | - es : "" | ||
264 | - } ], | ||
265 | - "atualizaNavegacao" : [ { | ||
266 | - pt : "Atualiza ao navegar", | ||
267 | - en : "", | ||
268 | - es : "" | ||
269 | - } ], | ||
270 | - "idDoGrafico" : [ { | ||
271 | - pt : "ID do gráfico", | ||
272 | - en : "", | ||
273 | - es : "" | ||
274 | - } ] | ||
275 | -}; | 2 | +i3GEOF.graficointerativo1.dicionario = |
3 | + { | ||
4 | + "tipo" : [ | ||
5 | + { | ||
6 | + pt : "Tipo", | ||
7 | + en : "", | ||
8 | + es : "" | ||
9 | + } | ||
10 | + ], | ||
11 | + "dados" : [ | ||
12 | + { | ||
13 | + pt : "Dados", | ||
14 | + en : "", | ||
15 | + es : "" | ||
16 | + } | ||
17 | + ], | ||
18 | + "grafico" : [ | ||
19 | + { | ||
20 | + pt : "Gráfico", | ||
21 | + en : "", | ||
22 | + es : "" | ||
23 | + } | ||
24 | + ], | ||
25 | + "escolhatipo" : [ | ||
26 | + { | ||
27 | + pt : "Escolha o tipo de gráfico", | ||
28 | + en : "", | ||
29 | + es : "" | ||
30 | + } | ||
31 | + ], | ||
32 | + "pizza2d" : [ | ||
33 | + { | ||
34 | + pt : "pizza 2d", | ||
35 | + en : "", | ||
36 | + es : "" | ||
37 | + } | ||
38 | + ], | ||
39 | + "areasimp" : [ | ||
40 | + { | ||
41 | + pt : "área simples", | ||
42 | + en : "", | ||
43 | + es : "" | ||
44 | + } | ||
45 | + ], | ||
46 | + "distpt" : [ | ||
47 | + { | ||
48 | + pt : "distribuição de pontos", | ||
49 | + en : "", | ||
50 | + es : "" | ||
51 | + } | ||
52 | + ], | ||
53 | + "linhassimp" : [ | ||
54 | + { | ||
55 | + pt : "linhas simples", | ||
56 | + en : "", | ||
57 | + es : "" | ||
58 | + } | ||
59 | + ], | ||
60 | + "arvore" : [ | ||
61 | + { | ||
62 | + pt : "Árvore", | ||
63 | + en : "", | ||
64 | + es : "" | ||
65 | + } | ||
66 | + ], | ||
67 | + "barrasv" : [ | ||
68 | + { | ||
69 | + pt : "barras verticais", | ||
70 | + en : "", | ||
71 | + es : "" | ||
72 | + } | ||
73 | + ], | ||
74 | + "barrash" : [ | ||
75 | + { | ||
76 | + pt : "barras horizontais", | ||
77 | + en : "", | ||
78 | + es : "" | ||
79 | + } | ||
80 | + ], | ||
81 | + "configgr" : [ | ||
82 | + { | ||
83 | + pt : "Configuração do gráfico", | ||
84 | + en : "", | ||
85 | + es : "" | ||
86 | + } | ||
87 | + ], | ||
88 | + "tema" : [ | ||
89 | + { | ||
90 | + pt : "Tema", | ||
91 | + en : "", | ||
92 | + es : "" | ||
93 | + } | ||
94 | + ], | ||
95 | + "itemcx" : [ | ||
96 | + { | ||
97 | + pt : "Item com as classes ou eixo X", | ||
98 | + en : "", | ||
99 | + es : "" | ||
100 | + } | ||
101 | + ], | ||
102 | + "itemcy" : [ | ||
103 | + { | ||
104 | + pt : "Item(ns) com os valores ou eixo Y", | ||
105 | + en : "", | ||
106 | + es : "" | ||
107 | + } | ||
108 | + ], | ||
109 | + "excluirval" : [ | ||
110 | + { | ||
111 | + pt : "Excluir o seguinte valor", | ||
112 | + en : "", | ||
113 | + es : "" | ||
114 | + } | ||
115 | + ], | ||
116 | + "geracor" : [ | ||
117 | + { | ||
118 | + pt : "gera cores aleatórias", | ||
119 | + en : "", | ||
120 | + es : "" | ||
121 | + } | ||
122 | + ], | ||
123 | + "obterdados" : [ | ||
124 | + { | ||
125 | + pt : "Obter dados", | ||
126 | + en : "", | ||
127 | + es : "" | ||
128 | + } | ||
129 | + ], | ||
130 | + "seescolher" : [ | ||
131 | + { | ||
132 | + pt : "Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.", | ||
133 | + en : "", | ||
134 | + es : "" | ||
135 | + } | ||
136 | + ], | ||
137 | + "inclinax" : [ | ||
138 | + { | ||
139 | + pt : "Inclina os textos do eixo X", | ||
140 | + en : "", | ||
141 | + es : "" | ||
142 | + } | ||
143 | + ], | ||
144 | + "adlinbarras" : [ | ||
145 | + { | ||
146 | + pt : "Adiciona as linhas em gráficos de barras", | ||
147 | + en : "", | ||
148 | + es : "" | ||
149 | + } | ||
150 | + ], | ||
151 | + "utilizvalacum" : [ | ||
152 | + { | ||
153 | + pt : "Utiliza valores acumulados", | ||
154 | + en : "", | ||
155 | + titleFont : 'bold 14px sans-serif', | ||
156 | + titlePosition : "top", | ||
157 | + es : "" | ||
158 | + } | ||
159 | + ], | ||
160 | + "utilizvalrelat" : [ | ||
161 | + { | ||
162 | + pt : "Utiliza valores relativos", | ||
163 | + en : "", | ||
164 | + es : "" | ||
165 | + } | ||
166 | + ], | ||
167 | + "ordenax" : [ | ||
168 | + { | ||
169 | + pt : "Ordena o eixo X", | ||
170 | + en : "", | ||
171 | + es : "" | ||
172 | + } | ||
173 | + ], | ||
174 | + "naoprocessa" : [ | ||
175 | + { | ||
176 | + pt : "Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos", | ||
177 | + en : "", | ||
178 | + es : "" | ||
179 | + } | ||
180 | + ], | ||
181 | + "soma" : [ | ||
182 | + { | ||
183 | + pt : "Soma", | ||
184 | + en : "", | ||
185 | + es : "" | ||
186 | + } | ||
187 | + ], | ||
188 | + "media" : [ | ||
189 | + { | ||
190 | + pt : "Média", | ||
191 | + en : "", | ||
192 | + es : "" | ||
193 | + } | ||
194 | + ], | ||
195 | + "tipoagregay" : [ | ||
196 | + { | ||
197 | + pt : "Tipo de agregação dos valores do eixo Y", | ||
198 | + en : "", | ||
199 | + es : "" | ||
200 | + } | ||
201 | + ], | ||
202 | + "fatcalclarg" : [ | ||
203 | + { | ||
204 | + pt : "Fator de cálculo da largura do gráfico. O número de ocorrências será multiplicado por esse fator para calcular o tamanho final do gráfico em pixels. Deixe como 0 para usar o cálculo automático.", | ||
205 | + en : "", | ||
206 | + es : "" | ||
207 | + } | ||
208 | + ], | ||
209 | + "janelasep" : [ | ||
210 | + { | ||
211 | + pt : "abrir em uma janela separada", | ||
212 | + en : "", | ||
213 | + es : "" | ||
214 | + } | ||
215 | + ], | ||
216 | + 'selecionaTipoGrafico' : [ | ||
217 | + { | ||
218 | + pt : "Escolha um tipo de grafico", | ||
219 | + en : "", | ||
220 | + es : "" | ||
221 | + } | ||
222 | + ], | ||
223 | + 'erroTemaOrigem' : [ | ||
224 | + { | ||
225 | + pt : "erro ao ler os itens do tema de origem", | ||
226 | + en : "", | ||
227 | + es : "" | ||
228 | + } | ||
229 | + ], | ||
230 | + 'digitaTituloLegenda' : [ | ||
231 | + { | ||
232 | + pt : "Digite o título para legenda", | ||
233 | + en : "", | ||
234 | + es : "" | ||
235 | + } | ||
236 | + ], | ||
237 | + 'selecionaTema' : [ | ||
238 | + { | ||
239 | + pt : "Escolha um tema", | ||
240 | + en : "", | ||
241 | + es : "" | ||
242 | + } | ||
243 | + ], | ||
244 | + 'selecionaItemX' : [ | ||
245 | + { | ||
246 | + pt : "Escolha um item para X", | ||
247 | + en : "", | ||
248 | + es : "" | ||
249 | + } | ||
250 | + ], | ||
251 | + 'selecionaItemY' : [ | ||
252 | + { | ||
253 | + pt : "Escolha um item para Y", | ||
254 | + en : "", | ||
255 | + es : "" | ||
256 | + } | ||
257 | + ], | ||
258 | + 'dadosRegiaoMostrada' : [ | ||
259 | + { | ||
260 | + pt : "Os dados utilizados referem-se apenas à região atual mostrada no mapa", | ||
261 | + en : "", | ||
262 | + es : "" | ||
263 | + } | ||
264 | + ], | ||
265 | + 'tabelaGrafico' : [ | ||
266 | + { | ||
267 | + pt : "Tabela de dados para o gráfico. Os valores podem ser editados", | ||
268 | + en : "", | ||
269 | + es : "" | ||
270 | + } | ||
271 | + ], | ||
272 | + 39 : [ | ||
273 | + { | ||
274 | + pt : "nome", | ||
275 | + en : "", | ||
276 | + es : "" | ||
277 | + } | ||
278 | + ], | ||
279 | + 40 : [ | ||
280 | + { | ||
281 | + pt : "valor", | ||
282 | + en : "", | ||
283 | + es : "" | ||
284 | + } | ||
285 | + ], | ||
286 | + 'cor' : [ | ||
287 | + { | ||
288 | + pt : "cor", | ||
289 | + en : "", | ||
290 | + es : "" | ||
291 | + } | ||
292 | + ], | ||
293 | + 'exclui' : [ | ||
294 | + { | ||
295 | + pt : "excluir", | ||
296 | + en : "", | ||
297 | + es : "" | ||
298 | + } | ||
299 | + ], | ||
300 | + 'digitaNovoNome' : [ | ||
301 | + { | ||
302 | + pt : "digite o novo nome", | ||
303 | + en : "", | ||
304 | + es : "" | ||
305 | + } | ||
306 | + ], | ||
307 | + 44 : [ | ||
308 | + { | ||
309 | + pt : "digite o novo valor", | ||
310 | + en : "", | ||
311 | + es : "" | ||
312 | + } | ||
313 | + ], | ||
314 | + 'casos' : [ | ||
315 | + { | ||
316 | + pt : "casos", | ||
317 | + en : "", | ||
318 | + es : "" | ||
319 | + } | ||
320 | + ], | ||
321 | + 'numeroCasos' : [ | ||
322 | + { | ||
323 | + pt : "n. de casos", | ||
324 | + en : "", | ||
325 | + es : "" | ||
326 | + } | ||
327 | + ], | ||
328 | + 47 : [ | ||
329 | + { | ||
330 | + pt : "Atualiza o gráfico ao navegar pelo mapa", | ||
331 | + en : "", | ||
332 | + es : "" | ||
333 | + } | ||
334 | + ], | ||
335 | + "stacked" : [ | ||
336 | + { | ||
337 | + pt : "Utiliza barras divididas entre os valores (stacked)", | ||
338 | + en : "", | ||
339 | + es : "" | ||
340 | + } | ||
341 | + ], | ||
342 | + "linhasnascols" : [ | ||
343 | + { | ||
344 | + pt : "As linhas de dados ficam nas colunas", | ||
345 | + en : "", | ||
346 | + es : "" | ||
347 | + } | ||
348 | + ], | ||
349 | + "titulo" : [ | ||
350 | + { | ||
351 | + pt : "Título", | ||
352 | + en : "", | ||
353 | + es : "" | ||
354 | + } | ||
355 | + ], | ||
356 | + "titux" : [ | ||
357 | + { | ||
358 | + pt : "Título do eixo X", | ||
359 | + en : "", | ||
360 | + es : "" | ||
361 | + } | ||
362 | + ], | ||
363 | + "tituy" : [ | ||
364 | + { | ||
365 | + pt : "Título do eixo Y", | ||
366 | + en : "", | ||
367 | + es : "" | ||
368 | + } | ||
369 | + ], | ||
370 | + "atualizaNavegacao" : [ | ||
371 | + { | ||
372 | + pt : "Atualiza ao navegar", | ||
373 | + en : "", | ||
374 | + es : "" | ||
375 | + } | ||
376 | + ], | ||
377 | + "idDoGrafico" : [ | ||
378 | + { | ||
379 | + pt : "ID do gráfico", | ||
380 | + en : "", | ||
381 | + es : "" | ||
382 | + } | ||
383 | + ], | ||
384 | + "compor" : [ | ||
385 | + { | ||
386 | + pt : "Compor", | ||
387 | + en : "", | ||
388 | + es : "", | ||
389 | + it : "" | ||
390 | + } | ||
391 | + ], | ||
392 | + "escolherGrafico" : [ | ||
393 | + { | ||
394 | + pt : "Escolha as janelas que contém os gráficos que serão compostos com o atual:", | ||
395 | + en : "", | ||
396 | + es : "", | ||
397 | + it : "" | ||
398 | + } | ||
399 | + ], | ||
400 | + "GrComposicao" : [ | ||
401 | + { | ||
402 | + pt : "Lista com os gráficos sobrepostos na atual composição:", | ||
403 | + en : "", | ||
404 | + es : "", | ||
405 | + it : "" | ||
406 | + } | ||
407 | + ] | ||
408 | + }; |
ferramentas/graficointerativo1/index.js
@@ -117,7 +117,7 @@ i3GEOF.graficointerativo1 = | @@ -117,7 +117,7 @@ i3GEOF.graficointerativo1 = | ||
117 | * Default: {false} | 117 | * Default: {false} |
118 | */ | 118 | */ |
119 | dadospuros : false, | 119 | dadospuros : false, |
120 | - w: "450px", | 120 | + w: "460px", |
121 | h: "400px", | 121 | h: "400px", |
122 | /** | 122 | /** |
123 | * Configura o grafico conforme um objeto contendo parametros e opcionalmente os dados Alguns parametros possuem definicoes padrao, | 123 | * Configura o grafico conforme um objeto contendo parametros e opcionalmente os dados Alguns parametros possuem definicoes padrao, |
@@ -185,6 +185,10 @@ i3GEOF.graficointerativo1 = | @@ -185,6 +185,10 @@ i3GEOF.graficointerativo1 = | ||
185 | if (!parametros.tipo || parametros.tipo == undefined) { | 185 | if (!parametros.tipo || parametros.tipo == undefined) { |
186 | i3GEOF.graficointerativo1.propJanelas[idjanela].tipo = i3GEOF.graficointerativo1.tipo; | 186 | i3GEOF.graficointerativo1.propJanelas[idjanela].tipo = i3GEOF.graficointerativo1.tipo; |
187 | } | 187 | } |
188 | + //comp guarda a lista de diferentes graficos que formam composicoes | ||
189 | + if (!parametros.comp || parametros.comp == undefined) { | ||
190 | + i3GEOF.graficointerativo1.propJanelas[idjanela].comp = []; | ||
191 | + } | ||
188 | return idjanela; | 192 | return idjanela; |
189 | }, | 193 | }, |
190 | /** | 194 | /** |
@@ -428,7 +432,7 @@ i3GEOF.graficointerativo1 = | @@ -428,7 +432,7 @@ i3GEOF.graficointerativo1 = | ||
428 | t.style.position = "relative"; | 432 | t.style.position = "relative"; |
429 | t.style.top = "-5px"; | 433 | t.style.top = "-5px"; |
430 | t.visibility = "visible"; | 434 | t.visibility = "visible"; |
431 | - i3GEOF.graficointerativo1.tabela2dados(idjanela); | 435 | + i3GEOF.graficointerativo1.tabela2grafico(idjanela); |
432 | }; | 436 | }; |
433 | $i(idjanela + "i3GEOgraficointerativo1guia5").onclick = | 437 | $i(idjanela + "i3GEOgraficointerativo1guia5").onclick = |
434 | function() { | 438 | function() { |
@@ -466,6 +470,12 @@ i3GEOF.graficointerativo1 = | @@ -466,6 +470,12 @@ i3GEOF.graficointerativo1 = | ||
466 | form.action = form.action + "?" + "w=" + w + "&h=" + h; | 470 | form.action = form.action + "?" + "w=" + w + "&h=" + h; |
467 | form.submit(); | 471 | form.submit(); |
468 | }; | 472 | }; |
473 | + $i(idjanela + "i3GEOgraficointerativo1guia7").onclick = | ||
474 | + function() { | ||
475 | + i3GEOF.graficointerativo1.composicao.html(idjanela); | ||
476 | + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia7", idjanela + "i3GEOgraficointerativo1guia"); | ||
477 | + }; | ||
478 | + | ||
469 | i3GEOF.graficointerativo1.ativaFoco(idjanela); | 479 | i3GEOF.graficointerativo1.ativaFoco(idjanela); |
470 | i3GEOF.graficointerativo1.comboTemas(idjanela); | 480 | i3GEOF.graficointerativo1.comboTemas(idjanela); |
471 | b = new YAHOO.widget.Button(idjanela + "i3GEOgraficointerativo1botao1", { | 481 | b = new YAHOO.widget.Button(idjanela + "i3GEOgraficointerativo1botao1", { |
@@ -551,7 +561,7 @@ i3GEOF.graficointerativo1 = | @@ -551,7 +561,7 @@ i3GEOF.graficointerativo1 = | ||
551 | mudaTamanhoGrafico = function() { | 561 | mudaTamanhoGrafico = function() { |
552 | var t = $i(idjanela + "i3GEOgraficointerativo1Grafico"); | 562 | var t = $i(idjanela + "i3GEOgraficointerativo1Grafico"); |
553 | if (t.style.display === "block") { | 563 | if (t.style.display === "block") { |
554 | - i3GEOF.graficointerativo1.tabela2dados(idjanela); | 564 | + i3GEOF.graficointerativo1.tabela2grafico(idjanela); |
555 | } | 565 | } |
556 | }; | 566 | }; |
557 | duplica = function() { | 567 | duplica = function() { |
@@ -865,6 +875,8 @@ i3GEOF.graficointerativo1 = | @@ -865,6 +875,8 @@ i3GEOF.graficointerativo1 = | ||
865 | * | 875 | * |
866 | * <GRAFICOSELECAO> | 876 | * <GRAFICOSELECAO> |
867 | */ | 877 | */ |
878 | + contadorDados: 0, | ||
879 | + janelasEsperando: [], | ||
868 | obterDados : function(idjanela) { | 880 | obterDados : function(idjanela) { |
869 | if (!i3GEO.Interface) { | 881 | if (!i3GEO.Interface) { |
870 | return; | 882 | return; |
@@ -880,6 +892,7 @@ i3GEOF.graficointerativo1 = | @@ -880,6 +892,7 @@ i3GEOF.graficointerativo1 = | ||
880 | } else { | 892 | } else { |
881 | tema = tema.value; | 893 | tema = tema.value; |
882 | } | 894 | } |
895 | + i3GEOF.graficointerativo1.contadorDados++; | ||
883 | excluir = $i(idjanela + "i3GEOgraficointerativo1excluir").value; | 896 | excluir = $i(idjanela + "i3GEOgraficointerativo1excluir").value; |
884 | cp = new cpaint(); | 897 | cp = new cpaint(); |
885 | tipo = $i(idjanela + "i3GEOgraficointerativo1TipoAgregacao").value; | 898 | tipo = $i(idjanela + "i3GEOgraficointerativo1TipoAgregacao").value; |
@@ -936,9 +949,19 @@ i3GEOF.graficointerativo1 = | @@ -936,9 +949,19 @@ i3GEOF.graficointerativo1 = | ||
936 | return; | 949 | return; |
937 | } | 950 | } |
938 | monta = function(retorno) { | 951 | monta = function(retorno) { |
952 | + //o contador e utilizado para disparar processos apenas quando todas as operacoes tiverem terminado | ||
953 | + i3GEOF.graficointerativo1.contadorDados--; | ||
939 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden"; | 954 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden"; |
940 | i3GEOF.graficointerativo1.montaTabelaDados(idjanela, retorno); | 955 | i3GEOF.graficointerativo1.montaTabelaDados(idjanela, retorno); |
941 | - $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call(); | 956 | + i3GEOF.graficointerativo1.janelasEsperando.push(idjanela); |
957 | + if(i3GEOF.graficointerativo1.contadorDados === 0){ | ||
958 | + var n = i3GEOF.graficointerativo1.janelasEsperando.length, | ||
959 | + i; | ||
960 | + for(i=0;i<n;i++){ | ||
961 | + $i(i3GEOF.graficointerativo1.janelasEsperando[i] + "i3GEOgraficointerativo1guia4").onclick.call(); | ||
962 | + } | ||
963 | + i3GEOF.graficointerativo1.janelasEsperando = []; | ||
964 | + } | ||
942 | }; | 965 | }; |
943 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible"; | 966 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible"; |
944 | cp.set_response_type("JSON"); | 967 | cp.set_response_type("JSON"); |
@@ -1078,24 +1101,22 @@ i3GEOF.graficointerativo1 = | @@ -1078,24 +1101,22 @@ i3GEOF.graficointerativo1 = | ||
1078 | } | 1101 | } |
1079 | return csv; | 1102 | return csv; |
1080 | }, | 1103 | }, |
1081 | - /** | ||
1082 | - * Function: tabela2dados | ||
1083 | - * | ||
1084 | - * Obtém os dados da tabela para compor o gráfico | ||
1085 | - */ | ||
1086 | - tabela2dados : function(idjanela) { | 1104 | + tabela2grafico: function(idjanela){ |
1087 | if (i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility === "visible") { | 1105 | if (i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility === "visible") { |
1088 | return; | 1106 | return; |
1089 | } | 1107 | } |
1090 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible"; | 1108 | i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible"; |
1091 | - var colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela), ncolunas = colunas[0].length, temp = 0, ultimo = 0, inputs = | ||
1092 | - $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("input"), ninputs = inputs.length, tipoColuna = "String", metadados = | ||
1093 | - [], i, j, acumulado = [], acum, cores = [], par = [], total = 0, menor = 0, maior = 0, legendaX = "", legendaY = "", dados = | ||
1094 | - {}, xInclinado = $i(idjanela + "i3GEOgraficointerativo1xInclinado").checked; | ||
1095 | 1109 | ||
1096 | - if (ninputs > 0) { | ||
1097 | - menor = inputs[1].value * 1; | ||
1098 | - } | 1110 | + var titulo = "", |
1111 | + menor = 0, | ||
1112 | + legendaX = "", | ||
1113 | + legendaY = "", | ||
1114 | + dados = {}, | ||
1115 | + xInclinado = false; | ||
1116 | + | ||
1117 | + var dados = i3GEOF.graficointerativo1.tabela2dados(idjanela); | ||
1118 | + | ||
1119 | + xInclinado = $i(idjanela + "i3GEOgraficointerativo1xInclinado").checked; | ||
1099 | if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) { | 1120 | if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) { |
1100 | titulo = | 1121 | titulo = |
1101 | $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options[$i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text; | 1122 | $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options[$i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text; |
@@ -1109,6 +1130,71 @@ i3GEOF.graficointerativo1 = | @@ -1109,6 +1130,71 @@ i3GEOF.graficointerativo1 = | ||
1109 | if ($i(idjanela + "i3GEOgraficointerativo1ComboYid")) { | 1130 | if ($i(idjanela + "i3GEOgraficointerativo1ComboYid")) { |
1110 | legendaY = $i(idjanela + "i3GEOgraficointerativo1ComboYidTitulo").value; | 1131 | legendaY = $i(idjanela + "i3GEOgraficointerativo1ComboYidTitulo").value; |
1111 | } | 1132 | } |
1133 | + | ||
1134 | + if (legendaX == legendaY && (legendaX != "" && legendaY != "")) { | ||
1135 | + menor = 0; | ||
1136 | + legendaX += " (" + $trad('casos', i3GEOF.graficointerativo1.dicionario) + ")"; | ||
1137 | + legendaY += " (" + $trad('numeroCasos', i3GEOF.graficointerativo1.dicionario) + ")"; | ||
1138 | + } | ||
1139 | + | ||
1140 | + switch (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo) { | ||
1141 | + case "bar_1": | ||
1142 | + legendaX = ""; | ||
1143 | + i3GEOF.graficointerativo1.barras(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX, xInclinado, "vertical"); | ||
1144 | + break; | ||
1145 | + case "bar_2": | ||
1146 | + legendaX = ""; | ||
1147 | + i3GEOF.graficointerativo1.barras(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX, xInclinado, "horizontal"); | ||
1148 | + break; | ||
1149 | + case "linha_1": | ||
1150 | + legendaX = ""; | ||
1151 | + i3GEOF.graficointerativo1.linhas(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX, xInclinado); | ||
1152 | + break; | ||
1153 | + case "pizza_1": | ||
1154 | + legendaX = ""; | ||
1155 | + i3GEOF.graficointerativo1.pizzas(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX); | ||
1156 | + break; | ||
1157 | + case "ponto_1": | ||
1158 | + i3GEOF.graficointerativo1.pontos(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX); | ||
1159 | + break; | ||
1160 | + case "area_1": | ||
1161 | + legendaX = ""; | ||
1162 | + i3GEOF.graficointerativo1.areas(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX, xInclinado); | ||
1163 | + break; | ||
1164 | + case "arvore_1": | ||
1165 | + i3GEOF.graficointerativo1.arvores(idjanela, dados["dados"], dados["maior"], dados["cores"], legendaY, legendaX); | ||
1166 | + break; | ||
1167 | + default: | ||
1168 | + // alert($trad("escolhatipo", i3GEOF.graficointerativo1.dicionario)); | ||
1169 | + } | ||
1170 | + }, | ||
1171 | + /** | ||
1172 | + * Function: tabela2dados | ||
1173 | + * | ||
1174 | + * Obtém os dados da tabela para compor o gráfico | ||
1175 | + */ | ||
1176 | + tabela2dados : function(idjanela) { | ||
1177 | + var colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela), | ||
1178 | + ncolunas = colunas[0].length, | ||
1179 | + temp = 0, | ||
1180 | + ultimo = 0, | ||
1181 | + inputs = $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("input"), | ||
1182 | + ninputs = inputs.length, | ||
1183 | + tipoColuna = "String", | ||
1184 | + metadados = [], | ||
1185 | + i, | ||
1186 | + j, | ||
1187 | + acumulado = [], | ||
1188 | + acum, | ||
1189 | + cores = [], | ||
1190 | + par = [], | ||
1191 | + total = 0, | ||
1192 | + menor = 0, | ||
1193 | + maior = 0, | ||
1194 | + dados = {}; | ||
1195 | + if (ninputs > 0) { | ||
1196 | + menor = inputs[1].value * 1; | ||
1197 | + } | ||
1112 | if (ncolunas === 2) { | 1198 | if (ncolunas === 2) { |
1113 | for (i = 0; i < ninputs; i = i + 3) { | 1199 | for (i = 0; i < ninputs; i = i + 3) { |
1114 | temp = inputs[i + 1].value * 1; | 1200 | temp = inputs[i + 1].value * 1; |
@@ -1152,11 +1238,6 @@ i3GEOF.graficointerativo1 = | @@ -1152,11 +1238,6 @@ i3GEOF.graficointerativo1 = | ||
1152 | } | 1238 | } |
1153 | cores = colunas[2]; | 1239 | cores = colunas[2]; |
1154 | } | 1240 | } |
1155 | - if (legendaX == legendaY && (legendaX != "" && legendaY != "")) { | ||
1156 | - menor = 0; | ||
1157 | - legendaX += " (" + $trad('casos', i3GEOF.graficointerativo1.dicionario) + ")"; | ||
1158 | - legendaY += " (" + $trad('numeroCasos', i3GEOF.graficointerativo1.dicionario) + ")"; | ||
1159 | - } | ||
1160 | 1241 | ||
1161 | for (j = 0; j < ncolunas; j++) { | 1242 | for (j = 0; j < ncolunas; j++) { |
1162 | metadados.push({ | 1243 | metadados.push({ |
@@ -1170,36 +1251,12 @@ i3GEOF.graficointerativo1 = | @@ -1170,36 +1251,12 @@ i3GEOF.graficointerativo1 = | ||
1170 | "resultset" : par, | 1251 | "resultset" : par, |
1171 | "metadata" : metadados | 1252 | "metadata" : metadados |
1172 | }; | 1253 | }; |
1173 | - switch (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo) { | ||
1174 | - case "bar_1": | ||
1175 | - legendaX = ""; | ||
1176 | - i3GEOF.graficointerativo1.barras(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, "vertical"); | ||
1177 | - break; | ||
1178 | - case "bar_2": | ||
1179 | - legendaX = ""; | ||
1180 | - i3GEOF.graficointerativo1.barras(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, "horizontal"); | ||
1181 | - break; | ||
1182 | - case "linha_1": | ||
1183 | - legendaX = ""; | ||
1184 | - i3GEOF.graficointerativo1.linhas(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado); | ||
1185 | - break; | ||
1186 | - case "pizza_1": | ||
1187 | - legendaX = ""; | ||
1188 | - i3GEOF.graficointerativo1.pizzas(idjanela, dados, maior, cores, legendaY, legendaX); | ||
1189 | - break; | ||
1190 | - case "ponto_1": | ||
1191 | - i3GEOF.graficointerativo1.pontos(idjanela, dados, maior, cores, legendaY, legendaX); | ||
1192 | - break; | ||
1193 | - case "area_1": | ||
1194 | - legendaX = ""; | ||
1195 | - i3GEOF.graficointerativo1.areas(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado); | ||
1196 | - break; | ||
1197 | - case "arvore_1": | ||
1198 | - i3GEOF.graficointerativo1.arvores(idjanela, dados, maior, cores, legendaY, legendaX); | ||
1199 | - break; | ||
1200 | - default: | ||
1201 | - // alert($trad("escolhatipo", i3GEOF.graficointerativo1.dicionario)); | ||
1202 | - } | 1254 | + return { |
1255 | + "dados": dados, | ||
1256 | + "cores": cores, | ||
1257 | + "menor": menor, | ||
1258 | + "maior": maior | ||
1259 | + }; | ||
1203 | }, | 1260 | }, |
1204 | /** | 1261 | /** |
1205 | * Function: excluilinha | 1262 | * Function: excluilinha |
@@ -1337,7 +1394,7 @@ i3GEOF.graficointerativo1 = | @@ -1337,7 +1394,7 @@ i3GEOF.graficointerativo1 = | ||
1337 | return config; | 1394 | return config; |
1338 | }, | 1395 | }, |
1339 | barras : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) { | 1396 | barras : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) { |
1340 | - var ct = true, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX); | 1397 | + var contador = 0, ct = true, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX); |
1341 | if (tipo === "horizontal") { | 1398 | if (tipo === "horizontal") { |
1342 | config.orientation = 'horizontal'; | 1399 | config.orientation = 'horizontal'; |
1343 | } | 1400 | } |
@@ -1346,18 +1403,24 @@ i3GEOF.graficointerativo1 = | @@ -1346,18 +1403,24 @@ i3GEOF.graficointerativo1 = | ||
1346 | config.extensionPoints.xAxisLabel_textBaseline = 'top'; | 1403 | config.extensionPoints.xAxisLabel_textBaseline = 'top'; |
1347 | config.extensionPoints.xAxisLabel_textAlign = 'right'; | 1404 | config.extensionPoints.xAxisLabel_textAlign = 'right'; |
1348 | } | 1405 | } |
1406 | + config.colors = cores; | ||
1407 | + // | ||
1408 | + //pega os parametros de graficos que fazem composicao com este | ||
1409 | + // | ||
1410 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1411 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1412 | + | ||
1349 | if (dados.resultset && dados.resultset[0] && dados.resultset[0].length > 2) { | 1413 | if (dados.resultset && dados.resultset[0] && dados.resultset[0].length > 2) { |
1350 | config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked; | 1414 | config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked; |
1351 | config.legend = true; | 1415 | config.legend = true; |
1352 | ct = true; | 1416 | ct = true; |
1353 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; | 1417 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; |
1354 | - config.colors = cores; | ||
1355 | - } else { | ||
1356 | - if (cores != "") { | ||
1357 | - config.extensionPoints.bar_fillStyle = function(d) { | ||
1358 | - return cores[this.index]; | ||
1359 | - }; | ||
1360 | - } | 1418 | + |
1419 | + } | ||
1420 | + else if (cores != "") { | ||
1421 | + config.extensionPoints.bar_fillStyle = function(d) { | ||
1422 | + return config.colors[this.index]; | ||
1423 | + }; | ||
1361 | } | 1424 | } |
1362 | new pvc.BarChart(config).setData(dados, { | 1425 | new pvc.BarChart(config).setData(dados, { |
1363 | crosstabMode : ct, | 1426 | crosstabMode : ct, |
@@ -1384,6 +1447,12 @@ i3GEOF.graficointerativo1 = | @@ -1384,6 +1447,12 @@ i3GEOF.graficointerativo1 = | ||
1384 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; | 1447 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; |
1385 | config.colors = cores; | 1448 | config.colors = cores; |
1386 | } | 1449 | } |
1450 | + // | ||
1451 | + //pega os parametros de graficos que fazem composicao com este | ||
1452 | + // | ||
1453 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1454 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1455 | + | ||
1387 | new pvc.LineChart(config).setData(dados, { | 1456 | new pvc.LineChart(config).setData(dados, { |
1388 | crosstabMode : ct, | 1457 | crosstabMode : ct, |
1389 | seriesInRows : sr | 1458 | seriesInRows : sr |
@@ -1410,6 +1479,12 @@ i3GEOF.graficointerativo1 = | @@ -1410,6 +1479,12 @@ i3GEOF.graficointerativo1 = | ||
1410 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; | 1479 | sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked; |
1411 | config.colors = cores; | 1480 | config.colors = cores; |
1412 | } | 1481 | } |
1482 | + // | ||
1483 | + //pega os parametros de graficos que fazem composicao com este | ||
1484 | + // | ||
1485 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1486 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1487 | + | ||
1413 | new pvc.LineChart(config).setData(dados, { | 1488 | new pvc.LineChart(config).setData(dados, { |
1414 | crosstabMode : ct, | 1489 | crosstabMode : ct, |
1415 | seriesInRows : sr | 1490 | seriesInRows : sr |
@@ -1439,6 +1514,12 @@ i3GEOF.graficointerativo1 = | @@ -1439,6 +1514,12 @@ i3GEOF.graficointerativo1 = | ||
1439 | if (cores != "") { | 1514 | if (cores != "") { |
1440 | config.colors = cores; | 1515 | config.colors = cores; |
1441 | } | 1516 | } |
1517 | + // | ||
1518 | + //pega os parametros de graficos que fazem composicao com este | ||
1519 | + // | ||
1520 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1521 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1522 | + | ||
1442 | new pvc.TreemapChart(config).setData(dados, { | 1523 | new pvc.TreemapChart(config).setData(dados, { |
1443 | crosstabMode : false | 1524 | crosstabMode : false |
1444 | }).render(); | 1525 | }).render(); |
@@ -1468,6 +1549,12 @@ i3GEOF.graficointerativo1 = | @@ -1468,6 +1549,12 @@ i3GEOF.graficointerativo1 = | ||
1468 | if (cores != "") { | 1549 | if (cores != "") { |
1469 | config.colors = cores; | 1550 | config.colors = cores; |
1470 | } | 1551 | } |
1552 | + // | ||
1553 | + //pega os parametros de graficos que fazem composicao com este | ||
1554 | + // | ||
1555 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1556 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1557 | + | ||
1471 | new pvc.PieChart(config).setData(dados, { | 1558 | new pvc.PieChart(config).setData(dados, { |
1472 | crosstabMode : false | 1559 | crosstabMode : false |
1473 | }).render(); | 1560 | }).render(); |
@@ -1503,6 +1590,12 @@ i3GEOF.graficointerativo1 = | @@ -1503,6 +1590,12 @@ i3GEOF.graficointerativo1 = | ||
1503 | if (cores != "") { | 1590 | if (cores != "") { |
1504 | config.colors = cores; | 1591 | config.colors = cores; |
1505 | } | 1592 | } |
1593 | + // | ||
1594 | + //pega os parametros de graficos que fazem composicao com este | ||
1595 | + // | ||
1596 | + dados = i3GEOF.graficointerativo1.composicao.incluiDados(idjanela,dados); | ||
1597 | + config = i3GEOF.graficointerativo1.composicao.incluiConfig(idjanela,config); | ||
1598 | + | ||
1506 | new pvc.DotChart(config).setData(dados, { | 1599 | new pvc.DotChart(config).setData(dados, { |
1507 | crosstabMode : false | 1600 | crosstabMode : false |
1508 | }).render(); | 1601 | }).render(); |
@@ -1511,7 +1604,11 @@ i3GEOF.graficointerativo1 = | @@ -1511,7 +1604,11 @@ i3GEOF.graficointerativo1 = | ||
1511 | $i(idjanela).style.visibility = "visible"; | 1604 | $i(idjanela).style.visibility = "visible"; |
1512 | } | 1605 | } |
1513 | }, | 1606 | }, |
1514 | - sobreposicao: { | 1607 | + /** |
1608 | + * Gerencia a sobreposicao de graficos em um unico | ||
1609 | + * i3GEOF.graficointerativo1.propJanelas[idjanela].comp | ||
1610 | + */ | ||
1611 | + composicao: { | ||
1515 | /** | 1612 | /** |
1516 | * Parametros do grafico sobreposto | 1613 | * Parametros do grafico sobreposto |
1517 | * E armazenado quando a janela sobreposta e fechada | 1614 | * E armazenado quando a janela sobreposta e fechada |
@@ -1523,40 +1620,160 @@ i3GEOF.graficointerativo1 = | @@ -1523,40 +1620,160 @@ i3GEOF.graficointerativo1 = | ||
1523 | * "s" e o codigo da janela do grafico sobreposto | 1620 | * "s" e o codigo da janela do grafico sobreposto |
1524 | */ | 1621 | */ |
1525 | remove: function(idjanela,s){ | 1622 | remove: function(idjanela,s){ |
1526 | - | 1623 | + var c = i3GEOF.graficointerativo1.propJanelas[idjanela].comp; |
1624 | + c.remove(s); | ||
1625 | + i3GEOF.graficointerativo1.composicao.listaComp(idjanela); | ||
1527 | }, | 1626 | }, |
1528 | /** | 1627 | /** |
1529 | * Adiciona ao grafico uma nova sobreposicao | 1628 | * Adiciona ao grafico uma nova sobreposicao |
1530 | */ | 1629 | */ |
1531 | adiciona: function(idjanela,s){ | 1630 | adiciona: function(idjanela,s){ |
1532 | - | 1631 | + if(s === ""){ |
1632 | + return; | ||
1633 | + } | ||
1634 | + var c = i3GEOF.graficointerativo1.propJanelas[idjanela].comp; | ||
1635 | + c.remove(s); | ||
1636 | + c.push(s); | ||
1637 | + i3GEOF.graficointerativo1.composicao.listaComp(idjanela); | ||
1533 | }, | 1638 | }, |
1534 | /** | 1639 | /** |
1535 | * HTML com o formulario para adicionar sobreposicoes | 1640 | * HTML com o formulario para adicionar sobreposicoes |
1536 | */ | 1641 | */ |
1537 | html: function(idjanela){ | 1642 | html: function(idjanela){ |
1538 | - | 1643 | + i3GEOF.graficointerativo1.composicao.combojanelas(idjanela); |
1644 | + i3GEOF.graficointerativo1.composicao.listaComp(idjanela); | ||
1539 | }, | 1645 | }, |
1540 | /** | 1646 | /** |
1541 | - * Aplica uma sobreposicao especifica a um grafico | 1647 | + * Verifica todas as sobreposicoes e as aplica ao grafico |
1648 | + * A aplicacao e feita sobre o objeto de dados antes de ser renderizado | ||
1649 | + * Verifica se a janela com o grafico esta aberta ou se devem ser usados os parametros | ||
1650 | + * guardados | ||
1542 | */ | 1651 | */ |
1543 | - aplica: function(idjanela,s,grafico){ | ||
1544 | - | 1652 | + incluiDados: function(idjanela,dados){ |
1653 | + try{ | ||
1654 | + var c = i3GEOF.graficointerativo1.propJanelas[idjanela].comp, | ||
1655 | + n = c.length, | ||
1656 | + i, | ||
1657 | + nmeta, | ||
1658 | + dadosNovos, | ||
1659 | + metaNovos, | ||
1660 | + rsNovos, | ||
1661 | + coresNovos, | ||
1662 | + rs, | ||
1663 | + nrs = [], | ||
1664 | + a = {}, | ||
1665 | + b = {}, | ||
1666 | + e = [], | ||
1667 | + d, | ||
1668 | + j, | ||
1669 | + nj; | ||
1670 | + if(n > 0){ | ||
1671 | + for(i=0;i<n;i++){ | ||
1672 | + //inclui os metadados do grafico que sera sobreposto nos metadados do grafico original | ||
1673 | + dadosNovos = i3GEOF.graficointerativo1.tabela2dados(c[i]); | ||
1674 | + metaNovos = dadosNovos.dados.metadata; | ||
1675 | + coresNovos = dadosNovos.cores; | ||
1676 | + nmeta = dados.metadata.length; | ||
1677 | + nj = metaNovos.length; | ||
1678 | + for(j = 0;j<nj;j++){ | ||
1679 | + nmeta++; | ||
1680 | + dados.metadata.push({ | ||
1681 | + "colIndex" : nmeta, | ||
1682 | + "colType" : metaNovos[j].colType, | ||
1683 | + "colName" : metaNovos[j].colName | ||
1684 | + }) | ||
1685 | + } | ||
1686 | + //adiciona os dados | ||
1687 | + rs = dados.resultset; | ||
1688 | + nj = rs.length; | ||
1689 | + //hash contendo os valores originais | ||
1690 | + for(j=0;j<nj;j++){ | ||
1691 | + a[rs[j][0]] =rs[j]; | ||
1692 | + } | ||
1693 | + rsNovos = dadosNovos.dados.resultset; | ||
1694 | + nj = rsNovos.length; | ||
1695 | + //hash contendo os valores novos | ||
1696 | + for(j=0;j<nj;j++){ | ||
1697 | + b[rsNovos[j][0]] =rsNovos[j]; | ||
1698 | + } | ||
1699 | + //busca nos valores novos os dados com base na chave do hash original | ||
1700 | + for(d in a){ | ||
1701 | + a[d].push(b[d][1]); | ||
1702 | + e.push(a[d]); | ||
1703 | + } | ||
1704 | + dados.resultset = e; | ||
1705 | + } | ||
1706 | + } | ||
1707 | + return dados; | ||
1708 | + } | ||
1709 | + catch(e){ | ||
1710 | + return dados; | ||
1711 | + } | ||
1545 | }, | 1712 | }, |
1546 | /** | 1713 | /** |
1547 | * Verifica todas as sobreposicoes e as aplica ao grafico | 1714 | * Verifica todas as sobreposicoes e as aplica ao grafico |
1548 | - * A aplicacao e feita sobre o objeto grafico antes de ser renderizado | 1715 | + * A aplicacao e feita sobre o objeto de configuracao antes de ser renderizado |
1549 | * Verifica se a janela com o grafico esta aberta ou se devem ser usados os parametros | 1716 | * Verifica se a janela com o grafico esta aberta ou se devem ser usados os parametros |
1550 | * guardados | 1717 | * guardados |
1551 | */ | 1718 | */ |
1552 | - restaura: function(idjanela,grafico){ | ||
1553 | - | 1719 | + incluiConfig: function(idjanela,config){ |
1720 | + try{ | ||
1721 | + var c = i3GEOF.graficointerativo1.propJanelas[idjanela].comp, | ||
1722 | + n = c.length, | ||
1723 | + i, | ||
1724 | + nj, | ||
1725 | + j, | ||
1726 | + ncores = []; | ||
1727 | + if(n > 0){ | ||
1728 | + for(i=0;i<n;i++){ | ||
1729 | + //pega as cores | ||
1730 | + dadosNovos = i3GEOF.graficointerativo1.tabela2dados(c[i]); | ||
1731 | + coresNovos = dadosNovos.cores; | ||
1732 | + nj = coresNovos.length; | ||
1733 | + for(j=0;j<nj;j++){ | ||
1734 | + ncores.push(coresNovos[j]); | ||
1735 | + ncores.push(config.colors[j]); | ||
1736 | + } | ||
1737 | + } | ||
1738 | + config.colors = ncores; | ||
1739 | + } | ||
1740 | + return config; | ||
1741 | + } | ||
1742 | + catch(e){ | ||
1743 | + return config; | ||
1744 | + } | ||
1745 | + }, | ||
1746 | + /** | ||
1747 | + * Cria botoes para cada composicao de um grafico | ||
1748 | + */ | ||
1749 | + listaComp: function(idjanela){ | ||
1750 | + var c = i3GEOF.graficointerativo1.propJanelas[idjanela].comp, | ||
1751 | + n = c.length, | ||
1752 | + ins = "", | ||
1753 | + i; | ||
1754 | + for( i = 0; i < n; i++){ | ||
1755 | + ins += "<div class='i3geoForm150 i3geoFormSemIcone' style='float: left; margin-left: 5px; margin-top: 5px;' onclick='i3GEOF.graficointerativo1.composicao.remove(\"" + idjanela + "\",\"" + c[i] + "\")'>" | ||
1756 | + + "<input type=text value='" + c[i] + "' /> X" | ||
1757 | + + "</div>"; | ||
1758 | + } | ||
1759 | + $i(idjanela + "Composicoes").innerHTML = ins; | ||
1554 | }, | 1760 | }, |
1555 | /** | 1761 | /** |
1556 | * Lista as janelas de graficos abertas | 1762 | * Lista as janelas de graficos abertas |
1557 | */ | 1763 | */ |
1558 | combojanelas: function(idjanela){ | 1764 | combojanelas: function(idjanela){ |
1765 | + var n = i3GEOF.graficointerativo1.janelas.length, | ||
1766 | + ins = "", | ||
1767 | + i; | ||
1768 | + ins += "<select onchange='i3GEOF.graficointerativo1.composicao.adiciona(\"" + idjanela + "\",this.value)'>" | ||
1769 | + + "<option value=''>---</option>"; | ||
1559 | 1770 | ||
1771 | + for(i = 0; i < n; i++){ | ||
1772 | + if(i3GEOF.graficointerativo1.janelas[i] != idjanela) | ||
1773 | + ins += "<option>" + i3GEOF.graficointerativo1.janelas[i] + "</option>"; | ||
1774 | + } | ||
1775 | + ins += "</select>"; | ||
1776 | + $i(idjanela + "ComboJanelasGr").innerHTML = ins; | ||
1560 | }, | 1777 | }, |
1561 | /** | 1778 | /** |
1562 | * Verifica se o grafico dessa janela tem sobreposicao | 1779 | * Verifica se o grafico dessa janela tem sobreposicao |
ferramentas/graficointerativo1/template_mst.html
@@ -43,6 +43,13 @@ | @@ -43,6 +43,13 @@ | ||
43 | </a> | 43 | </a> |
44 | </div> | 44 | </div> |
45 | </li> | 45 | </li> |
46 | + <li> | ||
47 | + <div id='{{{idjanela}}}i3GEOgraficointerativo1guia7' style='text-align: center; left: 0px;'> | ||
48 | + <a> | ||
49 | + <em>{{{compor}}}</em> | ||
50 | + </a> | ||
51 | + </div> | ||
52 | + </li> | ||
46 | </ul> | 53 | </ul> |
47 | </div> | 54 | </div> |
48 | <br> | 55 | <br> |
@@ -167,7 +174,9 @@ | @@ -167,7 +174,9 @@ | ||
167 | <p class='paragrafo'>{{{itemcy}}} :</p> | 174 | <p class='paragrafo'>{{{itemcy}}} :</p> |
168 | <div class='paragrafo' id='{{{idjanela}}}i3GEOgraficointerativo1ComboY'></div> | 175 | <div class='paragrafo' id='{{{idjanela}}}i3GEOgraficointerativo1ComboY'></div> |
169 | </div> | 176 | </div> |
170 | - <br><br><p class='paragrafo'>{{{excluirval}}} : | 177 | + <br> |
178 | + <br> | ||
179 | + <p class='paragrafo'>{{{excluirval}}} : | ||
171 | <div class='styled-select'> | 180 | <div class='styled-select'> |
172 | <input style='cursor: pointer;' value='' type='text' id='{{{idjanela}}}i3GEOgraficointerativo1excluir' /> | 181 | <input style='cursor: pointer;' value='' type='text' id='{{{idjanela}}}i3GEOgraficointerativo1excluir' /> |
173 | </div> | 182 | </div> |
@@ -244,5 +253,14 @@ | @@ -244,5 +253,14 @@ | ||
244 | <input type=hidden name='svg' value='' /> | 253 | <input type=hidden name='svg' value='' /> |
245 | </form> | 254 | </form> |
246 | </div> | 255 | </div> |
256 | +<!-- Compor sobreposicoes --> | ||
257 | +<div class='guiaobj' id='{{{idjanela}}}i3GEOgraficointerativo1guia7obj' style='left: 1px; display: none; top: -5px'> | ||
258 | + <p class='paragrafo'>{{{escolherGrafico}}}</p> | ||
259 | + <div class='styled-select' id='{{{idjanela}}}ComboJanelasGr'></div> | ||
260 | + <br> | ||
261 | + <p class='paragrafo'>{{{GrComposicao}}}</p> | ||
262 | + <div id='{{{idjanela}}}Composicoes'></div> | ||
263 | +</div> | ||
264 | + | ||
247 | <!-- Div usado para renderizar o grafico --> | 265 | <!-- Div usado para renderizar o grafico --> |
248 | <div id='{{{idjanela}}}i3GEOgraficointerativo1Grafico' style='position: relative; top: -5px; display: none'></div> | 266 | <div id='{{{idjanela}}}i3GEOgraficointerativo1Grafico' style='position: relative; top: -5px; display: none'></div> |