|
|
|
@ -26,6 +26,7 @@ import com.fr.plugin.chart.base.VanChartHtmlLabel;
|
|
|
|
|
import com.fr.plugin.chart.custom.CustomPlotFactory; |
|
|
|
|
import com.fr.plugin.chart.custom.VanChartCustomPlot; |
|
|
|
|
import com.fr.plugin.chart.custom.type.CustomPlotType; |
|
|
|
|
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; |
|
|
|
|
import com.fr.plugin.chart.map.VanChartMapPlot; |
|
|
|
|
import com.fr.plugin.chart.map.attr.AttrMapLabel; |
|
|
|
|
import com.fr.plugin.chart.map.attr.AttrMapTooltip; |
|
|
|
@ -63,6 +64,14 @@ public class SearchJSUtils {
|
|
|
|
|
*/ |
|
|
|
|
public static final String CATEGORY_LABEL = ShowValueUtils.joinStr4Position(Toolkit.i18nText("Fine-Design_Basic_Style"), Toolkit.i18nText("Fine-Design_Chart_Data_Label"), Toolkit.i18nText("Fine-Design_Chart_Category_Label")); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 条件属性 |
|
|
|
|
*/ |
|
|
|
|
public static final String CONDITION = ShowValueUtils.joinStr4Position( |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Chart"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Animation_Special"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Interactive")); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 从Listener中获取JS |
|
|
|
|
*/ |
|
|
|
@ -338,6 +347,8 @@ public class SearchJSUtils {
|
|
|
|
|
VanChart chart = ((VanChart) chartCollection.getChart(i)); |
|
|
|
|
if (isCustomMapPlot(chart.getPlot())) { |
|
|
|
|
dealMapNameJavaScript(content, chart.getPlot(), jsInfos); |
|
|
|
|
} else if (chart.getPlot() instanceof VanChartDrillMapPlot) { |
|
|
|
|
dealDrillNameJavaScript(content, chart.getPlot(), jsInfos); |
|
|
|
|
} else { |
|
|
|
|
NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); |
|
|
|
|
addNameJavaScript2Array(nameJavaScriptArrayList, nameJavaScriptGroup); |
|
|
|
@ -347,6 +358,17 @@ public class SearchJSUtils {
|
|
|
|
|
return nameJavaScriptArrayList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void dealDrillNameJavaScript(ITContent content, VanChartDrillMapPlot plot, List<JSInfo> jsInfos) { |
|
|
|
|
ITContent chartContent = ITContent.copy(content); |
|
|
|
|
chartContent.addOtherPos( |
|
|
|
|
CONDITION, |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Drill_Dir") |
|
|
|
|
); |
|
|
|
|
List<NameJavaScript> list = new ArrayList<>(); |
|
|
|
|
addNameJavaScript2Array(list, plot.getDrillUpHyperLink()); |
|
|
|
|
addJSInfosFromNameJS(chartContent, list, jsInfos); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 是否是组合地图 |
|
|
|
|
* @param plot 图表的plot |
|
|
|
@ -366,14 +388,15 @@ public class SearchJSUtils {
|
|
|
|
|
List<NameJavaScript> areaJavaScriptList = new ArrayList<>(); |
|
|
|
|
List<NameJavaScript> lineJavaScriptList = new ArrayList<>(); |
|
|
|
|
List<NameJavaScript> pointJavaScriptList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
ITContent chartContent = ITContent.copy(content); |
|
|
|
|
chartContent.addOtherPos(CONDITION); |
|
|
|
|
addNameJavaScript2Array(areaJavaScriptList, plot.getAreaHotHyperLink()); |
|
|
|
|
addNameJavaScript2Array(lineJavaScriptList, plot.getLineHotHyperLink()); |
|
|
|
|
addNameJavaScript2Array(pointJavaScriptList, plot.getPointHotHyperLink()); |
|
|
|
|
|
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_Region_Map")), areaJavaScriptList, jsInfos); |
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_LineMap")), lineJavaScriptList, jsInfos); |
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(content, Toolkit.i18nText("Fine-Design_Chart_PointMap")), pointJavaScriptList, jsInfos); |
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_Region_Map")), areaJavaScriptList, jsInfos); |
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_LineMap")), lineJavaScriptList, jsInfos); |
|
|
|
|
addJSInfosFromNameJS(ShowValueUtils.getCustomMapContent(chartContent, Toolkit.i18nText("Fine-Design_Chart_PointMap")), pointJavaScriptList, jsInfos); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void addNameJavaScript2Array(List<NameJavaScript> nameJavaScriptArrayList, NameJavaScriptGroup nameJavaScriptGroup) { |
|
|
|
|