mirror of
https://gitee.com/dromara/go-view.git
synced 2025-08-07 22:39:46 +08:00
feat: 饼图添加角度配置
This commit is contained in:
parent
99d1215654
commit
4645118220
@ -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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user