From d1e2aa982b3e3d0d9d8dddd5626a9c004d36fd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 12 Jul 2021 10:54:35 +0800 Subject: [PATCH] =?UTF-8?q?CHART-19488=20=E6=97=A5=E6=9C=9F=E8=BD=B4?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E6=9C=9F=E6=8E=A7=E4=BB=B6=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=88=90=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/style/axis/VanChartTimeAxisPane.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java index f960b4aff7..1a0b78982f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java @@ -293,7 +293,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { DateEditor dateEditor = (DateEditor)minValueField.getCurrentEditor(); String dateString = dateEditor.getUIDatePickerFormat().format(datetmp); timeAxis.setCustomMinValue(StringUtils.isNotEmpty(dateString)); - timeAxis.setMinValue(BaseFormula.createFormulaBuilder().build(dateString)); + timeAxis.setMinValue(createDataFormula(dateString)); } } else { timeAxis.setCustomMinValue(false); @@ -308,7 +308,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { DateEditor dateEditor = (DateEditor)maxValueField.getCurrentEditor(); String dateString = dateEditor.getUIDatePickerFormat().format(datetmp); timeAxis.setCustomMaxValue(StringUtils.isNotEmpty(dateString)); - timeAxis.setMaxValue(BaseFormula.createFormulaBuilder().build(dateString)); + timeAxis.setMaxValue(createDataFormula(dateString)); } } else { timeAxis.setCustomMaxValue(false); @@ -332,6 +332,11 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { checkBoxUse(); } + private BaseFormula createDataFormula(String dateString) { + String formulaString = "\"" + dateString + "\""; + return BaseFormula.createFormulaBuilder().build(formulaString); + } + public void populate(VanChartTimeAxis timeAxis){ // 最小值 if (timeAxis.isCustomMinValue() && timeAxis.getMinValue() != null) {