Index: arms/js/analysisTime.js =================================================================== diff -u -r8fd1675d63377afdcefc03fe72ab9ecae4e4ebdb -r446993425b89f8635686203c83abe98e2b472210 --- arms/js/analysisTime.js (.../analysisTime.js) (revision 8fd1675d63377afdcefc03fe72ab9ecae4e4ebdb) +++ arms/js/analysisTime.js (.../analysisTime.js) (revision 446993425b89f8635686203c83abe98e2b472210) @@ -828,51 +828,7 @@ } }); - var chartStart = categories.reduce((earliest, date) => date < earliest ? date : earliest, categories[0]); - var chartEnd = categories.reduce((latest, date) => date > latest ? date : latest, categories[0]); - - chartStart = new Date(chartStart); - chartEnd = new Date(chartEnd); - - var deadlineSeries = []; - - if (new Date(deadline) >= chartStart && new Date(deadline) <= chartEnd) { - // 데이터 추가 - var vs = { - name: '마감일', - type: 'line', - data: [[deadline, 0], [deadline, 1]], // y축 전체에 걸쳐 라인을 그립니다. - tooltip: { - show: false // 데드라인 시리즈의 툴팁을 끕니다. - }, - markLine : { - silent: true, - symbol: 'none', - data : [{ - xAxis : deadline // x축 날짜 지정 - }], - lineStyle: { - color: 'red', - width: 2, - type: 'dashed' - }, - label: { - formatter: '마감일 : {c}', - color: 'white', - fontSize: 14, - fontWeight: 'bold' - } - }, - lineStyle: { - color: 'red', - type: 'dashed' - }, - symbol: 'none' - }; - - deadlineSeries.push(vs); - } - + var deadlineSeries = createDeadlineSeries(categories, deadline, 2); console.log(deadlineSeries); var requirementData = Object.keys(requirementDataCount).map(key => { @@ -1191,6 +1147,9 @@ let stackIndex = statusKeys.map((value, index) => index); + var deadlineSeries = createDeadlineSeries(dates, deadline, 4); + console.log(deadlineSeries); + statusKeys.push("요구사항"); statusKeys.push("연결된 이슈"); @@ -1204,7 +1163,7 @@ focus: 'series' }, symbolSize: 10, - data: totalIssues + data: totalRequirements }, { name: '연결된 이슈', @@ -1214,39 +1173,9 @@ focus: 'series' }, symbolSize: 10, - data: totalRequirements + data: totalIssues }, - { - name: '마감일', - type: 'line', - data: [[deadline, 0], [deadline, 1]], - tooltip: { - show: false - }, - markLine: { - silent: true, - symbol: 'none', - data: [{ - xAxis: deadline - }], - lineStyle: { - color: 'red', - width: 4, - type: 'dashed' - }, - label: { - formatter: '마감일 : {c}', - color: 'white', - fontSize: 14, - fontWeight: 'bold' - } - }, - lineStyle: { - color: 'red', - type: 'dashed' - }, - symbol: 'none' - } + ...deadlineSeries, ]; var legendData = statusKeys; @@ -1381,8 +1310,6 @@ // option.series.forEach(function(series) { // series.label.fontSize = fontSize; // }); - - myChart.setOption(option); }); myChart.on('mouseover', function (params) { @@ -1405,6 +1332,57 @@ }); } + +// 마감일 함수 +function createDeadlineSeries(categories, deadline, lineWidth) { + var chartStart = categories.reduce((earliest, date) => date < earliest ? date : earliest, categories[0]); + var chartEnd = categories.reduce((latest, date) => date > latest ? date : latest, categories[0]); + + chartStart = new Date(chartStart); + chartEnd = new Date(chartEnd); + + var deadlineSeries = []; + + if (new Date(deadline) >= chartStart && new Date(deadline) <= chartEnd) { + // 데이터 추가 + var vs = { + name: '마감일', + type: 'line', + data: [[deadline, 0], [deadline, 1]], // y축 전체에 걸쳐 라인을 그립니다. + tooltip: { + show: false // 데드라인 시리즈의 툴팁을 끕니다. + }, + markLine : { + silent: true, + symbol: 'none', + data : [{ + xAxis : deadline // x축 날짜 지정 + }], + lineStyle: { + color: 'red', + width: lineWidth, + type: 'dashed' + }, + label: { + formatter: '마감일 : {c}', + color: 'white', + fontSize: 14, + fontWeight: 'bold' + } + }, + lineStyle: { + color: 'red', + type: 'dashed' + }, + symbol: 'none' + }; + + deadlineSeries.push(vs); + } + + return deadlineSeries; +} + //////////////////// // 다섯번째 박스 //////////////////// Index: reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js =================================================================== diff -u -r6200e258f449c7d6aae3b651fb5510cf10cd7806 -r446993425b89f8635686203c83abe98e2b472210 --- reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js (.../calendar_yearview_blocks.js) (revision 6200e258f449c7d6aae3b651fb5510cf10cd7806) +++ reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js (.../calendar_yearview_blocks.js) (revision 446993425b89f8635686203c83abe98e2b472210) @@ -34,7 +34,6 @@ var gap = 2; var rectWidth = (containerWidth - gap * 51) / 52; // 52는 주의 개수, 간격을 고려하여 사각형의 너비를 계산 var rectHeight = rectWidth; // 7은 요일의 개수, 동적으로 조절할 수 있습니다. - console.log("containerWidth : " + containerWidth); var end_date = new Date(settings.final_date); var current_date = new Date(); @@ -162,7 +161,6 @@ for (var i = 0; i < settings.day_names.length; i++) { var dx = calculateWdayDx(i, settings.start_monday); var dy = calculateWdayDy(i, settings.start_monday, rectHeight); - console.log(dy); wday_html += '' + settings.day_names[i] + ''; } loop_html += wday_html; @@ -193,7 +191,6 @@ }; function calculateWdayDy(index, startMonday, rectHeight) { - console.log(rectHeight); return rectHeight * 2.1 * index +rectHeight; }