From f5a1be953803e77875f1018c0fa088c1da1420f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 27 Apr 2020 16:25:23 +0800 Subject: [PATCH] =?UTF-8?q?CHART-13610=20=E5=9F=8B=E7=82=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/info/ChartInfo.java | 46 +++++++++++-- .../chart/info/ChartInfoCollector.java | 68 +++++++++++++------ .../mainframe/chart/gui/ChartDataPane.java | 30 ++++++-- .../mainframe/chart/gui/ChartOtherPane.java | 8 ++- .../gui/style/series/ChartSeriesPane.java | 4 ++ .../chart/custom/VanChartCustomDataPane.java | 1 + ...VanChartCustomPlotDataContentsTabPane.java | 4 +- .../chart/custom/VanChartCustomPlotPane.java | 3 +- .../component/VanChartCustomPlotAxisPane.java | 5 ++ .../custom/style/VanChartCustomAxisPane.java | 4 ++ .../custom/style/VanChartCustomLabelPane.java | 4 ++ .../style/VanChartCustomSeriesPane.java | 4 ++ .../style/VanChartCustomTooltipPane.java | 6 +- .../designer/style/VanChartLegendPane.java | 5 ++ .../designer/style/VanChartTitlePane.java | 5 ++ .../designer/style/axis/VanChartAxisPane.java | 12 +++- .../style/background/VanChartAreaPane.java | 8 ++- .../datasheet/VanChartDataSheetPane.java | 6 +- .../style/label/VanChartLabelPane.java | 4 ++ .../style/tooltip/VanChartTooltipPane.java | 5 +- .../type/AbstractVanChartTypePane.java | 2 +- .../designer/data/VanChartMapDataPane.java | 25 +++++++ .../style/label/VanChartMapLabelPane.java | 5 ++ .../style/tooltip/VanChartMapTooltipPane.java | 5 +- 24 files changed, 220 insertions(+), 49 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java index 69e2c08029..57bec3c458 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java @@ -1,6 +1,10 @@ package com.fr.design.mainframe.chart.info; import com.fr.base.io.BaseBook; +import com.fr.chartx.attr.ChartProvider; +import com.fr.chartx.config.info.AbstractConfig; +import com.fr.chartx.config.info.ChartConfigInfo; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.config.MarketConfig; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignerEnvManager; @@ -26,7 +30,7 @@ import java.util.Map; public class ChartInfo extends AbstractPointInfo { public static final String XML_TAG = "ChartInfo"; private static final String CHART_CONSUMING_URL = CloudCenter.getInstance().acquireUrlByKind("chartinfo.consuming") + "/single"; - + private static final String CHART_FUNCTION_URL = CloudCenter.getInstance().acquireUrlByKind("chart.info.function") + "/single"; private static final String XML_CHART_CONSUMING_MAP = "chartConsumingMap"; private static final String ATTR_TEST_TEMPLATE = "testTemplate"; @@ -59,6 +63,8 @@ public class ChartInfo extends AbstractPointInfo { private Map chartConsumingMap = new HashMap<>(); + private ChartConfigInfo chartConfigInfo = new ChartConfigInfo(); + private BaseBook book; private boolean testTemplate; @@ -93,7 +99,6 @@ public class ChartInfo extends AbstractPointInfo { this.chartConsumingMap.put(ATTR_TEMPLATE_ID, templateId); } - public BaseBook getBook() { return book; } @@ -117,17 +122,19 @@ public class ChartInfo extends AbstractPointInfo { return chartInfo; } - public static ChartInfo newInstance(String chartId, String chartType) { - return newInstance(chartId, chartType, null, false, false); + public static ChartInfo newInstance(ChartProvider chartProvider) { + return newInstance(chartProvider, null, false, false); } - public static ChartInfo newInstance(String chartId, String chartType, String createTime, boolean isNew, boolean isReuse) { + public static ChartInfo newInstance(ChartProvider chartProvider, String createTime, boolean isNew, boolean isReuse) { HashMap chartConsumingMap = new HashMap<>(); String username = MarketConfig.getInstance().getBbsUsername(); String userId = String.valueOf(MarketConfig.getInstance().getBbsUid()); String uuid = DesignerEnvManager.getEnvManager().getUUID(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); + String chartId = chartProvider.getChartUuid(); + String chartType = chartProvider.getID(); BaseBook book = DesignModelAdapter.getCurrentModelAdapter().getBook(); String templateId = book.getTemplateID(); @@ -160,6 +167,7 @@ public class ChartInfo extends AbstractPointInfo { ChartInfo chartInfo = new ChartInfo(chartId, templateId, book); chartInfo.chartConsumingMap = chartConsumingMap; + chartProvider.initChartConfigInfo(chartInfo.chartConfigInfo); return chartInfo; } @@ -196,6 +204,8 @@ public class ChartInfo extends AbstractPointInfo { writer.attr(ATTR_IS_NEW, chartConsumingMap.get(ATTR_IS_NEW)); writer.attr(ATTR_IS_REUSE, chartConsumingMap.get(ATTR_IS_REUSE)); writer.end(); + + chartConfigInfo.writeXML(writer); writer.end(); } @@ -230,6 +240,9 @@ public class ChartInfo extends AbstractPointInfo { chartConsumingMap.put(ATTR_IS_NEW, reader.getAttrAsString(ATTR_IS_NEW, StringUtils.EMPTY)); chartConsumingMap.put(ATTR_IS_REUSE, reader.getAttrAsString(ATTR_IS_REUSE, StringUtils.EMPTY)); } + if (ChartConfigInfo.XML_TAG.equals(name)) { + this.chartConfigInfo = (ChartConfigInfo) reader.readXMLObject(new ChartConfigInfo()); + } } } @@ -243,9 +256,17 @@ public class ChartInfo extends AbstractPointInfo { public Map getSendInfo() { Map sendMap = new HashMap<>(); sendMap.put(CHART_CONSUMING_URL, new JSONObject(chartConsumingMap).toString()); + sendMap.put(CHART_FUNCTION_URL, getFunctionJson()); return sendMap; } + private String getFunctionJson() { + JSONObject jsonObject = JSONObject.create(); + jsonObject.put("chartID", this.chartId); + chartConfigInfo.toJSONObject(jsonObject); + return jsonObject.toString(); + } + public void updatePropertyTime() { String propertyTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); @@ -255,22 +276,32 @@ public class ChartInfo extends AbstractPointInfo { chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, propertyTime); } - public void updateChartType(String chartType) { + public void updateChartType(ChartProvider chartProvider) { String typeTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); chartConsumingMap.put(ATTR_CHART_TYPE_TIME, typeTime); - chartConsumingMap.put(ATTR_CHART_TYPE, chartType); + chartConsumingMap.put(ATTR_CHART_TYPE, chartProvider.getID()); chartConsumingMap.put(ATTR_CHART_PROPERTY_FIRST_TIME, ""); chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, ""); String count = chartConsumingMap.get(ATTR_OVER_CHART_TYPE_COUNT); count = StringUtils.isEmpty(count) ? "1" : String.valueOf(Integer.parseInt(count) + 1); chartConsumingMap.put(ATTR_OVER_CHART_TYPE_COUNT, count); + + resetChartConfigInfo(chartProvider); + } + + public void resetChartConfigInfo(ChartProvider chartProvider) { + chartConfigInfo.reset(); + chartProvider.initChartConfigInfo(chartConfigInfo); } public void updateFirstType(String chartType) { chartConsumingMap.put(ATTR_FIRST_CHART_TYPE, chartType); } + public void updateChartConfig(ConfigType configType, AbstractConfig config) { + chartConfigInfo.updateChartConfig(configType, config); + } @Override public ChartInfo clone() { @@ -284,6 +315,7 @@ public class ChartInfo extends AbstractPointInfo { chartConsumingMap.put(entry.getKey(), entry.getValue()); } chartInfo.chartConsumingMap = chartConsumingMap; + chartInfo.chartConfigInfo = chartConfigInfo.clone(); return chartInfo; } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java index 5b76b197c3..04c4c80d3c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java @@ -2,6 +2,8 @@ package com.fr.design.mainframe.chart.info; import com.fr.base.io.BaseBook; import com.fr.chartx.attr.ChartProvider; +import com.fr.chartx.config.info.AbstractConfig; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.mainframe.burying.point.AbstractPointCollector; import com.fr.design.mainframe.template.info.TemplateInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo; @@ -55,63 +57,89 @@ public class ChartInfoCollector extends AbstractPointCollector { collection(chartProvider, createTime, false); } - public void collection(ChartProvider chartProvider, String createTime, boolean isReuse) { - collection(chartProvider.getChartUuid(), chartProvider.getID(), createTime, isReuse); - } - /** * 新建图表,保存状态 */ - public void collection(String chartId, String chartType, String createTime, boolean isReuse) { + public void collection(ChartProvider chartProvider, String createTime, boolean isReuse) { + String chartId = chartProvider.getChartUuid(); if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { return; } - ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType, createTime, true, isReuse); + ChartInfo chartInfo = ChartInfo.newInstance(chartProvider, createTime, true, isReuse); chartInfoCacheMap.put(chartId, chartInfo); } + /** + * 图表编辑,更新编辑时间 + */ public void updateChartPropertyTime(ChartProvider chartProvider) { - updateChartPropertyTime(chartProvider.getChartUuid(), chartProvider.getID()); + if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) { + return; + } + ChartInfo chartInfo = getOrCreateChartInfo(chartProvider); + + //更新编辑时间 + chartInfo.updatePropertyTime(); + + //重置计数 + chartInfo.resetIdleDayCount(); } /** * 图表编辑,更新编辑时间 */ - public void updateChartPropertyTime(String chartId, String chartType) { - if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { + public void updateChartConfig(ChartProvider chartProvider, ConfigType configType, AbstractConfig config) { + if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) { return; } - ChartInfo chartInfo = getOrCreateChartInfo(chartId, chartType, null); + ChartInfo chartInfo = getOrCreateChartInfo(chartProvider); - //更新编辑时间 - chartInfo.updatePropertyTime(); + //更新对应的配置 + chartInfo.updateChartConfig(configType, config); //重置计数 chartInfo.resetIdleDayCount(); } - public void updateChartTypeTime(ChartProvider chartProvider, String oldType) { - updateChartTypeTime(chartProvider.getChartUuid(), chartProvider.getID(), oldType); + /** + * 图表子类型更新 + */ + public void updateChartMiniType(ChartProvider chartProvider) { + if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) { + return; + } + ChartInfo chartInfo = getOrCreateChartInfo(chartProvider); + + //图表子类型更新 + chartInfo.resetChartConfigInfo(chartProvider); + + //重置计数 + chartInfo.resetIdleDayCount(); } /** * 图表类型变化,更新类型和类型确认时间 */ - public void updateChartTypeTime(String chartId, String chartType, String oldType) { - if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { + public void updateChartTypeTime(ChartProvider chartProvider, String oldType) { + if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) { return; } - ChartInfo chartInfo = getOrCreateChartInfo(chartId, chartType, oldType); + ChartInfo chartInfo = getOrCreateChartInfo(chartProvider, oldType); //更新类型确认时间和类型 - chartInfo.updateChartType(chartType); + chartInfo.updateChartType(chartProvider); //重置计数 chartInfo.resetIdleDayCount(); } - private ChartInfo getOrCreateChartInfo(String chartId, String chartType, String oldType) { + private ChartInfo getOrCreateChartInfo(ChartProvider chartProvider) { + return getOrCreateChartInfo(chartProvider, null); + } + + private ChartInfo getOrCreateChartInfo(ChartProvider chartProvider, String oldType) { + String chartId = chartProvider.getChartUuid(); //缓存中有从缓存中拿 if (chartInfoCacheMap.containsKey(chartId)) { return chartInfoCacheMap.get(chartId); @@ -123,7 +151,7 @@ public class ChartInfoCollector extends AbstractPointCollector { return chartInfo; } //都没有的话创建一个并加入到缓存中 - ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType); + ChartInfo chartInfo = ChartInfo.newInstance(chartProvider); if (StringUtils.isNotEmpty(oldType)) { chartInfo.updateFirstType(oldType); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java index ad549c5afd..2fac3287a2 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.chart.gui; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.GisMapPlot; import com.fr.chart.chartattr.MapPlot; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.chart.report.GisMapDataPane; import com.fr.design.chart.report.MapDataPane; import com.fr.design.gui.frpane.AttributeChangeListener; @@ -10,6 +11,9 @@ import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.data.DataContentsPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; +import com.fr.plugin.chart.attr.plot.VanChartPlot; +import com.fr.plugin.chart.vanchart.VanChart; import javax.swing.JPanel; import java.awt.BorderLayout; @@ -18,12 +22,12 @@ public class ChartDataPane extends AbstractChartAttrPane { public static final int LABEL_WIDTH = 85; public static final int LABEL_HEIGHT = 20; - + protected DataContentsPane contentsPane; protected AttributeChangeListener listener; - + private boolean supportCellData = true; - + public ChartDataPane(AttributeChangeListener listener) { super(); this.listener = listener; @@ -55,7 +59,7 @@ public class ChartDataPane extends AbstractChartAttrPane { if(contentsPane != null) { this.remove(contentsPane); } - + this.setLayout(new BorderLayout(0, 0)); if (collection == null) { throw new IllegalArgumentException("ChartCollection can not be null!"); @@ -69,7 +73,7 @@ public class ChartDataPane extends AbstractChartAttrPane { }else { contentsPane = new NormalChartDataPane(listener, ChartDataPane.this); } - + if(contentsPane != null) { contentsPane.setSupportCellData(supportCellData); } @@ -88,7 +92,7 @@ public class ChartDataPane extends AbstractChartAttrPane { contentsPane.setSupportCellData(supportCellData); } } - + /** * 更新界面 数据内容 */ @@ -106,11 +110,23 @@ public class ChartDataPane extends AbstractChartAttrPane { * 保存 数据界面内容 */ public void update(ChartCollection collection) { - if(contentsPane != null) { + if (contentsPane != null) { contentsPane.update(collection); + updateBuryingPoint(collection); } } + protected void updateBuryingPoint(ChartCollection collection){ + VanChart vanchart = collection.getSelectedChartProvider(VanChart.class); + if (vanchart != null) { + VanChartPlot plot = vanchart.getPlot(); + if( !plot.isInCustom()) { + ChartInfoCollector.getInstance().updateChartConfig(vanchart, ConfigType.DATA, + vanchart.getFilterDefinition().getBuryingPointDataConfig()); + } + } + } + /** * 刷新图表数据界面 * @param collection 图表收集器 diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java index 90f896c754..9b494a1a45 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.chart.gui; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.BasicPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane; @@ -11,11 +12,12 @@ import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.other.ChartConditionAttrPane; import com.fr.design.mainframe.chart.gui.other.ChartInteractivePane; import com.fr.design.mainframe.chart.gui.type.ChartTabPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; import java.util.ArrayList; import java.util.List; +import java.awt.BorderLayout; public class ChartOtherPane extends AbstractChartAttrPane { private static final long serialVersionUID = -5612046386597783406L; @@ -121,6 +123,8 @@ public class ChartOtherPane extends AbstractChartAttrPane { if (ChartOtherPane.this.isHaveCondition()) { conditionAttrPane.updateBean(chart); } + //特效埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.EFFECT, chart.getBuryingPointEffectConfig()); } /** diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java index 32fe831ff6..48ea41ec1d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java @@ -2,9 +2,11 @@ package com.fr.design.mainframe.chart.gui.style.series; import com.fr.chart.chartattr.Chart; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.van.chart.designer.AbstractVanChartScrollPane; import javax.swing.JPanel; @@ -60,6 +62,8 @@ public class ChartSeriesPane extends AbstractVanChartScrollPane { if(seriesStyleContentPane != null) { seriesStyleContentPane.setCurrentChart(chart); seriesStyleContentPane.updateBean(chart.getPlot()); + //系列埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.SERIES, chart.getPlot().getBuryingPointSeriesConfig()); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java index c49a1e2114..6c5f714bf8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java @@ -62,6 +62,7 @@ public class VanChartCustomDataPane extends ChartDataPane { public void update(ChartCollection collection){ if(contentsTabPane != null) { contentsTabPane.updateBean(collection); + updateBuryingPoint(collection); } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java index 68949897b7..e8f6f3a0a7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java @@ -14,7 +14,7 @@ import com.fr.van.chart.custom.component.VanChartDataPane; import javax.swing.JPanel; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -118,7 +118,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab } try { - Map definitionMap = new HashMap(); + Map definitionMap = new LinkedHashMap(); //已经有的数据配置不允许重置 diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java index 5e6953746a..a4b43843e4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java @@ -29,6 +29,7 @@ import com.fr.van.chart.designer.type.AbstractVanChartTypePane; import javax.swing.JPanel; import javax.swing.JSeparator; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.awt.CardLayout; import java.awt.Component; @@ -192,7 +193,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { return; } - Map newDefinitionMap = new HashMap(); + Map newDefinitionMap = new LinkedHashMap(); VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot(); for (int i = 0; i < customPlot.getCustomPlotList().size(); i++) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java index 86a1a7b53e..46ee566a29 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java @@ -7,6 +7,7 @@ import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; import com.fr.plugin.chart.custom.VanChartCustomPlot; +import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.axis.VanChartAxisPane; @@ -52,4 +53,8 @@ public class VanChartCustomPlotAxisPane extends VanChartAxisPane { } } } + + @Override + protected void updateBuryingPoint(VanChart chart) { + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java index 0eb6278e4d..d145283f69 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java @@ -1,8 +1,10 @@ package com.fr.van.chart.custom.style; import com.fr.chart.chartattr.Chart; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -63,6 +65,8 @@ public class VanChartCustomAxisPane extends BasicScrollPane { } VanChartCustomPlot plot = (VanChartCustomPlot) chart.getPlot(); axisPane.updateBean(plot); + //坐标轴埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getPlot().getBuryingPointAxisConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java index a666d992ed..74f3875bf7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java @@ -2,8 +2,10 @@ package com.fr.van.chart.custom.style; import com.fr.chart.chartattr.Chart; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -63,6 +65,8 @@ public class VanChartCustomLabelPane extends BasicScrollPane { } labelPane.updateBean((VanChartCustomPlot)chart.getPlot()); + //标签埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java index 2cd3d74e1f..8fa1d224af 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java @@ -1,10 +1,12 @@ package com.fr.van.chart.custom.style; import com.fr.chart.chartattr.Chart; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.van.chart.designer.component.VanChartBeautyPane; @@ -112,6 +114,8 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane { if (seriesPane != null){ plotSeriesPane.updateBean(plot); } + //系列埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.SERIES, chart.getPlot().getBuryingPointSeriesConfig()); } /** diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java index d27b95f3bf..6331707ca9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java @@ -1,8 +1,9 @@ package com.fr.van.chart.custom.style; import com.fr.chart.chartattr.Chart; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.dialog.BasicScrollPane; - +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -63,7 +64,8 @@ public class VanChartCustomTooltipPane extends BasicScrollPane { } tooltipPane.updateBean((VanChartCustomPlot)chart.getPlot()); - + //提示埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java index 8fb3aed22e..d0537ce4f6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java @@ -2,7 +2,9 @@ package com.fr.van.chart.designer.style; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.attr.VanChartLegend; import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -52,6 +54,9 @@ public class VanChartLegendPane extends AbstractVanChartScrollPane { } VanChartLegend legend = (VanChartLegend) plot.getLegend(); legendContent.updateBean(legend); + + //图例埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LEGEND, legend.getBuryingPointLegendConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index 6a7987bcdb..3c62d44087 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -5,6 +5,7 @@ import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.base.Utils; import com.fr.chart.base.TextAttr; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -16,6 +17,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.plugin.chart.attr.VanChartTitle; import com.fr.plugin.chart.vanchart.VanChart; @@ -362,6 +364,9 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { title.setFloatPercentY(customFloatPositionPane.getFloatPosition_y()); textAttrPane.update(textAttr); backgroundPane.update(title); + + //标题埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TITLE, title.getBuryingPointTitleConfig()); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java index 232143496e..d0a4da4c1f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java @@ -3,8 +3,10 @@ package com.fr.van.chart.designer.style.axis; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.beans.BasicBeanPane; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; @@ -16,12 +18,12 @@ import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.axis.component.VanChartAxisButtonPane; import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.CardLayout; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.awt.BorderLayout; +import java.awt.CardLayout; /** * 样式-坐标轴界面 @@ -237,6 +239,12 @@ public class VanChartAxisPane extends BasicBeanPane { updateBean(plot); + updateBuryingPoint(chart); + } + + protected void updateBuryingPoint(VanChart chart) { + //坐标轴埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getPlot().getBuryingPointAxisConfig()); } public void updateBean(Plot plot){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java index 2aca9e8866..86b7d896f5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java @@ -1,20 +1,22 @@ package com.fr.van.chart.designer.style.background; import com.fr.chart.chartattr.Plot; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.design.mainframe.chart.gui.style.legend.AutoSelectedPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.BorderFactory; import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.FlowLayout; import java.util.ArrayList; import java.util.List; +import java.awt.BorderLayout; +import java.awt.FlowLayout; /** * 属性表, 图表样式-背景界面. @@ -94,6 +96,8 @@ public class VanChartAreaPane extends ThirdTabPane implements AutoSele public void updateBean(VanChart chart) { areaPane.updateBean(chart); plotPane.updateBean(chart); + //背景埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.BACKGROUND, chart.getPlot().getBuryingPointBackGroundConfig()); } /** diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java index 81451cbe7c..f3e181bdf0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java @@ -4,15 +4,16 @@ import com.fr.base.FRContext; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.DataSheet; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.style.FormatPane; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; - import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.base.VanChartConstants; @@ -135,6 +136,9 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { if(isShowDataSheet.isSelected()){ update(dataSheet); } + + //数据表埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.DATA_TABLE, chart.getPlot().getDataSheet().getBuryingPointDataTableConfig()); // plot.setDataSheet2PlotList(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java index 174f9cf93b..8963884c08 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java @@ -4,7 +4,9 @@ import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.chartx.config.info.constant.ConfigType; import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrLabel; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -70,6 +72,8 @@ public class VanChartLabelPane extends AbstractVanChartScrollPane { if (attrLabel != null) { attrList.addDataSeriesCondition(attrLabel); } + //标签埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java index 14fa52a2c7..945bf1f85e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java @@ -4,7 +4,8 @@ import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; - +import com.fr.chartx.config.info.constant.ConfigType; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrTooltip; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -67,6 +68,8 @@ public class VanChartTooltipPane extends AbstractVanChartScrollPane { if (attrTooltip != null) { attrList.addDataSeriesCondition(attrTooltip); } + //提示埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index e9395ccb56..c2406e0d2c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -105,6 +105,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane { } defaultAttr.addDataSeriesCondition(attrMapLabel); + + //标签埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig()); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java index b13599304d..84e44e3d66 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java @@ -3,7 +3,8 @@ package com.fr.van.chart.map.designer.style.tooltip; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; - +import com.fr.chartx.config.info.constant.ConfigType; +import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.attr.AttrMapTooltip; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -119,6 +120,8 @@ public class VanChartMapTooltipPane extends AbstractVanChartScrollPane { attrMapTooltip.setLineTooltip(lineTooltipPane.update()); } defaultAttr.addDataSeriesCondition(attrMapTooltip); + //提示埋点 + ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig()); } @Override