From 5e5d456f8480870dcdad940334f7ce7cc4d93198 Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 5 Nov 2021 13:55:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=80=91=E5=B8=83=E5=9B=BE?= =?UTF-8?q?=E5=9B=BE=E4=BE=8B=E6=96=87=E5=AD=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/chart/waterfall/waterfall.js | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/waterfall/waterfall.js b/frontend/src/views/chart/chart/waterfall/waterfall.js index fdb3805d9d..dddbc58032 100644 --- a/frontend/src/views/chart/chart/waterfall/waterfall.js +++ b/frontend/src/views/chart/chart/waterfall/waterfall.js @@ -45,7 +45,25 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) { appendPadding: getPadding(chart), label: label, tooltip: tooltip, - legend: {}, + legend: { + items: [ + { name: '增加', marker: { + style: { + fill: theme.styleSheet.paletteQualitative10[0] + } + }}, + { name: '减少', marker: { + style: { + fill: theme.styleSheet.paletteQualitative10[1] + } + }}, + { name: '合计', marker: { + style: { + fill: theme.styleSheet.paletteQualitative10[2] + } + }} + ] + }, xAxis: xAxis, yAxis: yAxis, risingFill: theme.styleSheet.paletteQualitative10[0],