Pre Merge pull request !268 from 杨运交/dev

This commit is contained in:
杨运交 2025-07-28 02:35:03 +00:00 committed by Gitee
commit ee1a7a49fe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 71 additions and 15 deletions

View File

@ -11,25 +11,27 @@ const option = {
trigger: 'item' trigger: 'item'
}, },
legend: { legend: {
show: true, show: true
}, },
dataset: 0.25, dataset: 0.25,
title: { title: {
text: 25 + "%", text: 25 + '%',
x: "center", x: 'center',
y: "center", y: 'center',
textStyle: { textStyle: {
color: "#56B9F8", color: '#56B9F8',
fontSize: 30 fontSize: 30
} }
}, },
series: [ series: [
{ {
type: "pie", type: 'pie',
radius: ["75%", "80%"], radius: ['75%', '80%'],
center: ["50%", "50%"], center: ['50%', '50%'],
hoverAnimation: true, hoverAnimation: true,
color: ["#00bcd44a", "transparent"], color: ['#00bcd44a', 'transparent'],
startAngle: 0,
endAngle: 360,
label: { label: {
show: false show: false
}, },
@ -37,21 +39,21 @@ const option = {
{ {
value: [25], value: [25],
itemStyle: { itemStyle: {
color: "#03a9f4", color: '#03a9f4',
shadowBlur: 10, shadowBlur: 10,
shadowColor:"#97e2f5" shadowColor: '#97e2f5'
} }
}, },
{ {
value: [75], value: [75],
itemStyle: { itemStyle: {
color: "#00bcd44a", color: '#00bcd44a',
shadowBlur: 0, shadowBlur: 0,
shadowColor:"#00bcd44a" shadowColor: '#00bcd44a'
} }
} }
] ]
}, }
] ]
} }

View File

@ -82,6 +82,32 @@
/> />
</SettingItem> </SettingItem>
</SettingItemBox> </SettingItemBox>
<SettingItemBox name="角度">
<SettingItem name="起始角度">
<n-input-number
v-model:value="optionData.series[0].startAngle"
:min="0"
:step="1"
:max="360"
size="small"
placeholder="支持范围[0, 360]"
>
<template #suffix> ° </template>
</n-input-number>
</SettingItem>
<SettingItem name="结束角度">
<n-input-number
v-model:value="optionData.series[0].endAngle"
:min="0"
:step="1"
:max="360"
size="small"
placeholder="支持范围[0, 360]"
>
<template #suffix> ° </template>
</n-input-number>
</SettingItem>
</SettingItemBox>
</CollapseItem> </CollapseItem>
</template> </template>

View File

@ -21,7 +21,7 @@ export const PieTypeObject = {
// 其它配置 // 其它配置
const otherConfig = { const otherConfig = {
// 轮播动画 // 轮播动画
isCarousel: false, isCarousel: false
} }
const option = { const option = {
@ -42,6 +42,8 @@ const option = {
center: ['50%', '60%'], center: ['50%', '60%'],
roseType: false, roseType: false,
avoidLabelOverlap: false, avoidLabelOverlap: false,
startAngle: 0,
endAngle: 360,
itemStyle: { itemStyle: {
show: true, show: true,
borderRadius: 10, borderRadius: 10,

View File

@ -113,6 +113,32 @@
/> />
</SettingItem> </SettingItem>
</setting-item-box> </setting-item-box>
<SettingItemBox name="角度">
<SettingItem name="起始角度">
<n-input-number
v-model:value="optionData.series[0].startAngle"
:min="0"
:step="1"
:max="360"
size="small"
placeholder="支持范围[0, 360]"
>
<template #suffix> ° </template>
</n-input-number>
</SettingItem>
<SettingItem name="结束角度">
<n-input-number
v-model:value="optionData.series[0].endAngle"
:min="0"
:step="1"
:max="360"
size="small"
placeholder="支持范围[0, 360]"
>
<template #suffix> ° </template>
</n-input-number>
</SettingItem>
</SettingItemBox>
</CollapseItem> </CollapseItem>
</template> </template>