Index: arms/js/analysisCost.js
===================================================================
diff -u -rfdb07c3f6e55d89b1d6a259f7bbaa6a9070e64d5 -r6e904db4ab87722df8a805f94e4a56b0e59a059a
--- arms/js/analysisCost.js (.../analysisCost.js) (revision fdb07c3f6e55d89b1d6a259f7bbaa6a9070e64d5)
+++ arms/js/analysisCost.js (.../analysisCost.js) (revision 6e904db4ab87722df8a805f94e4a56b0e59a059a)
@@ -205,9 +205,9 @@
.setBaseUrl('/auth-user/api/arms/analysis/cost/product-accumulate-cost-by-month')
.addQueryParam('pdServiceLink', selectedPdServiceId)
.addQueryParam('pdServiceVersionLinks', selectedVersionId)
- .addQueryParam("isReqType", "ISSUE")
- .addQueryParam('메인그룹필드', "parentReqKey")
- .addQueryParam('하위그룹필드들', "assignee.assignee_accountId.keyword")
+ // .addQueryParam("isReqType", "ISSUE")
+ .addQueryParam('메인그룹필드', "assignee.assignee_accountId.keyword")
+ .addQueryParam('하위그룹필드들', "key")
.build();
$.ajax({
@@ -218,15 +218,19 @@
progress: true,
statusCode: {
200: function(apiResponse) {
- var response = apiResponse.response;
- console.log(" [ analysisCost :: chart1 ] :: response data -> " + JSON.stringify(response));
- var maxCost = Math.max(...Object.values(response));
+ var responseMap = apiResponse.response;
+ var line = responseMap.line;
+ var bar = responseMap.bar;
+ console.log(" [ analysisCost :: line ] :: response data -> " + JSON.stringify(line));
+ console.log(" [ analysisCost :: bar ] :: response data -> " + JSON.stringify(bar));
+ var maxCost = Math.max(...Object.values(line));
var productChartDom = document.getElementById('product-accumulate-cost-by-month');
$(productChartDom).height("500px");
var mymChart = echarts.init(productChartDom);
var option;
- var dates = Object.keys(response);
- var costs = Object.values(response);
+ var dates = Object.keys(line);
+ var lineCosts = Object.values(line);
+ var barCosts = Object.values(bar);
option = {
dataZoom: [{
type: 'slider',
@@ -236,8 +240,9 @@
tooltip: {
trigger: 'axis',
formatter: function(params) {
- var formattedCost = new Intl.NumberFormat().format(params[0].value);
- return '날짜: ' + params[0].name + '
비용: ' + formattedCost;
+ var lineTooltip = new Intl.NumberFormat().format(params[0].value);
+ var barTooltip = new Intl.NumberFormat().format(params[1].value);
+ return '날짜: ' + params[0].name + '
성과 기준선: ' + lineTooltip + '
성과: ' + barTooltip;
}
},
xAxis: {
@@ -251,12 +256,16 @@
interval: Math.floor(maxCost / 10)
},
legend: {
- data: ['성과 기준선']
+ data: ['성과 기준선', '비용']
},
series: [{
name: '성과 기준선',
- data: costs,
- type: 'line'
+ data: lineCosts,
+ type: 'line',
+ }, {
+ name: '비용',
+ data: barCosts,
+ type: 'bar',
}]
};