+ adjust code for burn by flot.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-09-18 09:07:44 +00:00
parent c3e79511f7
commit 8333de5678
6 changed files with 11 additions and 10921 deletions
+2 -1
View File
@@ -293,7 +293,8 @@ class projectModel extends model
$hour->totalEstimate = round($hour->totalEstimate, 1);
$hour->totalConsumed = round($hour->totalConsumed, 1);
$hour->totalLeft = round($hour->totalLeft, 1);
$hour->progress = round($hour->totalConsumed / ($hour->totalConsumed + $hour->totalLeft), 3) * 100;
$hour->totalReal = $hour->totalConsumed + $hour->totalLeft;
$hour->progress = $hour->totalReal ? round($hour->totalConsumed / $hour->totalReal, 3) * 100 : 0;
}
/* Get tasks stats group by status. */
-1
View File
@@ -18,5 +18,4 @@
printf($lang->project->howToUpdateBurn, $this->createLink('help', 'field', 'module=project&method-burn&field=updateburn'));
?>
</div>
<script language='Javascript'>createChart1();</script>
<?php include '../../common/view/footer.html.php';?>
+3 -4
View File
@@ -85,14 +85,13 @@ EOT;
$height = $height . 'px';
return <<<EOT
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="{$jsRoot}jquery/flot/excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="{$jsRoot}jquery/flot/jquery.js"></script>
<script language="javascript" type="text/javascript" src="{$jsRoot}jquery/flot/jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="{$jsRoot}jquery/flot/jquery.flot.min.js"></script>
<h1>$projectName {$this->lang->project->burn}</h1>
<div id="placeholder" style="width:$width;height:$height;margin:0 auto"></div>
<script type="text/javascript">
$(function ()
{
var data = [{data: $dataXML},];
var data = [{data: $dataXML}];
function showTooltip(x, y, contents)
{
$('<div id="tooltip">' + contents + '</div>').css
@@ -118,7 +117,7 @@ $(function ()
placeholder.bind("plotselected", function (event, ranges)
{
plot = $.plot(placeholder, data, $.extend(true, {}, options, {xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to } }));
plot = $.plot(placeholder, data, $.extend(true, {}, options, {xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to } }));
});
var plot = $.plot(placeholder, data, options);
var previousPoint = null;
File diff suppressed because it is too large Load Diff
+6
View File
File diff suppressed because one or more lines are too long
-8316
View File
File diff suppressed because it is too large Load Diff