+ [task#135805 doing 0.3h 2h] add the buildEcharts function for the thinkbcg widget.

This commit is contained in:
wangzemei
2024-12-31 18:23:44 +08:00
committed by 孙浩
parent 7505d21e1d
commit 2db6ce6ef9
+12
View File
@@ -10,6 +10,17 @@ requireWg('thinkModel');
*/
class thinkBcg extends thinkModel
{
protected function buildEcharts(): node
{
$blocks = $this->prop('blocks');
return echarts
(
set::animationDuration(0),
set::width('1600px'),
set::height('1000px')
);
}
protected function buildBody(): node
{
global $app, $lang;
@@ -54,6 +65,7 @@ class thinkBcg extends thinkModel
(
setData(array('blocks' => $blocks)),
setClass('relative echarts-content text-gray-600'),
$this->buildEcharts(),
p(setClass('h-full axis-name text-lg absolute top-0 flex justify-center left-2'), setStyle(array('writing-mode' => 'vertical-rl')), $lang->thinkwizard->dimension->yAxisNameList[$yAxis] ?? ''),
p(setClass('w-full axis-name text-lg text-center absolute left-0 bottom-2'), $lang->thinkwizard->dimension->xAxisNameList[$xAxis] ?? ''),
);