execution->cfdTypeList, $type) . $lang->execution->CFD;?>
+noData;?>
execution->noPrintData;?>
+diff --git a/module/execution/control.php b/module/execution/control.php index 19555b5011..1ea61762b0 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1378,12 +1378,15 @@ class execution extends control list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type); + $chartData = $this->execution->buildCFDData($executionID, $dateList, $type); + if(isset($chartData['line'])) $chartData['line'] = array_reverse($chartData['line']); + $this->view->title = $this->lang->execution->CFD; $this->view->type = $type; $this->view->execution = $execution; $this->view->executionName = $execution->name; $this->view->executionID = $executionID; - $this->view->chartData = $this->execution->buildCFDData($executionID, $dateList, $type); + $this->view->chartData = $chartData; $this->view->cycleTimeAvg = $cycleTimeAvg; $this->view->throughput = $throughput; $this->display(); @@ -1397,10 +1400,9 @@ class execution extends control * @access public * @return void */ - public function computeCFD($reload = 'no', $executionID = 0, $date = '') + public function computeCFD($reload = 'no', $executionID = 0) { - $date = date('Y-m-d', strtotime($date)); - $this->execution->computeCFD($executionID, $date); + $this->execution->computeCFD($executionID); if($reload == 'yes') return print(js::reload('parent')); } diff --git a/module/execution/js/cfd.js b/module/execution/js/cfd.js index 4753e71973..8ccc23f65c 100644 --- a/module/execution/js/cfd.js +++ b/module/execution/js/cfd.js @@ -2,30 +2,37 @@ $(function() { $('[data-toggle=tooltip]').tooltip(); - if(Object.keys(chartData).length || 1) - { - var i = 0; - var series = []; - var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF']; - //var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF']; + var i = 0; + var series = []; + var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF']; + //var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF']; + if(Object.keys(chartData).length) + { $.each(chartData['line'], function(label, set) { - series.push({ - name: label, - type: 'line', - stack: 'Total', + series.push({ + name: label, + type: 'line', + stack: 'Total', + color: colors[i], + areaStyle: { color: colors[i], - areaStyle: { - color: colors[i], - opacity: 0.2 - }, - emphasis: { - focus: 'series' - }, - data: eval(set) - }) - i ++; + opacity: 0.2 + }, + itemStyle: { + normal: { + lineStyle:{ + width:1//设置线条粗细 + } + } + }, + emphasis: { + focus: 'series' + }, + data: eval(set) + }) + i ++; }) var chartDom = document.getElementById('cfdChart'); @@ -40,10 +47,13 @@ $(function() label: { backgroundColor: '#6a7985' } + }, + textStyle: { + fontWeight: 100 } }, legend: { - data: Object.keys(chartData['line']) + data: Object.keys(chartData['line']).reverse() }, grid: { left: '3%', @@ -52,46 +62,46 @@ $(function() containLabel: true }, xAxis: [ - { + { type: 'category', boundaryGap: false, data: chartData['labels'], name: XUnit, axisLine: { - show: true, - lineStyle: - { - color: '#999', - width:1 - } + show: true, + lineStyle: + { + color: '#999', + width:1 + } } - }], + }], yAxis: [ - { + { type: 'value', minInterval: 1, name: YUnit, nameTextStyle: { - fontWeight: 'normal' + fontWeight: 'normal' }, axisPointer: { - label: - { - show: true, - precision: 0 - }, + label: + { + show: true, + precision: 0 + }, }, axisLine: { - show: true, - lineStyle: - { - color: ['#999'], - width: 1 - } + show: true, + lineStyle: + { + color: ['#999'], + width: 1 + } } } ], diff --git a/module/execution/model.php b/module/execution/model.php index 16538f0050..88a1884b80 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3006,9 +3006,9 @@ class executionModel extends model * @access public * @return array */ - public function computeCFD($executionID = 0, $date = '') + public function computeCFD($executionID = 0) { - $today = $date ? $date : helper::today(); + $today = helper::today(); $executions = $this->dao->select('id, code')->from(TABLE_EXECUTION) ->where('type')->eq('kanban') ->andWhere('status')->notin('done,closed,suspended') diff --git a/module/execution/view/cfd.html.php b/module/execution/view/cfd.html.php index 3a8b5de644..998e560547 100644 --- a/module/execution/view/cfd.html.php +++ b/module/execution/view/cfd.html.php @@ -33,6 +33,7 @@
execution->noPrintData;?>
+