From 1f10ebe7244dc784d80a6a2ba0beb0d8090c456f Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 8 Feb 2021 14:19:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E9=A5=BC=E5=9B=BE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/charts/chart-list.vue | 8 +++++--- nezha-fronted/src/components/charts/chart-pie.vue | 8 ++++---- .../src/components/charts/line-chart-block.vue | 15 +++++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 899a5babd..c4301c5f1 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -836,14 +836,16 @@ if(chartInfo.type ==='pie'){ pieSeries={ type: 'pie', - radius: ['20%', '100%'], + radius: '100%', center: ['50%', '50%'], top:"20%", bottom:"20%", - roseType: 'radius', + // roseType: 'radius', minAngle:10, itemStyle: { - borderRadius: 5 + borderRadius: 5, + borderColor: '#fff', + borderWidth: 1 }, label: { show: false diff --git a/nezha-fronted/src/components/charts/chart-pie.vue b/nezha-fronted/src/components/charts/chart-pie.vue index 267161326..652bfdd96 100644 --- a/nezha-fronted/src/components/charts/chart-pie.vue +++ b/nezha-fronted/src/components/charts/chart-pie.vue @@ -597,13 +597,13 @@ export default { formatterFunc:function(params, ticket, callback){ return `
-
-
${this.legend[params.dataIndex].alias}
-
+
+
${this.legend[params.dataIndex].alias}
+
value
${params.value}
-
+
percent
${params.percent}%
diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 8402c4454..a74b7195d 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -729,8 +729,9 @@ if(i===0){ let value=item.data[0]; let t_date = new Date(value); - str += bus.timeFormate(t_date) - str +=`
`; + str +=`
`; + str += bus.timeFormate(t_date); + str +=`
`; } let val =item.data[1]?parseFloat(Number(item.data[1]).toFixed(2)):''; if(val===0){ @@ -965,8 +966,9 @@ if(i===0){ let value=item.data[0]; let t_date = new Date(value); - str += bus.timeFormate(t_date) - str +=`
`; + str +=`
`; + str += bus.timeFormate(t_date); + str +=`
`; } let val = parseFloat(Number(item.data[1]).toFixed(2)); if(val===0){ @@ -1132,8 +1134,9 @@ if(i===0){ let value=item.data[0]; let t_date = new Date(value); - str += bus.timeFormate(t_date) - str +=`
`; + str +=`
`; + str += bus.timeFormate(t_date); + str +=`
`; } let val = parseFloat(Number(item.data[1]).toFixed(2)); if(val===0){