Browse Source

CHART-13610 埋点功能

feature/big-screen
白岳 5 years ago
parent
commit
f5a1be9538
  1. 46
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java
  2. 68
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java
  3. 18
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java
  4. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java
  5. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java
  6. 1
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java
  7. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java
  8. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  9. 5
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java
  10. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java
  11. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java
  12. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java
  13. 6
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java
  14. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java
  15. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  16. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java
  17. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java
  18. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java
  19. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java
  20. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java
  21. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  22. 25
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java
  23. 5
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java
  24. 5
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java

46
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<String, String> 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<String, String> 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<String, String> getSendInfo() {
Map<String, String> 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;
}
}

68
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<ChartInfo> {
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<ChartInfo> {
return chartInfo;
}
//都没有的话创建一个并加入到缓存中
ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType);
ChartInfo chartInfo = ChartInfo.newInstance(chartProvider);
if (StringUtils.isNotEmpty(oldType)) {
chartInfo.updateFirstType(oldType);
}

18
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;
@ -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 图表收集器

8
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());
}
/**

4
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<Chart> {
if(seriesStyleContentPane != null) {
seriesStyleContentPane.setCurrentChart(chart);
seriesStyleContentPane.updateBean(chart.getPlot());
//系列埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.SERIES, chart.getPlot().getBuryingPointSeriesConfig());
}
}

1
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);
}
}
}

4
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<CustomPlotType, TopDefinitionProvider> definitionMap = new HashMap<CustomPlotType, TopDefinitionProvider>();
Map<CustomPlotType, TopDefinitionProvider> definitionMap = new LinkedHashMap<CustomPlotType, TopDefinitionProvider>();
//已经有的数据配置不允许重置

3
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<CustomPlotType, TopDefinitionProvider> newDefinitionMap = new HashMap<CustomPlotType, TopDefinitionProvider>();
Map<CustomPlotType, TopDefinitionProvider> newDefinitionMap = new LinkedHashMap<CustomPlotType, TopDefinitionProvider>();
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
for (int i = 0; i < customPlot.getCustomPlotList().size(); i++) {

5
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) {
}
}

4
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<Chart> {
}
VanChartCustomPlot plot = (VanChartCustomPlot) chart.getPlot();
axisPane.updateBean(plot);
//坐标轴埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getPlot().getBuryingPointAxisConfig());
}
@Override

4
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<Chart> {
}
labelPane.updateBean((VanChartCustomPlot)chart.getPlot());
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig());
}
@Override

4
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());
}
/**

6
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<Chart> {
}
tooltipPane.updateBean((VanChartCustomPlot)chart.getPlot());
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig());
}
@Override

5
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<VanChart> {
}
VanChartLegend legend = (VanChartLegend) plot.getLegend();
legendContent.updateBean(legend);
//图例埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LEGEND, legend.getBuryingPointLegendConfig());
}
@Override

5
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<VanChart> {
title.setFloatPercentY(customFloatPositionPane.getFloatPosition_y());
textAttrPane.update(textAttr);
backgroundPane.update(title);
//标题埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TITLE, title.getBuryingPointTitleConfig());
}
}

12
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<VanChart> {
updateBean(plot);
updateBuryingPoint(chart);
}
protected void updateBuryingPoint(VanChart chart) {
//坐标轴埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getPlot().getBuryingPointAxisConfig());
}
public void updateBean(Plot plot){

8
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<VanChart> implements AutoSele
public void updateBean(VanChart chart) {
areaPane.updateBean(chart);
plotPane.updateBean(chart);
//背景埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.BACKGROUND, chart.getPlot().getBuryingPointBackGroundConfig());
}
/**

6
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<Chart> {
if(isShowDataSheet.isSelected()){
update(dataSheet);
}
//数据表埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.DATA_TABLE, chart.getPlot().getDataSheet().getBuryingPointDataTableConfig());
// plot.setDataSheet2PlotList();
}

4
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<Chart> {
if (attrLabel != null) {
attrList.addDataSeriesCondition(attrLabel);
}
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig());
}
@Override

5
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<Chart> {
if (attrTooltip != null) {
attrList.addDataSeriesCondition(attrTooltip);
}
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig());
}
@Override

2
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -105,6 +105,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
cloneOldPlot2New(oldPlot, newPlot);
chart.setPlot(newPlot);
resetChartAttr4SamePlot(chart);
ChartInfoCollector.getInstance().updateChartMiniType(chart);
} else if(!samePlot){
//不同的图表类型切換
resetChartAttr(chart, newPlot);
@ -112,7 +113,6 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
newPlot.setCategoryNum(oldPlot.getCategoryNum());
//切换类型埋点
ChartInfoCollector.getInstance().updateChartTypeTime(chart, oldPlot.getPlotID());
}
if(chart instanceof VanChart
&& !acceptDefinition(((VanChart) chart).getChartDataDefinition(), newPlot)) {

25
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java

@ -1,9 +1,13 @@
package com.fr.van.chart.map.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.chartx.config.info.DataConfig;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.map.data.VanMapDefinition;
import com.fr.plugin.chart.type.MapType;
@ -116,6 +120,27 @@ public class VanChartMapDataPane extends ChartDataPane {
vanMapDefinition.setLineDefinition(lineClone.getSelectedChart().getFilterDefinition());
collection.getSelectedChart().setFilterDefinition(vanMapDefinition);
updateBuryingPoint(collection, vanMapDefinition);
}
}
private void updateBuryingPoint(ChartCollection collection, VanMapDefinition vanMapDefinition) {
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
DataConfig dataConfig;
switch (mapType) {
case AREA:
dataConfig = vanMapDefinition.getAreaDefinition().getBuryingPointDataConfig();
break;
case POINT:
dataConfig = vanMapDefinition.getPointDefinition().getBuryingPointDataConfig();
break;
case LINE:
dataConfig = vanMapDefinition.getLineDefinition().getBuryingPointDataConfig();
break;
default:
dataConfig = vanMapDefinition.getBuryingPointDataConfig();
break;
}
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.DATA, dataConfig);
}
}

5
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java

@ -3,7 +3,9 @@ package com.fr.van.chart.map.designer.style.label;
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.map.VanChartMapPlot;
import com.fr.plugin.chart.map.attr.AttrMapLabel;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -116,6 +118,9 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
}
defaultAttr.addDataSeriesCondition(attrMapLabel);
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getPlot().getBuryingPointLabelConfig());
}
@Override

5
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<Chart> {
attrMapTooltip.setLineTooltip(lineTooltipPane.update());
}
defaultAttr.addDataSeriesCondition(attrMapTooltip);
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getPlot().getBuryingPointTooltipConfig());
}
@Override

Loading…
Cancel
Save