From b043a1e2c6684a17e95ea18a2139e4a6acf81258 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 31 May 2024 10:08:53 +0800 Subject: [PATCH] 1 --- resources/views/admin/home.blade.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index 66e4e72..1df23c2 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -360,17 +360,18 @@ ] }) var pieChart = echarts.init(document.querySelector("#pie-chart")); - var pieWidthPer = 100 / lies.length; + var pieRows = Math.ceil(lies.length / 3); var option = { series: datas.map(function (data, idx) { - var left = idx * pieWidthPer; + var left = idx * 33.3; + var top = Math.floor(idx / 3) * (100 / pieRows) return { type: 'pie', radius: [40, 60], - top: 'center', - height: '33.33%', + top: top + "%", + height: (100 / pieRows) + "%", left: left + '%', - width: pieWidthPer + '%', + width: '33.33%', itemStyle: { borderColor: '#fff', borderWidth: 1