diff --git a/src/view/echarts_sy/pie.vue b/src/view/echarts_sy/pie.vue index 61d2765..06b48b2 100644 --- a/src/view/echarts_sy/pie.vue +++ b/src/view/echarts_sy/pie.vue @@ -175,8 +175,10 @@ const getOption = () => { legend: [ { orient: "vertical", - right: "1%", - top: "16%", + right: "5%", + top: "center", + type: "scroll", + height: "80%", itemWidth: 20, // 可以设置图例标记的宽度 itemHeight: 10, // 设置图例标记的高度,这里是椭圆的长轴 itemGap: 20, @@ -185,6 +187,11 @@ const getOption = () => { // borderWidth: 10, // 图例边框宽度 // borderRadius: 20, // }, + pageTextStyle: { + color: "#ffffff", + fontSize: 14, + padding: 10, + }, textStyle: { color: "#ffffff", fontSize: 14, @@ -226,8 +233,8 @@ const getOption = () => { { type: "pie", roseType: "radius", - radius: ["15%", "80%"], - center: ["20%", "50%"], + radius: ["15%", "90%"], + center: ["35%", "50%"], label: { position: "inside", formatter(item) { @@ -268,8 +275,8 @@ const getOption = () => { { type: "pie", roseType: "radius", - radius: ["15%", "82%"], - center: ["20%", "50%"], + radius: ["15%", "92%"], + center: ["35%", "50%"], label: { show: false, },