This commit is contained in:
宋辰轩
2024-04-19 14:42:43 +08:00
parent cc1df34f71
commit de1ab8152d
+6 -3
View File
@@ -345,9 +345,12 @@ class chartModel extends model
/* 若查询结果大于50条,将50条之后的结果归于其他。*/
/* If the query results are greater than 50, the results after 50 will be classified as other. */
$otherSum = array_sum(array_splice($stat, 50));
$stat[$this->lang->chart->other] = $otherSum;
if(empty($date)) arsort($stat);
if(count($stat) > $maxCount)
{
$other = array_sum(array_slice($stat, $maxCount));
$stat = array_slice($stat, 0, $maxCount);
$stat[$this->lang->chart->other] = $other;
}
$seriesData = array();
$optionList = $this->getSysOptions($fields[$group]['type'], $fields[$group]['object'], $fields[$group]['field']);