From 46da85b73bc0f816410766d14147a85b4d0afe20 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Mon, 25 Feb 2019 21:59:14 +0800 Subject: [PATCH] =?UTF-8?q?CHART-3954=20=E6=94=B9=E5=96=84=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E5=80=BC=E4=BD=BF=E7=94=A8=E5=85=AC=E5=BC=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E9=82=BB=E5=80=BC=E8=83=8C=E6=99=AF=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/style/series/UIColorPickerPane.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 7a1567bf9..c9a6caf80 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -531,12 +531,16 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { double forValue = Double.MAX_VALUE; double backValue = -Double.MAX_VALUE; for(int i = 0, size = textFieldList.size(); i < size; i++) {// check 是否合格, 然后检查 是否改变颜色, + //backNumber是否是公式形式 + boolean formulaBackNumber = false; if(i == size - 1) { backValue = -Double.MAX_VALUE; } else { Number backNumber = ChartBaseUtils.formula2Number(BaseFormula.createFormulaBuilder().build(getValue4Index(i+1))); if(backNumber != null){ backValue = backNumber.doubleValue(); + } else { + formulaBackNumber = true; } } @@ -544,7 +548,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { if(number != null) { double value = number.doubleValue(); - if(value < forValue && value > backValue) { + if ((value < forValue && value > backValue) || formulaBackNumber) { setBackgroundUIColor(i,Color.WHITE); } else { setBackgroundUIColor(i, Color.red);