From 0011ec870d3d1fe9d77a4941358c84acf8632e5e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 18 五月 2022 22:51:51 +0800 Subject: [PATCH] 2022-05-18 --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index be150a4..6c687f2 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -1018,6 +1018,9 @@ } if (plot.label !== 'false') { _chart.label(_valfield, (value) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } if (plot.show === 'percent') { value = value + '%' } @@ -1253,6 +1256,10 @@ } if (plot.label !== 'false') { _chart.label('value*key', (value, key) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (plot.show === 'percent') { value = value + '%' } @@ -1304,6 +1311,10 @@ } if (plot.label !== 'false') { _chart.label('value*key', (value, key) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (plot.show === 'percent') { value = value + '%' } @@ -1371,6 +1382,10 @@ } if (item.label !== 'false') { _chart.label(item.name, (value) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (item.show === 'percent') { value = value + '%' } @@ -1419,6 +1434,10 @@ if (item.label === 'true') { _chart.label(item.name, (value) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (item.show === 'percent') { value = value + '%' } @@ -1624,6 +1643,10 @@ } if (plot.label !== 'false') { _chart.label(`${_valfield}*${_typefield}`, (value, key) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (plot.show === 'percent') { value = value + '%' } @@ -1682,6 +1705,10 @@ } if (plot.label !== 'false') { _chart.label(`${_valfield}*${_typefield}`, (value, key) => { + if (plot.labelValue === 'zero' && value === 0) { + return null + } + if (plot.show === 'percent') { value = value + '%' } -- Gitblit v1.8.0