From 8a45fcd6311d13f83bcdef82c23971204332d5a7 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Fri, 22 Nov 2024 13:43:12 +0800 Subject: [PATCH] + [task#132561 doing 0.4h 7h] add the buildEcharts function for thinkappeals widget. --- lib/zin/wg/thinkappeals/v1.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/zin/wg/thinkappeals/v1.php b/lib/zin/wg/thinkappeals/v1.php index 444348310b..05b70b17f3 100644 --- a/lib/zin/wg/thinkappeals/v1.php +++ b/lib/zin/wg/thinkappeals/v1.php @@ -28,4 +28,24 @@ class thinkAppeals extends thinkModel } return $indicator; } + + protected function buildEcharts(): node + { + $blocks = $this->prop('blocks'); + return echarts + ( + set::width('100%'), + set::height('900px'), + set::color(array('#29AA93', '#FF9F46')), + set::legend(array(array( + 'data' => $blocks['legend'], + 'icon' => 'circle', + 'itemGap' => 90, + 'itemWidth' => 14, + 'itemHeight' => 14, + 'bottom' => 40, + 'textStyle' => array('color' => '#64758B', 'padding' => array(0, 0, 0, 16)) + ))), + ); + } }