Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user