* Finish task #105324.

This commit is contained in:
songchenxuan
2023-11-06 09:00:09 +08:00
parent e0a051296b
commit 5cd5a04316
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
$config->chart->widthInput = 128;
$config->chart->widthDate = 248;
$config->chart->canLabelRotate = array('line', 'cluBarX', 'cluBarY', 'stackedBar', 'stackedBarY');
$config->chart->dateConvert = array();
$config->chart->dateConvert['year'] = 'YEAR';
$config->chart->dateConvert['month'] = 'MONTH';
+7
View File
@@ -212,6 +212,13 @@ class chart extends control
break;
}
// 对于能进行旋转的图表,判断有没有设置旋转
if(in_array($type, $this->config->chart->canLabelRotate))
{
if(isset($settings['rotateX']) and $settings['rotateX'] == 'use') $data['xAxis']['axisLabel'] = array('rotate' => 30);
if(isset($settings['rotateY']) and $settings['rotateY'] == 'use') $data['yAxis']['axisLabel'] = array('rotate' => 30);
}
echo json_encode($data);
}
}