Index: arms/js/analysis/cost/circularPackingChart.js =================================================================== diff -u -r999e6bfde6550fba58e87708409f8aebfc7bdbe0 -r2979ca3e34c63312b3bc499a311810f151b17a18 --- arms/js/analysis/cost/circularPackingChart.js (.../circularPackingChart.js) (revision 999e6bfde6550fba58e87708409f8aebfc7bdbe0) +++ arms/js/analysis/cost/circularPackingChart.js (.../circularPackingChart.js) (revision 2979ca3e34c63312b3bc499a311810f151b17a18) @@ -52,18 +52,21 @@ req_name = source[key][0].c_req_name; source[key].forEach(item => { let project = item.c_issue_key; - let cost = 300; // 임시 설정 - subValue += cost; - seriesData.push({ - id: `${path}.${project}`, - value: cost, - depth: newDepth +2 , - index: index++, - version_id: item.c_pds_version_link, - version_name: item.c_pds_version_name, - req_id : item.c_req_link, - req_name: item.c_req_name - }); + //let cost = 300; // 임시 설정 + let cost = item.cost; + if(cost !== null){ + subValue += cost; + seriesData.push({ + id: `${path}.${project}`, + value: cost, + depth: newDepth +2 , + index: index++, + version_id: item.c_pds_version_link, + version_name: item.c_pds_version_name, + req_id : item.c_req_link, + req_name: item.c_req_name + }); + } }); if (subValue !== 0) { Index: arms/js/analysisCost.js =================================================================== diff -u -r18b13357c1e7a8d3b7a0a04d28afe68765ccd3ce -r2979ca3e34c63312b3bc499a311810f151b17a18 --- arms/js/analysisCost.js (.../analysisCost.js) (revision 18b13357c1e7a8d3b7a0a04d28afe68765ccd3ce) +++ arms/js/analysisCost.js (.../analysisCost.js) (revision 2979ca3e34c63312b3bc499a311810f151b17a18) @@ -725,6 +725,36 @@ 요구사항이포함된버전목록.forEach((버전) => { let 버전_요구사항_키목록 = 요구사항별_키목록[버전]; let 요구사항_키목록 = 버전_요구사항_키목록[요구사항.c_id]; + + var 버전별_요구사항별_단가 = + { + "35":{ + "10": 400, + "68": 500, + "70": 100, + "113": 800 + }, + "36":{ + "11": 400, + "67": 800, + "102": 0 + }, + "37":{ + "73":900, + "104":1200, + "111":2000, + "112":200 + } + }; + + var 요구사항별_단가 = 버전별_요구사항별_단가[버전]; // 요구사항 단가 맵 + if (요구사항별_단가 && 요구사항별_단가[요구사항.c_id]) { + var 단가 = 요구사항별_단가[요구사항.c_id]; + 요구사항_키목록.forEach(function(item) { + item.cost = 단가 / 요구사항_키목록.length; // 리스트 크기로 나눠 각각에 넣기 + }); + } + if (요구사항_키목록 == null) { // console.log("버전 -> " + 버전 + "\n요구사항 -> " +요구사항.c_id); } @@ -811,6 +841,36 @@ }); $("#circularPacking").height("620px"); +// var 버전별_요구사항별_단가 = +// { +// "35":{ +// "10": 400, +// "68": 500, +// "70": 100, +// "113": 800 +// }, +// "36":{ +// "11": 400, +// "67": 800, +// "102": 0 +// } +// }; +// console.log(버전별_요구사항별_단가) +// for (var pds_version_link in 요구사항별_키목록) { // 버전 순회 +// for (var req_link in 요구사항별_키목록[pds_version_link]) { // 요구사항 순회 +// var 데이터 = 요구사항별_키목록[pds_version_link][req_link]; // 요구사항 하위 이슈 키들 +// if (Array.isArray(데이터)) { +// var 요구사항별_단가 = 버전별_요구사항별_단가[pds_version_link]; // 요구사항 단가 맵 +// if (요구사항별_단가 && 요구사항별_단가[req_link]) { +// var 단가 = 요구사항별_단가[req_link]; +// 데이터.forEach(function(item) { +// item.cost = 단가 / 데이터.length; // 리스트 크기로 나눠 각각에 넣기 +// }); +// } +// } +// } +// } + drawCircularPacking("circularPacking",pdServiceName, 요구사항별_키목록); }).catch(function(error) { console.log('Error:', error);