diff --git a/src/components/Pie3D.vue b/src/components/Pie3D.vue index 806990b8d08a16c1eeb432aab1aa9415274adde5..7f8b170f43ce5b97b763cc2ed818c8a5e29298b3 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 08bb9d38b0754c38cd14280323392cff0b8111b6..30e6df983ecb661fc3fb1ecc4fad57dd2d08683a 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