Index: arms/js/analysisTime.js =================================================================== diff -u -r547a05b3b655e5b332ab6cda63eb2fa73d4f10af -r0c1fc8e91008f2de4b5cf5301684b9cf2293642d --- arms/js/analysisTime.js (.../analysisTime.js) (revision 547a05b3b655e5b332ab6cda63eb2fa73d4f10af) +++ arms/js/analysisTime.js (.../analysisTime.js) (revision 0c1fc8e91008f2de4b5cf5301684b9cf2293642d) @@ -916,7 +916,7 @@ always_show_tooltip: true, month_names: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sept', 'oct', 'nov', 'dec'], day_names: ['mon', 'wed', 'fri', 'sun'], - colors: data.requirementColors + //colors: data.requirementColors }); $('#calendar_yearview_blocks_chart_2').calendar_yearview_blocks({ @@ -925,7 +925,7 @@ always_show_tooltip: true, month_names: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], day_names: ['mon', 'wed', 'fri', 'sun'], - colors: data.relationIssueColors + //colors: data.relationIssueColors }); // d3.select("#heatmap-body").style("overflow-x","scroll"); Index: reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js =================================================================== diff -u -r446993425b89f8635686203c83abe98e2b472210 -r0c1fc8e91008f2de4b5cf5301684b9cf2293642d --- reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js (.../calendar_yearview_blocks.js) (revision 446993425b89f8635686203c83abe98e2b472210) +++ reference/jquery-plugins/github-calendar-heatmap/js/calendar_yearview_blocks.js (.../calendar_yearview_blocks.js) (revision 0c1fc8e91008f2de4b5cf5301684b9cf2293642d) @@ -92,10 +92,12 @@ } var items = []; + var count = 0; var legend = '', items_str = ''; if (obj_timestamp[data_date]) { if (obj_timestamp[data_date].items) { items = obj_timestamp[data_date].items; + count = obj_timestamp[data_date].count; items_str = items.join(", "); items_str = items_str.replaceAll('&', '&'); items_str = items_str.replaceAll('"', '"'); @@ -108,9 +110,10 @@ } var item_name = items[0]?items[0]:false; - var color = settings.colors[item_name]?settings.colors[item_name]:settings.colors['default']; + var color = getColorByCount(count); - item_html += ''; + item_html += ''; + /* if (items.length === 2) { // Fill a triangle for the 2nd var item_name_1 = items[1] ? items[1] : false; var color_1 = settings.colors[item_name_1] ? settings.colors[item_name_1] : settings.colors['default']; @@ -133,7 +136,7 @@ item_html += ''; item_html += ''; } - + */ // Move on to the next day start_date.setDate(start_date.getDate() + 1); } @@ -249,6 +252,32 @@ data: [] }, options); + function getColorByCount(count) { + var colors = { + 0: 'rgba(235,237,240,0.8)', // 가장 연한 색 + 1: 'rgba(155,233,168,0.8)', + 2: 'rgba(64,196,99,0.8)', + 3: 'rgba(48,161,78,0.8)', + 4: 'rgba(33,110,57,0.8)' // 가장 짙은 색 + }; + + if (count == 0) { + return colors[0]; + } + else if (count <= 5) { + return colors[1]; + } + else if (count <= 10) { + return colors[2]; + } + else if (count <= 15) { + return colors[3]; + } + else { + return colors[4]; + } + } + var _this = $(this); start();