From da5ff4b9866a2d458d950f0c743ab9244e16c66d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 12 十一月 2023 12:23:08 +0800 Subject: [PATCH] 2023-11-12 --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 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 46c4260..cfe93bc 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -1187,7 +1187,8 @@ }) } - if (!plot.legend || plot.legend === 'hidden') { + let noLegend = !plot.legend || plot.legend === 'hidden' + if (noLegend) { chart.legend(false) } else { chart.legend({ @@ -1273,7 +1274,9 @@ view1.scale('value', c) view1.axis('value', plot.$yc) - // view1.legend(false) + if (!noLegend) { + view1.legend(false) + } let colorIndex = 0 @@ -1407,7 +1410,10 @@ } view2.data(dv.rows) - // view2.legend(false) + + if (!noLegend) { + view2.legend(false) + } plot.customs.forEach(item => { if (item.chartType === 'bar' && !plot.Bar_axis) { -- Gitblit v1.8.0