Bläddra i källkod

모바일 메인챠트 간격조절

isna 2 år sedan
förälder
incheckning
ee5412d951
1 ändrade filer med 30 tillägg och 20 borttagningar
  1. 30 20
      src/main/webapp/mobile/js/app/main.js

+ 30 - 20
src/main/webapp/mobile/js/app/main.js

@@ -225,7 +225,9 @@ var mobMainObj = {
225 225
 					bar: { groupWidth: "50%" },
226 226
 					width: chartWidth,
227 227
 				};
228
-				var chart = new google.charts.Bar(document.getElementById('ITP_PCH_REQ_GRAPH'));
228
+				const el=document.getElementById('ITP_PCH_REQ_GRAPH');
229
+				$(el).css('margin-top','16px');
230
+				var chart = new google.charts.Bar(el);
229 231
 				// chart.draw(data, options);
230 232
 				console.log("xx draw char req xx", param, data, chart)
231 233
 				chart.draw(data, google.charts.Bar.convertOptions(options));
@@ -244,7 +246,9 @@ var mobMainObj = {
244 246
 					bar: { groupWidth: "50%" },
245 247
 					width: chartWidth,
246 248
 				};
247
-				var chart = new google.charts.Bar(document.getElementById('ITP_PCH_PODR_GRAPH'));
249
+				const el=document.getElementById('ITP_PCH_PODR_GRAPH');
250
+				$(el).css('margin-top','16px');
251
+				var chart = new google.charts.Bar(el);
248 252
 				// chart.draw(data, options);
249 253
 				chart.draw(data, google.charts.Bar.convertOptions(options));
250 254
 
@@ -263,9 +267,9 @@ var mobMainObj = {
263 267
 					bars: 'horizontal',
264 268
 					width: chartWidth,
265 269
 				};
266
-				console.log("xxxxxxxxxxx drawChartReqUp xxxxxxxxxxx")
267
-
268
-				var chart = new google.charts.Bar(document.getElementById('ITP_PCH_REQ_UP_ITEM_GRAPH'));
270
+				const el=document.getElementById('ITP_PCH_REQ_UP_ITEM_GRAPH');
271
+				$(el).css('margin-top','40px');
272
+				var chart = new google.charts.Bar(el);
269 273
 				chart.draw(data, options);
270 274
 
271 275
 			}, 'GET');
@@ -279,14 +283,14 @@ var mobMainObj = {
279 283
 				var data = google.visualization.arrayToDataTable( eval(result.chartData) );
280 284
 
281 285
 				var options = {
282
-					// title: '정산',
286
+					title: '',
283 287
 					legend: { position: 'left' },
284 288
 					width: chartWidth,
285 289
 				};
286
-				var chart = new google.visualization.PieChart(document.getElementById('ITP_STTL_GRAPH'));
287
-				console.log("xxxxxxxxxxx drawChartcore xxxxxxxxxxx", data, options )
290
+				const el=document.getElementById('ITP_STTL_GRAPH');
291
+				var chart = new google.visualization.PieChart(el);
292
+				$(el).css('margin-top','40px');
288 293
 				chart.draw(data, options);
289
-
290 294
 			}, 'GET');
291 295
 		},
292 296
 		drawLine: function() {
@@ -301,15 +305,14 @@ var mobMainObj = {
301 305
 					width: chartWidth + 100,
302 306
 					legend: { position: 'top' }
303 307
 				};
304
-
305
-				var chart = new google.visualization.LineChart(document.getElementById('ITP_SAFE_STCK_GRAPH'));
308
+				const el=document.getElementById('ITP_SAFE_STCK_GRAPH');
309
+				$(el).css('margin-top','40px');
310
+				var chart = new google.visualization.LineChart(el);
306 311
 				chart.draw(data, options);
307
-
308 312
 			}, 'GET');
309 313
 		},
310 314
 		//수주내역 그래프
311
-		drawChartOrders() {
312
-			
315
+		drawChartOrders() {			
313 316
 			const key = { brandId:fn_make_user_info.get('brandId'), 
314 317
 						spplyId:fn_make_user_info.get('spplyId'), 
315 318
 						poType: $('#ITP_FORM_MAIN_SEARCH_ORDERS_TYPE').val() };
@@ -321,7 +324,9 @@ var mobMainObj = {
321 324
 					legend: { position: 'left' },
322 325
 					width: chartWidth,
323 326
 				};	
324
-				var chart = new google.charts.Bar(document.getElementById('ITP_ORDERS_GRAPH'));
327
+				const el=document.getElementById('ITP_ORDERS_GRAPH');
328
+				$(el).css('margin-top','16px');
329
+				var chart = new google.charts.Bar(el);
325 330
 				chart.draw(data, options);
326 331
 				
327 332
 			}, 'GET');
@@ -341,7 +346,9 @@ var mobMainObj = {
341 346
 					legend: { position: 'left' },
342 347
 					width: chartWidth,
343 348
 				};	
344
-				var chart = new google.charts.Bar(document.getElementById('ITP_DELI_GRAPH'));
349
+				const el=document.getElementById('ITP_DELI_GRAPH');
350
+				$(el).css('margin-top','16px');
351
+				var chart = new google.charts.Bar(el);
345 352
 				chart.draw(data, options);
346 353
 				
347 354
 			}, 'GET');
@@ -361,11 +368,12 @@ var mobMainObj = {
361 368
 					legend: { position: 'left' },
362 369
 					width: chartWidth,
363 370
 				};	
364
-				var chart = new google.charts.Bar(document.getElementById('ITP_RELEASE_GRAPH'));
371
+				const el=document.getElementById('ITP_RELEASE_GRAPH');
372
+				$(el).css('margin-top','16px');
373
+				var chart = new google.charts.Bar(el);
365 374
 				chart.draw(data, options);
366 375
 				
367
-			}, 'GET');
368
-			
376
+			}, 'GET');			
369 377
 		},
370 378
 		//구매발주 그래프
371 379
 		drawChartPodr() {
@@ -381,7 +389,9 @@ var mobMainObj = {
381 389
 					bar: { groupWidth: "50%" },
382 390
 					width: chartWidth,
383 391
 				};	
384
-				var chart = new google.charts.Bar(document.getElementById('ITP_PCH_PODR_GRAPH'));	
392
+				const el=document.getElementById('ITP_PCH_PODR_GRAPH');
393
+				$(el).css('margin-top','16px');
394
+				var chart = new google.charts.Bar(el);	
385 395
 				// chart.draw(data, options);
386 396
 				chart.draw(data, google.charts.Bar.convertOptions(options));
387 397