value
-
${params.value}
+
${chartDataFormat.getUnit(chartInfo.unit?chartInfo.unit:2).compute(params.value,null,-1,2)}
percent
diff --git a/nezha-fronted/src/components/charts/chartPreview.vue b/nezha-fronted/src/components/charts/chartPreview.vue
index 7312c7333..be1d4ad56 100644
--- a/nezha-fronted/src/components/charts/chartPreview.vue
+++ b/nezha-fronted/src/components/charts/chartPreview.vue
@@ -419,12 +419,16 @@
if(chartItem.type ==='pie'){
pieSeries={
type: 'pie',
- radius: ['20%', '100%'],
+ radius: '100%',
center: ['50%', '50%'],
- roseType: 'radius',
+ top:"20%",
+ bottom:"20%",
+ // roseType: 'radius',
minAngle:10,
itemStyle: {
- borderRadius: 5
+ borderRadius: 5,
+ borderColor: '#fff',
+ borderWidth: 1
},
label: {
show: false
@@ -1543,15 +1547,16 @@
}
},
pieFormatterFunc:function(params, ticket, callback){
+ let chartInfo=this.chart;
return `
-
-
${this.legend[params.dataIndex].alias}
-
+
+
${this.legend[params.dataIndex].alias}
+
value
-
${params.value}
+
${chartDataFormat.getUnit(chartInfo.unit?chartInfo.unit:2).compute(params.value,null,-1,2)}
-
+
percent
${params.percent}%