Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2015-05-13 17:17:55 +08:00
3 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ if($config->debug)
data.push({label: $row.find('.chart-label').text(), value: parseInt($row.find('.chart-value').text()), color: color, id: idx});
});
if(data.length > 4) options.scaleLabelPlacement = 'outside';
if(data.length > 1) options.scaleLabelPlacement = 'outside';
chart = $canvas.pieChart(data, options);
$canvas.on('mousemove', function(e)
+19
View File
@@ -28,6 +28,25 @@ class reportModel extends model
return $datas;
}
/**
* Create json data of single charts
* @param array $sets
* @param array $dateList
* @return string the json string
*/
public function createSingleJSON($sets, $dateList)
{
$data = '[';
foreach($dateList as $i => $date)
{
$date = date('Y-m-d', strtotime($date));
if(isset($sets[$date]))$data .= "[$i, {$sets[$date]->value}],";
}
$data = rtrim($data, ',');
$data .= ']';
return $data;
}
/**
* Get projects.
*
+2 -2
View File
File diff suppressed because one or more lines are too long