* If pivot have not fieldSettings, try to init it. if pivot filters !is_array(), try to json_decode it. Compatibility screen/model use processPivot.

This commit is contained in:
songchenxuan
2023-06-06 16:39:09 +08:00
parent 0648689d24
commit e46a29fd32
2 changed files with 72 additions and 63 deletions
+2 -2
View File
@@ -361,7 +361,7 @@ class screenModel extends model
foreach($yStats as $index => $dataList)
{
$field = zget($fields, $metrics[$index]);
$fieldName = $field->name;
$fieldName = $field->name;
if(isset($langs[$field->field]) and !empty($langs[$field->field][$clientLang])) $fieldName = $langs[$field->field][$clientLang];
$field = $fieldName . '(' . zget($this->lang->chart->aggList, $aggs[$index]) . ')';
$dimensions[] = $field;
@@ -514,7 +514,7 @@ class screenModel extends model
foreach($yStats as $index => $dataList)
{
$field = zget($fields, $metrics[$index]);
$fieldName = $field->name;
$fieldName = $field->name;
if(isset($langs[$field->field]) and !empty($langs[$field->field][$clientLang])) $fieldName = $langs[$field->field][$clientLang];
$field = $fieldName . '(' . zget($this->lang->chart->aggList, $aggs[$index]) . ')';