fix(dashboard): 区域转移概率移至热力图上方;修正查询顺序为最近数据
This commit is contained in:
@@ -674,7 +674,7 @@ class History extends Model
|
||||
{
|
||||
$history = $this
|
||||
->field('expect,num7,openTime')
|
||||
->order('openTime', 'asc')
|
||||
->order('openTime', 'desc')
|
||||
->limit($periods)
|
||||
->select();
|
||||
|
||||
@@ -682,6 +682,9 @@ class History extends Model
|
||||
return ['zones' => ['1-10','11-20','21-30','31-40','41-49'], 'matrix' => [], 'probabilities' => [], 'total_transitions' => 0];
|
||||
}
|
||||
|
||||
// 反转为升序,从旧到新
|
||||
$history = array_reverse($history);
|
||||
|
||||
$zoneLabels = ['1-10', '11-20', '21-30', '31-40', '41-49'];
|
||||
$matrix = array_fill(0, 5, array_fill(0, 5, 0));
|
||||
$rowTotals = array_fill(0, 5, 0);
|
||||
|
||||
Reference in New Issue
Block a user