From 840a1e17fac70d8c552a3f8264aa5a0825436931 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 25 Dec 2009 09:11:16 +0000 Subject: [PATCH] * set the width of chart to auto. --- trunk/module/index/control.php | 2 +- trunk/module/report/model.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/trunk/module/index/control.php b/trunk/module/index/control.php index ec4b10ee8b..02bdfcacac 100644 --- a/trunk/module/index/control.php +++ b/trunk/module/index/control.php @@ -44,7 +44,7 @@ class index extends control foreach($projects as $project) { $dataXML = $this->report->createSingleXML($this->project->getBurnData($project->id), $this->lang->project->charts->burn->graph); - $burns[$project->id] = $this->report->createJSChart('line', $dataXML, 300, 200); + $burns[$project->id] = $this->report->createJSChart('line', $dataXML, 'auto', 200); } $projectGroups = array_chunk($projects, 3); diff --git a/trunk/module/report/model.php b/trunk/module/report/model.php index 9dd943c5db..737d8b7d48 100644 --- a/trunk/module/report/model.php +++ b/trunk/module/report/model.php @@ -42,7 +42,7 @@ EOT; } /* 创建js输出的chart。*/ - public function createJSChart($swf, $dataXML, $width = 600, $height = 500) + public function createJSChart($swf, $dataXML, $width = 'auto', $height = 500) { $jsRoot = $this->app->getWebRoot() . 'js/'; static $count = 0; @@ -58,7 +58,9 @@ EOT; $js