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