From f63d905c88896967a34dbef542164cc1194cf56c Mon Sep 17 00:00:00 2001 From: 64584ef1ecd7b40dc29f18f5 <64584ef1ecd7b40dc29f18f5@devide> Date: Mon, 8 May 2023 08:26:10 +0000 Subject: [PATCH] UPDATE --- src/components/Pie3D.vue | 8 +++++--- src/utils/pie.js | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Pie3D.vue b/src/components/Pie3D.vue index 806990b..7f8b170 100644 --- a/src/components/Pie3D.vue +++ b/src/components/Pie3D.vue @@ -11,7 +11,9 @@ import { onMounted, reactive } from 'vue'; let config = reactive({ color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de"],//颜色 - sfShowLabel:true //是否显示文本标线 + sfShowLabel:true, //是否显示文本标线 + legendOrient:'horizontal', //图例,横向、纵向 + legendType:'plain', //图例类型,普通图例plain还是 scroll翻页图例 }) //基础数据 const salesData = [ @@ -21,8 +23,8 @@ const salesData = [ {label: "2023-05-04", value: 21, DWMC:'俩'}, {label: "2023-05-05", value: 23, DWMC:'俩'}, {label: "2023-05-06", value: 82, DWMC:'俩'}, - {label: "2023-05-06", value: 26, DWMC:'俩'}, - {label: "2023-05-06", value: 57, DWMC:'俩'} + {label: "2023-05-07", value: 26, DWMC:'俩'}, + {label: "2023-05-08", value: 57, DWMC:'俩'} ]; onMounted(() => { pie('#abc', 700, 400, salesData, 250, 200, 150, 100, 30, config) diff --git a/src/utils/pie.js b/src/utils/pie.js index 08bb9d3..30e6df9 100644 --- a/src/utils/pie.js +++ b/src/utils/pie.js @@ -152,4 +152,5 @@ export default function pie(id, width, height, data, x, y, rx, ry, h, config,ir= }) } + } \ No newline at end of file -- GitLab