From fb8cf7ff382c348468cceb9ef8890fadc252c9d6 Mon Sep 17 00:00:00 2001 From: pioneer Date: Fri, 17 Mar 2023 14:56:46 +0800 Subject: [PATCH] open --- README.md | 3 + build.xml | 128 ++ plugin.xml | 28 + .../plugin/pielinecomb/PieLineCombChart.java | 913 +++++++++++++ .../PieLineCombChartLocaleFinder.java | 10 + .../pielinecomb/PieLineCombChartProvider.java | 11 + .../pielinecomb/PieLineCombChartUI.java | 55 + .../pielinecomb/PieLineCombTypePane.java | 38 + .../pielinecomb/comp/AbstractCustomChart.java | 181 +++ .../comp/CustomChartAxisButtonPane.java | 282 ++++ .../comp/CustomChartFillStylePane.java | 75 ++ .../comp/CustomColorSchemeComboBox.java | 45 + .../pielinecomb/comp/CustomFormatPane.java | 355 +++++ .../plugin/pielinecomb/comp/TextFormat.java | 26 + .../pielinecomb/comp/WebPageRender.java | 147 +++ .../data/AbstractMultiDataContentsPane.java | 139 ++ .../plugin/pielinecomb/data/CombDataPane.java | 68 + .../fr/plugin/pielinecomb/data/DataUtils.java | 67 + .../data/ExtendedMultiDataSet.java | 144 +++ .../pielinecomb/data/LineDataConfig.java | 83 ++ .../plugin/pielinecomb/data/LineDataPane.java | 110 ++ .../pielinecomb/data/LineReportDataPane.java | 62 + .../pielinecomb/data/LineTableDataPane.java | 69 + .../pielinecomb/data/PieDataConfig.java | 82 ++ .../plugin/pielinecomb/data/PieDataPane.java | 110 ++ .../pielinecomb/data/PieReportDataPane.java | 62 + .../pielinecomb/data/PieTableDataPane.java | 69 + src/com/fr/plugin/pielinecomb/images/comb.png | Bin 0 -> 3505 bytes src/com/fr/plugin/pielinecomb/images/demo.png | Bin 0 -> 32465 bytes src/com/fr/plugin/pielinecomb/images/icon.png | Bin 0 -> 3198 bytes src/com/fr/plugin/pielinecomb/images/line.png | Bin 0 -> 3849 bytes src/com/fr/plugin/pielinecomb/images/pie.png | Bin 0 -> 3018 bytes .../pielinecomb/locale/pielinecomb.properties | 107 ++ .../locale/pielinecomb_zh_CN.properties | 107 ++ .../pielinecomb/ui/BgGridCondCreator.java | 100 ++ .../pielinecomb/ui/BgGridCondListPane.java | 149 +++ .../pielinecomb/ui/LineCondListPane.java | 161 +++ .../pielinecomb/ui/LineLabelCondCreator.java | 148 +++ .../pielinecomb/ui/LineLabelStylePane.java | 202 +++ src/com/fr/plugin/pielinecomb/ui/MapUtil.java | 94 ++ .../pielinecomb/ui/PieCondListPane.java | 161 +++ .../pielinecomb/ui/PieLabelCondCreator.java | 148 +++ .../pielinecomb/ui/PieLabelStylePane.java | 215 ++++ .../ui/PieLineCombColorCondCreator.java | 158 +++ .../pielinecomb/ui/PieLineCombHyperLink.java | 60 + .../ui/PieLineCombLabelCondCreator.java | 193 +++ .../ui/PieLineCombStyleAnimalPane.java | 200 +++ .../ui/PieLineCombStyleAxisPane.java | 163 +++ .../ui/PieLineCombStyleAxisXPane.java | 296 +++++ .../ui/PieLineCombStyleAxisYPane.java | 363 ++++++ .../ui/PieLineCombStyleBgPane.java | 210 +++ .../ui/PieLineCombStyleLabelPane.java | 153 +++ .../ui/PieLineCombStyleLegendPane.java | 139 ++ .../pielinecomb/ui/PieLineCombStylePane.java | 42 + .../ui/PieLineCombStyleSeriesPane.java | 372 ++++++ .../ui/PieLineCombStyleTipsPane.java | 161 +++ .../ui/PieLineCombStyleTitlePane.java | 142 ++ .../ui/PieLineCombTipsCondCreator.java | 148 +++ .../pielinecomb/ui/PieLineTipsPane.java | 208 +++ .../ui/SeriesAxisRelaCondCreator.java | 190 +++ .../ui/SeriesAxisRelaCondListPane.java | 156 +++ .../fr/plugin/pielinecomb/vo/BgGridXJson.java | 14 + .../pielinecomb/vo/CustomJsonObject.java | 27 + .../pielinecomb/vo/HyperLinkObject.java | 119 ++ .../plugin/pielinecomb/vo/ItemColorJson.java | 14 + .../plugin/pielinecomb/vo/ItemLabelJson.java | 14 + .../plugin/pielinecomb/vo/ItemTipsJson.java | 14 + .../pielinecomb/vo/SeriesAxisRelaJson.java | 14 + .../web/PieLineCombChartWrapper.js | 1142 +++++++++++++++++ .../fr/plugin/pielinecomb/web/echarts.min.js | 19 + src/com/fr/plugin/pielinecomb/web/export.js | 102 ++ src/com/fr/plugin/pielinecomb/web/fr.js | 25 + src/com/fr/plugin/pielinecomb/web/jquery.js | 2 + 73 files changed, 9814 insertions(+) create mode 100644 README.md create mode 100644 build.xml create mode 100644 plugin.xml create mode 100644 src/com/fr/plugin/pielinecomb/PieLineCombChart.java create mode 100644 src/com/fr/plugin/pielinecomb/PieLineCombChartLocaleFinder.java create mode 100644 src/com/fr/plugin/pielinecomb/PieLineCombChartProvider.java create mode 100644 src/com/fr/plugin/pielinecomb/PieLineCombChartUI.java create mode 100644 src/com/fr/plugin/pielinecomb/PieLineCombTypePane.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/AbstractCustomChart.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/CustomChartAxisButtonPane.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/CustomChartFillStylePane.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/CustomColorSchemeComboBox.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/CustomFormatPane.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/TextFormat.java create mode 100644 src/com/fr/plugin/pielinecomb/comp/WebPageRender.java create mode 100644 src/com/fr/plugin/pielinecomb/data/AbstractMultiDataContentsPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/CombDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/DataUtils.java create mode 100644 src/com/fr/plugin/pielinecomb/data/ExtendedMultiDataSet.java create mode 100644 src/com/fr/plugin/pielinecomb/data/LineDataConfig.java create mode 100644 src/com/fr/plugin/pielinecomb/data/LineDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/LineReportDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/LineTableDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/PieDataConfig.java create mode 100644 src/com/fr/plugin/pielinecomb/data/PieDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/PieReportDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/data/PieTableDataPane.java create mode 100644 src/com/fr/plugin/pielinecomb/images/comb.png create mode 100644 src/com/fr/plugin/pielinecomb/images/demo.png create mode 100644 src/com/fr/plugin/pielinecomb/images/icon.png create mode 100644 src/com/fr/plugin/pielinecomb/images/line.png create mode 100644 src/com/fr/plugin/pielinecomb/images/pie.png create mode 100644 src/com/fr/plugin/pielinecomb/locale/pielinecomb.properties create mode 100644 src/com/fr/plugin/pielinecomb/locale/pielinecomb_zh_CN.properties create mode 100644 src/com/fr/plugin/pielinecomb/ui/BgGridCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/BgGridCondListPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/LineCondListPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/LineLabelCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/LineLabelStylePane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/MapUtil.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieCondListPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLabelCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLabelStylePane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombColorCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombHyperLink.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombLabelCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAnimalPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisXPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisYPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleBgPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLabelPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLegendPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStylePane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleSeriesPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTipsPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTitlePane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineCombTipsCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/PieLineTipsPane.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondCreator.java create mode 100644 src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondListPane.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/BgGridXJson.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/CustomJsonObject.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/HyperLinkObject.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/ItemColorJson.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/ItemLabelJson.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/ItemTipsJson.java create mode 100644 src/com/fr/plugin/pielinecomb/vo/SeriesAxisRelaJson.java create mode 100644 src/com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js create mode 100644 src/com/fr/plugin/pielinecomb/web/echarts.min.js create mode 100644 src/com/fr/plugin/pielinecomb/web/export.js create mode 100644 src/com/fr/plugin/pielinecomb/web/fr.js create mode 100644 src/com/fr/plugin/pielinecomb/web/jquery.js diff --git a/README.md b/README.md new file mode 100644 index 0000000..21cfd78 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# JSD-10123 + +JSD-10123:微众银行产品需求汇总 \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..1ec7df7 --- /dev/null +++ b/build.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..785a7c5 --- /dev/null +++ b/plugin.xml @@ -0,0 +1,28 @@ + + + com.fr.plugin.pielinecomb + com.fr.plugin.pielinecomb.v10 + + yes + 1.0.3 + 10.0~11.0 + 2021-04-24 + xiaobaosuccess + 柱形折线组合图_定制_EK

]]>
+ [2022-10-18]开发1.0版本

]]>
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/PieLineCombChart.java b/src/com/fr/plugin/pielinecomb/PieLineCombChart.java new file mode 100644 index 0000000..ba55c60 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/PieLineCombChart.java @@ -0,0 +1,913 @@ +package com.fr.plugin.pielinecomb; + +import com.bulenkov.iconloader.util.Base64Converter; +import com.fr.base.Base64; +import com.fr.base.BaseFormula; +import com.fr.data.core.FormatField; +import com.fr.extended.chart.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.xml.GeneralXMLTools; +import com.fr.js.NameJavaScriptGroup; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.pielinecomb.comp.AbstractCustomChart; +import com.fr.plugin.pielinecomb.comp.WebPageRender; +import com.fr.plugin.pielinecomb.data.DataUtils; +import com.fr.plugin.pielinecomb.data.LineDataConfig; +import com.fr.plugin.pielinecomb.data.PieDataConfig; +import com.fr.plugin.pielinecomb.vo.HyperLinkObject; +import com.fr.plugin.transform.ExecuteFunctionRecord; +import com.fr.plugin.transform.FunctionRecorder; +import com.fr.script.Calculator; +import com.fr.stable.AssistUtils; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.web.Repository; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +import java.awt.image.BufferedImage; +import java.io.UnsupportedEncodingException; +import java.math.RoundingMode; +import java.text.Format; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author duan.jingliang + * @date 2022/8/19 + */ +@FunctionRecorder +public class PieLineCombChart extends AbstractCustomChart { + + private static final String ID = "PieLineCombChart"; + private static final String NAME = "柱形折线组合图_定制_EK"; + + private static String BASE64_CHART_IMG = ""; + + /** + * 图表类型 + * */ + private int chartType; + /** + * 数据集类型 + * */ + private String dataType; + + public static String PIE_DATA = "PieData"; + public static String LINE_DATA = "LineData"; + + private JSONObject titleConf; + private JSONObject legendConf; + private JSONObject labelConf; + private JSONObject seriesConf; + private JSONObject axisConf; + private JSONObject tipsConf; + private JSONObject bgConf; + + private JSONObject styleCond; + private HyperLinkObject linkConf; + + private StringFormula titleName; + + @Override + protected String getChartID() { + return ID; + } + + @Override + public String getChartName() { + return NAME; + } + + @ExecuteFunctionRecord + @Override + protected void addJSON(AbstractDataConfig dataConfig, JSONObject jsonObject, Repository repository, JSONPara jsonPara) throws JSONException { + + //Format format = getDataFormat(getAxisConf().getInt("xformattype"), getAxisConf().getString("xformatstr")); + //String k = format.format(35666.666666D); + + JSONObject title = getTitleConf(); + title.put("titlename", this.titleName.getResult()); + + jsonObject.put("titleConf", title); + jsonObject.put("legendConf", getLegendConf()); + jsonObject.put("labelConf", getLabelConf()); + jsonObject.put("seriesConf", getSeriesConf()); + jsonObject.put("axisConf", getAxisConf()); + jsonObject.put("tipsConf", getTipsConf()); + jsonObject.put("bgConf", getBgConf()); + jsonObject.put("styleCond", getStyleCond()); + + addAutoLinkJSON(jsonObject, jsonPara); + + jsonObject.put("data", makeChartData()); + } + + private JSONObject makeChartData() { + + PieDataConfig pieData = DataUtils.getDataConfig(PieLineCombChart.PIE_DATA, this); + LineDataConfig lineData = DataUtils.getDataConfig(PieLineCombChart.LINE_DATA, this); + + JSONObject jsonObject = JSONObject.create(); + if (chartType == 0) { + JSONObject pieDataConf = makeSingleData(pieData, "pie"); + JSONArray pieAxisXData = pieDataConf.getJSONArray("xAxisData"); + JSONArray pieAxisXLabelData = JSONArray.create(); + for (int i = 0; i < pieAxisXData.size(); i++) { + Format format = getDataFormat(getAxisConf().getInt("xformattype"), getAxisConf().getString("xformatstr")); + try { + String label = format.format(pieAxisXData.get(i)); + pieAxisXLabelData.put(label); + } catch (Exception e) { + e.printStackTrace(); + pieAxisXLabelData.put(pieAxisXData.get(i)); + } + } + pieDataConf.put("xAxisLabelData", pieAxisXLabelData); + jsonObject.put("pie", pieDataConf); + } else if (chartType == 1) { + JSONObject pieDataConf = makeSingleData(lineData, "line"); + JSONArray pieAxisXData = pieDataConf.getJSONArray("xAxisData"); + JSONArray pieAxisXLabelData = JSONArray.create(); + for (int i = 0; i < pieAxisXData.size(); i++) { + Format format = getDataFormat(getAxisConf().getInt("xformattype"), getAxisConf().getString("xformatstr")); + try { + String label = format.format(pieAxisXData.get(i)); + pieAxisXLabelData.put(label); + } catch (Exception e) { + e.printStackTrace(); + pieAxisXLabelData.put(pieAxisXData.get(i)); + } + } + pieDataConf.put("xAxisLabelData", pieAxisXLabelData); + jsonObject.put("line", pieDataConf); + } else { + JSONObject pieDataConf = makeSingleData(pieData, "pie"); + JSONArray pieAxisXData = pieDataConf.getJSONArray("xAxisData"); + JSONArray pieAxisXLabelData = JSONArray.create(); + for (int i = 0; i < pieAxisXData.size(); i++) { + Format format = getDataFormat(getAxisConf().getInt("xformattype"), getAxisConf().getString("xformatstr")); + try { + String label = format.format(pieAxisXData.get(i)); + pieAxisXLabelData.put(label); + } catch (Exception e) { + FineLoggerFactory.getLogger().warn("Data Format error!"); + pieAxisXLabelData.put(pieAxisXData.get(i)); + } + } + pieDataConf.put("xAxisLabelData", pieAxisXLabelData); + jsonObject.put("pie", pieDataConf); + + pieDataConf = makeSingleData(lineData, "line"); + pieAxisXData = pieDataConf.getJSONArray("xAxisData"); + pieAxisXLabelData = JSONArray.create(); + for (int i = 0; i < pieAxisXData.size(); i++) { + Format format = getDataFormat(getAxisConf().getJSONObject("axisX").getInt("xformattype"), getAxisConf().getJSONObject("axisX").getString("xformatstr")); + try { + String label = format.format(pieAxisXData.get(i)); + pieAxisXLabelData.put(label); + } catch (Exception e) { + e.printStackTrace(); + pieAxisXLabelData.put(pieAxisXData.get(i)); + } + } + pieDataConf.put("xAxisLabelData", pieAxisXLabelData); + jsonObject.put("line", pieDataConf); + } + + return jsonObject; + } + + private JSONObject makeSingleData(AbstractDataConfig dataConfig, String dataName) { + JSONObject jsonObject = JSONObject.create(); + boolean isCustomName = false; + ExtendedField categoryField = null; + ExtendedField gridLineField = null; + ExtendedField regionColorField = null; + List customList = null; + ExtendedField customName = null; + ExtendedField customValue = null; + + if ("pie".equals(dataName)) { + PieDataConfig pieData = (PieDataConfig)dataConfig; + isCustomName = pieData.isCustomName(); + categoryField = pieData.getCategory(); + gridLineField = pieData.getGridline(); + regionColorField = pieData.getRegioncolor(); + customList = pieData.getCustomFields(); + customName = pieData.getCustomNameField(); + customValue = pieData.getCustomValueField(); + } else if ("line".equals(dataName)) { + LineDataConfig lineData = (LineDataConfig)dataConfig; + isCustomName = lineData.isCustomName(); + categoryField = lineData.getCategory(); + gridLineField = lineData.getGridline(); + regionColorField = lineData.getRegioncolor(); + customList = lineData.getCustomFields(); + customName = lineData.getCustomNameField(); + customValue = lineData.getCustomValueField(); + } + if (isCustomName) { + if (null != customList && customList.size() > 0) { + JSONObject seriesObj = JSONObject.create(); + JSONObject seriesObjIdx = JSONObject.create(); + JSONArray gridLineData = JSONArray.create(); + JSONObject regionColorData = JSONObject.create(); + for (int i = 0; i < customList.size(); i++) { + ExtendedField customField = customList.get(i); + List categorys = categoryField.getValues(); + List values = customField.getValues(); + List gridLines = null == gridLineField ? null : gridLineField.getValues(); + List regionColors = null == regionColorField ? null : regionColorField.getValues(); + JSONArray seriesData = JSONArray.create(); + int subEndIdx = customList.get(0).getValues().size(); + for (int k = 0; k < subEndIdx; k++) { + JSONArray seriesItem = JSONArray.create(); + seriesItem.put(categorys.get(k)); + seriesItem.put(values.get(k)); + seriesData.put(seriesItem); + if (i == 0 && null != gridLines && null != gridLines.get(k) + && StringUtils.isNotEmpty(gridLines.get(k).toString())) { + gridLineData.put(categorys.get(k)); + } + if (i == 0 && null != regionColors && null != regionColors.get(k) + && StringUtils.isNotEmpty(regionColors.get(k).toString())) { + regionColorData.put(categorys.get(k).toString(), regionColors.get(k)); + } + } + seriesObj.put(customField.getCustomName(), seriesData); + seriesObjIdx.put(customField.getCustomName(), i); + } + int subEndIdx = customList.get(0).getValues().size(); + jsonObject.put("xAxisData", JSONArray.create(categoryField.getValues().subList(0, subEndIdx))); + jsonObject.put("gridLine", gridLineData); + jsonObject.put("regionColor", regionColorData); + jsonObject.put("seriesData", seriesObj); + jsonObject.put("seriesIndex", seriesObjIdx); + } + } else { + List category = categoryField.getValues(); + List gridLine = null == gridLineField ? null : gridLineField.getValues(); + List regionColor = null == regionColorField ? null : regionColorField.getValues(); + List name = customName.getValues(); + List value = customValue.getValues(); + if (null != category && category.size() > 0) { + JSONObject seriesObj = JSONObject.create(); + JSONObject seriesObjIdx = JSONObject.create(); + if (null != name && name.size() > 0) { + // 用字段值 + List categoryNoDup = category.stream().distinct().collect(Collectors.toList()); + List nameNoDup = name.stream().distinct().collect(Collectors.toList()); + if (nameNoDup.size() > 1) { + // 多系列 + JSONArray gridLineData = JSONArray.create(); + JSONObject regionColorData = JSONObject.create(); + for (int i = 0; i < nameNoDup.size(); i++) { + JSONArray tmpSeries = JSONArray.create(); + for (int j = 0; j 0 && value.size() == category.size()) { + + JSONArray seriesData = JSONArray.create(); + JSONArray gridLineData = JSONArray.create(); + JSONObject regionColorData = JSONObject.create(); + for (int k = 0; k < category.size(); k++) { + JSONArray seriesItem = JSONArray.create(); + seriesItem.put(category.get(k)); + seriesItem.put(value.get(k)); + seriesData.put(seriesItem); + + if (null != gridLine && null != gridLine.get(k) + && StringUtils.isNotEmpty(gridLine.get(k).toString())) { + gridLineData.put(category.get(k)); + } + if (null != regionColor && null != regionColor.get(k) + && StringUtils.isNotEmpty(regionColor.get(k).toString())) { + regionColorData.put(category.get(k).toString(), regionColor.get(k)); + } + } + seriesObj.put("default", seriesData); + seriesObjIdx.put("default", 0); + jsonObject.put("xAxisData", JSONArray.create(category)); + jsonObject.put("gridLine", gridLineData); + jsonObject.put("regionColor", regionColorData); + jsonObject.put("seriesData", seriesObj); + jsonObject.put("seriesIndex", seriesObjIdx); + } else { + FineLoggerFactory.getLogger().error("PieLineCombChart data config error!"); + } + } + } + return jsonObject; + } + + @Override + protected BufferedImage getChartImage(Calculator cal, int width, int height) { + BufferedImage image = null; + try { + synchronized (this) { + + JSONObject jsonObject = JSONObject.create(); + + jsonObject.put("data", makeChartData()); + + jsonObject.put("titleConf", getTitleConf()); + jsonObject.put("legendConf", getLegendConf()); + jsonObject.put("labelConf", getLabelConf()); + jsonObject.put("seriesConf", getSeriesConf()); + jsonObject.put("axisConf", getAxisConf()); + jsonObject.put("tipsConf", getTipsConf()); + jsonObject.put("bgConf", getBgConf()); + jsonObject.put("styleCond", getStyleCond()); + + if (StringUtils.isNotEmpty(BASE64_CHART_IMG) && !WebPageRender.getInstance().isDataChanged(jsonObject)) { + image = (BufferedImage) GeneralXMLTools.imageDecode(Base64Converter.decode(BASE64_CHART_IMG.getBytes())); + } else { + String imgStr = WebPageRender.getInstance().makeChartImage(jsonObject, width, height); + if (StringUtils.isNotEmpty(imgStr)) { + BASE64_CHART_IMG = imgStr; + image = (BufferedImage) GeneralXMLTools.imageDecode(Base64Converter.decode(imgStr.getBytes())); + } else { + image = super.getDemoImage(); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + image = super.getDemoImage(); + } + return image; + } + + @Override + protected String[] requiredJS() { + return new String[]{ + "com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js" + }; + } + + @Override + protected String wrapperName() { + return "PieLineCombChartWrapper"; + } + + private void addAutoLinkJSON(JSONObject paramJSONObject, JSONPara paramAbstractChart) + throws JSONException { + if (null != this.getLinkConf()) { + NameJavaScriptGroup pieNameGroup = this.getLinkConf().getNameJavaScriptGroup(HyperLinkObject.CHART_TYPE_PIE); + if (null != pieNameGroup) { + ToHyperlinkJSONHelper.addECNameToLinkGroup(paramAbstractChart.ecName, paramAbstractChart.sheetIndex, pieNameGroup); + paramJSONObject.put(HyperLinkObject.CHART_TYPE_PIE, ToHyperlinkJSONHelper.addAutoLinkJSON(pieNameGroup, hyperLinkParas())); + } + + NameJavaScriptGroup lineNameGroup = this.getLinkConf().getNameJavaScriptGroup(HyperLinkObject.CHART_TYPE_LINE); + if (null != lineNameGroup) { + ToHyperlinkJSONHelper.addECNameToLinkGroup(paramAbstractChart.ecName, paramAbstractChart.sheetIndex, lineNameGroup); + paramJSONObject.put(HyperLinkObject.CHART_TYPE_LINE, ToHyperlinkJSONHelper.addAutoLinkJSON(lineNameGroup, hyperLinkParas())); + } + } + } + + @Override + public NameJavaScriptGroup getHotHyperlink(String s) { + return this.getLinkConf().getNameJavaScriptGroup(s); + } + + @Override + protected HyperLinkPara[] hyperLinkParas() { + return new HyperLinkPara[]{ + new HyperLinkPara() { + @Override + public String getName() { + return "分类名"; + } + + @Override + public String getFormulaContent() { + return "CATEGORY"; + } + + @Override + public String[] getProps() { + return new String[]{"category"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "系列名"; + } + + @Override + public String getFormulaContent() { + return "SERIES"; + } + + @Override + public String[] getProps() { + return new String[]{"series"}; + } + }, + new HyperLinkPara() { + @Override + public String getName() { + return "数值"; + } + + @Override + public String getFormulaContent() { + return "VALUE"; + } + + @Override + public String[] getProps() { + return new String[]{"value"}; + } + } + }; + } + + @Override + protected void readAttr(XMLableReader xmLableReader) { + super.readAttr(xmLableReader); + this.chartType = xmLableReader.getAttrAsInt("chartType", 0); + String jsonStr = xmLableReader.getAttrAsString("dataType", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setDataType(jsonStr); + } + + jsonStr = xmLableReader.getAttrAsString("titleConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setTitleConf(new JSONObject(jsonStr)); + } + + jsonStr = xmLableReader.getAttrAsString("legendConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setLegendConf(new JSONObject(jsonStr)); + } + + jsonStr = xmLableReader.getAttrAsString("labelConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setLabelConf(new JSONObject(jsonStr)); + } + + jsonStr = xmLableReader.getAttrAsString("seriesConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setSeriesConf(new JSONObject(jsonStr)); + } + + try { + jsonStr = xmLableReader.getAttrAsString("axisConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setAxisConf(new JSONObject(new String(Base64.decode(jsonStr), "UTF-8"))); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().warn(e.getMessage(), e); + } + + jsonStr = xmLableReader.getAttrAsString("tipsConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setTipsConf(new JSONObject(jsonStr)); + } + + jsonStr = xmLableReader.getAttrAsString("bgConf", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setBgConf(new JSONObject(jsonStr)); + } + + try { + jsonStr = xmLableReader.getAttrAsString("styleCond", ""); + if (StringUtils.isNotEmpty(jsonStr)) { + this.setStyleCond(new JSONObject(new String(Base64.decode(jsonStr), "UTF-8"))); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().warn(e.getMessage(), e); + } + + if (null == linkConf) { + linkConf = (HyperLinkObject) xmLableReader.readXMLObject(new HyperLinkObject()); + } + + this.titleName = new StringFormula(this.getTitleConf().getString("titlename")); + } + + @Override + protected void writeAttr(XMLPrintWriter xmlPrintWriter) { + super.writeAttr(xmlPrintWriter); + xmlPrintWriter.attr("chartType", chartType); + if (null != dataType) { + xmlPrintWriter.attr("dataType", dataType); + } + if (null != titleConf) { + xmlPrintWriter.attr("titleConf", titleConf.toString()); + } + if (null != legendConf) { + xmlPrintWriter.attr("legendConf", legendConf.toString()); + } + if (null != labelConf) { + xmlPrintWriter.attr("labelConf", labelConf.toString()); + } + if (null != seriesConf) { + xmlPrintWriter.attr("seriesConf", seriesConf.toString()); + } + if (null != axisConf) { + try { + xmlPrintWriter.attr("axisConf", Base64.encode(axisConf.toString().getBytes("UTF-8"))); + } catch (Exception e) { + FineLoggerFactory.getLogger().warn(e.getMessage(), e); + } + } + if (null != tipsConf) { + xmlPrintWriter.attr("tipsConf", tipsConf.toString()); + } + if (null != bgConf) { + xmlPrintWriter.attr("bgConf", bgConf.toString()); + } + + if (null != styleCond) { + try { + xmlPrintWriter.attr("styleCond", Base64.encode(styleCond.toString().getBytes("UTF-8"))); + } catch (Exception e) { + FineLoggerFactory.getLogger().warn(e.getMessage(), e); + } + } + + if (null != linkConf) { + linkConf.writeXML(xmlPrintWriter); + } + } + + @Override + public boolean equals(Object o) { + boolean isEq = super.equals(o) + && o instanceof PieLineCombChart + && ComparatorUtils.equals(((PieLineCombChart) o).getDataType(), this.dataType) + && ComparatorUtils.equals(((PieLineCombChart) o).getChartType(), this.chartType) + && ComparatorUtils.equals(((PieLineCombChart) o).getTitleConf(), this.titleConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getLegendConf(), this.legendConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getLabelConf(), this.labelConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getSeriesConf(), this.seriesConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getAxisConf(), this.axisConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getTipsConf(), this.tipsConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getBgConf(), this.bgConf) + && ComparatorUtils.equals(((PieLineCombChart) o).getStyleCond(), this.styleCond) + && ComparatorUtils.equals(((PieLineCombChart) o).getLinkConf(), this.linkConf) + ; + return isEq; + } + + @Override + public int hashCode() { + return super.hashCode() + AssistUtils.hashCode(new Object[]{this.dataType, this.chartType, this.titleConf, this.legendConf, this.labelConf, this.seriesConf, this.axisConf, this.tipsConf, this.bgConf, this.styleCond, this.linkConf}); + } + + @Override + public PieLineCombChart clone() throws CloneNotSupportedException { + PieLineCombChart chart = (PieLineCombChart)super.clone(); + if (this.linkConf != null) { + chart.setLinkConf((HyperLinkObject) this.getLinkConf().clone()); + } + return chart; + } + + @Override + protected List formulas() { + List formulaList = new ArrayList(); + formulaList.add(this.titleName); + return formulaList; + } + + @Override + protected String demoImagePath() { + return "com/fr/plugin/pielinecomb/images/demo.png"; + } + + public Format getDataFormat(Integer type, String formatStr) { + if (type == 7) { + return FormatField.getInstance().getFormat(type, formatStr); + } else if (StringUtils.isNotEmpty(formatStr)) { + return FormatField.getInstance().getFormat(type, formatStr, RoundingMode.HALF_EVEN); + } else { + return null; + } + } + + public int getChartType() { + return chartType; + } + + public void setChartType(int chartType) { + this.chartType = chartType; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public JSONObject getTitleConf() { + if (null == titleConf) { + titleConf = new JSONObject(); + titleConf.put("titlevisiable", true); + titleConf.put("titlename", "组合图"); + titleConf.put("titleposition", 0); + titleConf.put("titlesize", 16); + titleConf.put("titlestyle", 1); + titleConf.put("titlefamily", "微软雅黑"); + titleConf.put("titlecolor", "#333300"); + titleConf.put("titlebgcolor", "transparent"); + titleConf.put("titleBgOpacity", 100); + } + return titleConf; + } + + public void setTitleConf(JSONObject titleConf) { + this.titleConf = titleConf; + } + + public JSONObject getLegendConf() { + if (null == legendConf) { + legendConf = new JSONObject(); + legendConf.put("legendalignment", 4); + legendConf.put("legendcolor", "#000000"); + legendConf.put("legendfamily", "微软雅黑"); + legendConf.put("legendmargin", 20); + legendConf.put("legendposition", 1); + legendConf.put("legendsize", 12); + legendConf.put("legendstyle", 0); + legendConf.put("showlegend", true); + } + return legendConf; + } + + public void setLegendConf(JSONObject legendConf) { + this.legendConf = legendConf; + } + + public JSONObject getLabelConf() { + if (null == labelConf) { + labelConf = new JSONObject(); + labelConf.put("chartType", 1); + labelConf.put("lineJsPane", ""); + labelConf.put("linePosition", "top"); + labelConf.put("lineValueType", 1); + labelConf.put("linelabelcolor", "#000000"); + labelConf.put("linelabelfamily", "微软雅黑"); + labelConf.put("linelabelsize", 12); + labelConf.put("linelabelstyle", 0); + labelConf.put("pieDirection", 0); + labelConf.put("pieJsPane", "return this.data[1]"); + labelConf.put("piePosition", "insideTop"); + labelConf.put("pieValueType", 1); + labelConf.put("pielabelcolor", "#000000"); + labelConf.put("pielabelfamily", "微软雅黑"); + labelConf.put("pielabelsize", 12); + labelConf.put("pielabelstyle", 0); + labelConf.put("showLineCategory", false); + labelConf.put("showLineLabel", true); + labelConf.put("showLineSeries", false); + labelConf.put("showLineValue", true); + labelConf.put("showPieCategory", false); + labelConf.put("showPieLabel", true); + labelConf.put("showPieSeries", false); + labelConf.put("showPieValue", true); + } + return labelConf; + } + + public void setLabelConf(JSONObject labelConf) { + this.labelConf = labelConf; + } + + public JSONObject getSeriesConf() { + if (null == seriesConf) { + seriesConf = new JSONObject(); + seriesConf.put("chartType", 2); + seriesConf.put("lineCornerColor", "#ffff00"); + seriesConf.put("lineCornerColorType", "系列色"); + seriesConf.put("lineCornerRadius", 10); + seriesConf.put("lineCornerShape", "默认"); + seriesConf.put("lineCornerType", 0); + seriesConf.put("lineType", "solid"); + seriesConf.put("lineWidth", 1); + seriesConf.put("pieFixWidth", 10); + seriesConf.put("pieSeriesGapWidth", 30); + seriesConf.put("pieWidthType", 1); + seriesConf.put("seriesColorCustom", true); + seriesConf.put("seriesColorList", "#63b2ee|#76da91|#f8cb7f|#f89588|#7cd6cf|#9192ab|#7898e1|#efa666|#eddd86|#9987ce"); + seriesConf.put("seriesColorName", ""); + } + return seriesConf; + } + + public void setSeriesConf(JSONObject seriesConf) { + this.seriesConf = seriesConf; + } + + public JSONObject getAxisConf() { + if (null == axisConf) { + axisConf = new JSONObject(); + JSONObject axisX = JSONObject.create(); + axisX.put("axisName", "X轴"); + axisX.put("isLabelVisiable", true); + axisX.put("isTitleVisiable", true); + axisX.put("labelFormatType", 1); + axisX.put("labelJsPane", ""); + axisX.put("labelRotation", 0); + axisX.put("labelcolor", "#000000"); + axisX.put("labelfamily", "微软雅黑"); + axisX.put("labelsize", 12); + axisX.put("labelstyle", 0); + axisX.put("titleAlignment", 4); + axisX.put("titleName", "分类"); + axisX.put("titleRotation", 0); + axisX.put("titlecolor", "#000000"); + axisX.put("titlefamily", "微软雅黑"); + axisX.put("titlesize", 12); + axisX.put("titlestyle", 0); + axisX.put("xformatstr", ""); + axisX.put("xformattype", 7); + axisConf.put("axisX", axisX); + + JSONArray axisYList = JSONArray.create(); + JSONObject axisY = JSONObject.create(); + axisY.put("axisName", "Y轴"); + axisY.put("intervalValue", ""); + axisY.put("isLabelVisiable", true); + axisY.put("isTitleVisiable", true); + axisY.put("labelFormatType", 1); + axisY.put("labelJsPane", "return this.value;"); + axisY.put("labelRotation", 0); + axisY.put("labelcolor", "#000000"); + axisY.put("labelfamily", "微软雅黑"); + axisY.put("labelsize", 12); + axisY.put("labelstyle", 0); + axisY.put("maxValue", ""); + axisY.put("minValue", ""); + axisY.put("position", "left"); + axisY.put("showInterval", false); + axisY.put("showMaxValue", false); + axisY.put("showMinValue", false); + axisY.put("titleAlignment", 2); + axisY.put("titleName", "数量"); + axisY.put("titleRotation", 0); + axisY.put("titlecolor", "#000000"); + axisY.put("titlefamily", "微软雅黑"); + axisY.put("titlesize", 12); + axisY.put("titlestyle", 0); + axisY.put("yformatstr", "#0"); + axisY.put("yformattype", 1); + axisYList.put(axisY); + axisConf.put("axisY", axisYList); + } + return axisConf; + } + + public void setAxisConf(JSONObject axisConf) { + this.axisConf = axisConf; + } + + public JSONObject getTipsConf() { + if (null == tipsConf) { + tipsConf = JSONObject.create(); + tipsConf.put("chartType", 1); + JSONObject pie = JSONObject.create(); + pie.put("bgColor", "#000000"); + pie.put("bgOpacity", 35); + pie.put("jsPane", ""); + pie.put("showCategory", true); + pie.put("showSeries", true); + pie.put("showTip", true); + pie.put("showValue", true); + pie.put("tipcolor", "#ffffff"); + pie.put("tipfamily", "微软雅黑"); + pie.put("tipsize", 12); + pie.put("tipstyle", 0); + pie.put("valueType", 1); + tipsConf.put("pie", pie); + + JSONObject line = JSONObject.create(); + line.put("bgColor", "#000000"); + line.put("bgOpacity", 30); + line.put("jsPane", "0"); + line.put("showCategory", false); + line.put("showSeries", true); + line.put("showTip", true); + line.put("showValue", true); + line.put("tipcolor", "#ffff00"); + line.put("tipfamily", "微软雅黑"); + line.put("tipsize", 12); + line.put("tipstyle", 0); + line.put("valueType", 1); + tipsConf.put("line", line); + } + return tipsConf; + } + + public void setTipsConf(JSONObject tipsConf) { + this.tipsConf = tipsConf; + } + + public JSONObject getBgConf() { + if (bgConf == null) { + bgConf = JSONObject.create(); + bgConf.put("bgColor", "#ffffff"); + bgConf.put("bgOpacity", 100); + bgConf.put("chartType", 1); + bgConf.put("fixHeight", 0); + bgConf.put("gridXColor", "#c0c0c0"); + bgConf.put("gridXColorCustom", false); + bgConf.put("gridXColorList", "#2474a9|#97d1f7|#ef6c6c|#f9cd76|#6691e9|#7adbc8|#8861c3|#ffaec8|#936c61|#e4d354|#1d9992|#9ccc66"); + bgConf.put("gridXColorName", "热情"); + bgConf.put("gridYColor", "#c0c0c0"); + } + return bgConf; + } + + public void setBgConf(JSONObject bgConf) { + this.bgConf = bgConf; + } + + public JSONObject getStyleCond() { + if (null == styleCond) { + styleCond = JSONObject.create(); + } + return styleCond; + } + + public void setStyleCond(JSONObject styleCond) { + this.styleCond = styleCond; + } + + public HyperLinkObject getLinkConf() { + return linkConf; + } + + public void setLinkConf(HyperLinkObject linkConf) { + this.linkConf = linkConf; + } +} diff --git a/src/com/fr/plugin/pielinecomb/PieLineCombChartLocaleFinder.java b/src/com/fr/plugin/pielinecomb/PieLineCombChartLocaleFinder.java new file mode 100644 index 0000000..156bf5a --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/PieLineCombChartLocaleFinder.java @@ -0,0 +1,10 @@ +package com.fr.plugin.pielinecomb; + +import com.fr.stable.fun.impl.AbstractLocaleFinder; + +public class PieLineCombChartLocaleFinder extends AbstractLocaleFinder { + @Override + public String find() { + return "com/fr/plugin/pielinecomb/locale/pielinecomb"; + } +} diff --git a/src/com/fr/plugin/pielinecomb/PieLineCombChartProvider.java b/src/com/fr/plugin/pielinecomb/PieLineCombChartProvider.java new file mode 100644 index 0000000..1d9dbd2 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/PieLineCombChartProvider.java @@ -0,0 +1,11 @@ +package com.fr.plugin.pielinecomb; + +import com.fr.extended.chart.AbstractChart; +import com.fr.extended.chart.AbstractExtentChartProvider; + +public class PieLineCombChartProvider extends AbstractExtentChartProvider { + @Override + protected AbstractChart createChart() { + return new PieLineCombChart(); + } +} diff --git a/src/com/fr/plugin/pielinecomb/PieLineCombChartUI.java b/src/com/fr/plugin/pielinecomb/PieLineCombChartUI.java new file mode 100644 index 0000000..c636830 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/PieLineCombChartUI.java @@ -0,0 +1,55 @@ +package com.fr.plugin.pielinecomb; + +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.extended.chart.AbstractExtendedChartTableDataPane; +import com.fr.extended.chart.AbstractExtendedChartUIProvider; +import com.fr.plugin.pielinecomb.data.CombDataPane; +import com.fr.plugin.pielinecomb.ui.PieLineCombStylePane; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class PieLineCombChartUI extends AbstractExtendedChartUIProvider { + + @Override + public ChartDataPane getChartDataPane(AttributeChangeListener attributeChangeListener) { + return new CombDataPane(attributeChangeListener); + } + + @Override + protected AbstractExtendedChartTableDataPane getTableDataSourcePane() { + return null; + } + + @Override + protected AbstractReportDataContentPane getReportDataSourcePane() { + return null; + } + + @Override + public String getIconPath() { + return "com/fr/plugin/pielinecomb/images/icon.png"; + } + + @Override + public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener attributeChangeListener) { + return new AbstractChartAttrPane[]{ + new PieLineCombStylePane(attributeChangeListener) + }; + } + + @Override + public String[] getDemoImagePath() { + return new String[]{"com/fr/plugin/pielinecomb/images/demo.png"}; + } + + @Override + public AbstractChartTypePane getPlotTypePane() { + return new PieLineCombTypePane(); + } +} diff --git a/src/com/fr/plugin/pielinecomb/PieLineCombTypePane.java b/src/com/fr/plugin/pielinecomb/PieLineCombTypePane.java new file mode 100644 index 0000000..aba995c --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/PieLineCombTypePane.java @@ -0,0 +1,38 @@ +package com.fr.plugin.pielinecomb; + +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.ExtendedTypePane; + +/** + * @author duan.jingliang + * @date 2022/10/17 + */ +public class PieLineCombTypePane extends ExtendedTypePane { + @Override + protected String[] getTypeIconPath() { + return new String[]{ + "com/fr/plugin/pielinecomb/images/pie.png", + "com/fr/plugin/pielinecomb/images/line.png", + "com/fr/plugin/pielinecomb/images/comb.png" + }; + } + + @Override + protected String[] getTypeTipName() { + return new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline"), + Toolkit.i18nText("Plugin-Pielinecomb-Typecomb") + }; + } + + @Override + protected int getTypeIndex(PieLineCombChart pieLineCombChart) { + return pieLineCombChart.getChartType(); + } + + @Override + protected void setType(PieLineCombChart pieLineCombChart, int i) { + pieLineCombChart.setChartType(i); + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/AbstractCustomChart.java b/src/com/fr/plugin/pielinecomb/comp/AbstractCustomChart.java new file mode 100644 index 0000000..b76c82f --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/AbstractCustomChart.java @@ -0,0 +1,181 @@ +package com.fr.plugin.pielinecomb.comp; + +import com.fr.base.DeprecatedChartWebUtils; +import com.fr.base.GraphHelper; +import com.fr.base.chart.chartdata.CallbackEvent; +import com.fr.base.chart.chartdata.ChartData; +import com.fr.base.chart.result.WebChartType; +import com.fr.chart.ChartWebPara; +import com.fr.chart.chartattr.ChartsPlot; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.chart.chartglyph.ChartGlyph; +import com.fr.extended.chart.AbstractChart; +import com.fr.extended.chart.AbstractDataConfig; +import com.fr.extended.chart.ToHyperlinkJSONHelper; +import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; +import com.fr.js.NameJavaScriptGroup; +import com.fr.json.JSON; +import com.fr.json.JSONException; +import com.fr.json.JSONFactory; +import com.fr.json.JSONObject; +import com.fr.plugin.chart.ToJSONHelper; +import com.fr.plugin.chart.vanchart.VanChartGlyph; +import com.fr.script.Calculator; +import com.fr.stable.CoreGraphHelper; +import com.fr.stable.web.Repository; + +import java.awt.*; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; +import java.util.HashMap; +import java.util.Map; + +/** + * @author + * @date 2022/11/2 + */ +public abstract class AbstractCustomChart extends AbstractChart { + + private static transient Map demoImages = new HashMap(); + + public AbstractCustomChart() { + ChartsPlot plot = new ChartsPlot(); + plot.setPlotID(this.getChartID()); + this.setPlot(plot); + } + + protected BufferedImage getDemoImage() { + if (demoImages.get(this.getChartID()) == null) { + BufferedImage var1 = IOUtils.readImage(this.demoImagePath()); + if (var1 == null) { + var1 = CoreGraphHelper.createBufferedImage(100, 100, 6); + } + + demoImages.put(this.getChartID(), var1); + } + + return (BufferedImage) demoImages.get(this.getChartID()); + } + + protected BufferedImage getChartImage(Calculator cal, int width, int height) { + + if (demoImages.get(this.getChartID()) == null) { + BufferedImage var1 = IOUtils.readImage(this.demoImagePath()); + if (var1 == null) { + var1 = CoreGraphHelper.createBufferedImage(100, 100, 6); + } + + demoImages.put(this.getChartID(), var1); + } + + return (BufferedImage) demoImages.get(this.getChartID()); + } + + @Override + protected void addJSON(AbstractDataConfig abstractDataConfig, JSONObject jsonObject, Repository repository, AbstractChart.JSONPara jsonPara) throws JSONException { + AbstractCustomChart.JSONPara jsonParaCustom = new AbstractCustomChart.JSONPara(jsonPara.chartWebPara, jsonPara.ecName, jsonPara.sheetIndex); + this.addJSON((T) abstractDataConfig, jsonObject, repository, jsonParaCustom); + } + + protected abstract void addJSON(T config, JSONObject json, Repository repo, AbstractCustomChart.JSONPara para) throws JSONException; + + @Override + public ChartGlyph createGlyph(ChartData data) { + VanChartGlyph chartGlyph = new VanChartGlyph() { + String ecName; + int sheetIndex; + + @Override + public Map toJSONMap(String[] deps, double width, double height, Repository repo, int sheetIdx, String ecName) { + this.ecName = ecName; + this.sheetIndex = sheetIdx; + return super.toJSONMap(deps, width, height, repo, sheetIndex, ecName); + } + + @Override + public JSONObject toJSONObject(Repository repo, double width, double height) throws JSONException { + return AbstractCustomChart.this.toJSON(repo, false, AbstractCustomChart.this.new JSONPara(this.getChartWebPara(), this.ecName, this.sheetIndex)); + } + + @Override + public void draw(Graphics g, int p) { + if (this.getBounds() != null) { + Rectangle2D rect = this.getBounds(); + double width = rect.getWidth(); + double height = rect.getHeight(); + GraphHelper.paintImage(g, (int) width, (int) height, AbstractCustomChart.this.getDemoImage(), 4, -1, -1, -1, -1); + } + } + + @Override + public Image toImage(int width, int height, int p, CallbackEvent callback) { + if (this.getChartWebPara().getChartIDInfo().getType() != WebChartType.DESIGNER_CHART) { + return AbstractCustomChart.this.getChartImage((Calculator) this.getChartWebPara().getCalculator(), width, height); + } else { + BufferedImage bi = CoreGraphHelper.createBufferedImage(width, height, 6); + Graphics g = bi.getGraphics(); + GraphHelper.paintImage(g, width, height, AbstractCustomChart.this.getDemoImage(), 4, -1, -1, -1, -1); + return bi; + } + } + + @Override + public void recordWebPreview() { + AbstractCustomChart.this.recordPreview(); + } + }; + chartGlyph.setWrapperName(this.wrapperName()); + chartGlyph.setRequiredJS(this.requiredJS()); + chartGlyph.setRequiredCSS(this.requiredCSS()); + return chartGlyph; + } + + private JSONObject toJSON(Repository repo, boolean isDes, AbstractCustomChart.JSONPara para) throws JSONException { + JSONObject paramJson = (JSONObject) JSONFactory.createJSON(JSON.OBJECT); + this.checkLicense(paramJson); + ToHyperlinkJSONHelper.addJSON(repo, paramJson, this.getLinkGroup(), this.hyperLinkParas()); + paramJson.put("refreshTime", this.isRefreshEnabled() ? this.getAutoRefreshTime() * 1000.0D : 0.0D); + AbstractDataConfig dataConfig = isDes && this.designerDataConfig() != null ? this.designerDataConfig() : this.getDataConfig(); + ToJSONHelper.addEmptyDataTip(paramJson, para.chartWebPara); + ToJSONHelper.addStringLocale(repo, paramJson); + this.addJSON((T) dataConfig, paramJson, repo, para); + return paramJson; + } + + @Override + public Object clone() throws CloneNotSupportedException { + AbstractCustomChart chart = (AbstractCustomChart) super.clone(); + chart.setAutoRefreshTime(this.getAutoRefreshTime()); + chart.setRefreshEnabled(this.isRefreshEnabled()); + if (this.getLinkGroup() != null) { + chart.setLinkGroup((NameJavaScriptGroup) this.getLinkGroup().clone()); + } + + if (this.getFilterDefinition() != null) { + chart.setFilterDefinition((TopDefinition) this.getFilterDefinition().clone()); + } + + return chart; + } + + @Override + public boolean equals(Object src) { + return super.equals(src) && src instanceof AbstractCustomChart && ComparatorUtils.equals(this.getChartID(), ((AbstractCustomChart) src).getChartID()) && ComparatorUtils.equals(this.getLinkGroup(), ((AbstractCustomChart) src).getLinkGroup()) && ComparatorUtils.equals(this.isRefreshEnabled(), ((AbstractCustomChart) src).isRefreshEnabled()) && ComparatorUtils.equals(this.getAutoRefreshTime(), ((AbstractCustomChart) src).getAutoRefreshTime()); + } + + protected class JSONPara { + public ChartWebPara chartWebPara; + @Deprecated + public String webChartID; + public String ecName; + public int sheetIndex; + + JSONPara(ChartWebPara webPara, String ecName, int sheetIndex) { + this.chartWebPara = webPara; + this.webChartID = DeprecatedChartWebUtils.createPainterID(webPara.getChartIDInfo()); + this.ecName = ecName; + this.sheetIndex = sheetIndex; + } + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/CustomChartAxisButtonPane.java b/src/com/fr/plugin/pielinecomb/comp/CustomChartAxisButtonPane.java new file mode 100644 index 0000000..5efa79f --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/CustomChartAxisButtonPane.java @@ -0,0 +1,282 @@ +package com.fr.plugin.pielinecomb.comp; + +import com.fr.base.BaseUtils; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIToggleButton; +import com.fr.design.i18n.Toolkit; +import com.fr.general.ComparatorUtils; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.plugin.chart.VanChartAttrHelper; +import com.fr.plugin.chart.attr.axis.VanChartAxis; +import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; +import com.fr.plugin.pielinecomb.ui.PieLineCombStyleAxisPane; +import com.fr.van.chart.designer.style.axis.VanChartAxisPane; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * @author duan.jingliang + * @date 2022/10/20 + */ +public class CustomChartAxisButtonPane extends BasicBeanPane { + private static final int B_W = 56; + private static final int B_H = 21; + private static final int COL_COUNT = 3; + private static final int MAX_COUNT = 20; + private UIButton addButton; + + private List indexList_Y = new ArrayList(); + private JPanel buttonPane; + private PieLineCombStyleAxisPane parent; + + + public CustomChartAxisButtonPane(PieLineCombStyleAxisPane var1) { + this.parent = var1; + this.setLayout(new BorderLayout()); + this.addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); + JPanel var2 = new JPanel(new BorderLayout()); + var2.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 20)); + var2.add(this.addButton, "North"); + //this.addButton.setVisible(false); + this.add(var2, "East"); + this.buttonPane = new JPanel(); + this.buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 0)); + this.add(this.buttonPane, "Center"); + + this.addButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent var1) { + //添加Y轴 + CustomChartAxisButtonPane.this.addYAxis(); + } + }); + } + + private void layoutPane() { + if (this.buttonPane != null) { + this.buttonPane.removeAll(); + this.buttonPane.setLayout(new BoxLayout(this.buttonPane, 1)); + JPanel var1 = null; + int var3 = this.indexList_Y.size(); + + + for(int i = 0; i < this.indexList_Y.size(); i++) { + if (i % 3 == 0) { + var1 = new JPanel(new FlowLayout(0, 0, 0)); + this.buttonPane.add(var1); + } + + if (var1 != null) { + var1.add((Component)this.indexList_Y.get(i)); + } + } + + this.revalidate(); + } + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Fine-Design_Chart_Switch_Chart"); + } + + @Override + public void populateBean(JSONObject var1) { + + this.indexList_Y.clear(); + + JSONObject axisX = var1.getJSONObject("axisX"); + CustomChartAxisButtonPane.ChartAxisButton axisXButton = new CustomChartAxisButtonPane.ChartAxisButton(axisX.getString("axisName")); + axisXButton.setToolTipText(axisX.getString("axisName")); + this.indexList_Y.add(axisXButton); + + JSONArray var7 = var1.getJSONArray("axisY"); + Iterator var8 = var7.iterator(); + + while(var8.hasNext()) { + JSONObject var9 = (JSONObject)var8.next(); + CustomChartAxisButtonPane.ChartAxisButton var6 = new CustomChartAxisButtonPane.ChartAxisButton(var9.getString("axisName")); + var6.setToolTipText(var9.getString("axisName")); + this.indexList_Y.add(var6); + } + + this.layoutPane(); + } + + @Override + public JSONObject updateBean() { + return null; + } + + public String getNewChartName(List var1, String var2) { + int var3 = var1.size(); + + while(true) { + String var4 = var2 + var3; + boolean var5 = false; + Iterator var6 = var1.iterator(); + + while(var6.hasNext()) { + CustomChartAxisButtonPane.ChartAxisButton var7 = (CustomChartAxisButtonPane.ChartAxisButton)var6.next(); + if (ComparatorUtils.equals(var7.getButtonName(), var4)) { + var5 = true; + break; + } + } + + if (!var5) { + return var4; + } + + ++var3; + } + } + + private void addYAxis() { + String var1 = this.getNewChartName(this.indexList_Y, VanChartAttrHelper.Y_AXIS_PREFIX); + CustomChartAxisButtonPane.ChartAxisButton var2 = new CustomChartAxisButtonPane.ChartAxisButton(var1); + this.indexList_Y.add(var2); + this.parent.addAxisPane(var1); + this.layoutPane(); + } + + private void changeAxisSelected(String var1) { + this.parent.changeAxisSelected(var1); + } + + private class ChartAxisButton extends UIToggleButton { + private static final double DEL_WIDTH = 10.0D; + private static final long serialVersionUID = -3701452534814584608L; + private BufferedImage closeIcon = BaseUtils.readImageWithCache("com/fr/design/images/toolbarbtn/chartChangeClose.png"); + private boolean isMoveOn = false; + private String buttonName = ""; + + public ChartAxisButton(String var2) { + super(var2); + this.buttonName = var2; + } + + public String getButtonName() { + return this.buttonName; + } + + @Override + public Dimension getPreferredSize() { + return new Dimension(56, 21); + } + + private void paintDeleteButton(Graphics var1) { + Rectangle var2 = this.getBounds(); + int var3 = (int)(var2.getWidth() - 10.0D); + byte var4 = 1; + var1.drawImage(this.closeIcon, var3, var4, this.closeIcon.getWidth(), this.closeIcon.getHeight(), (ImageObserver)null); + } + + @Override + public void paintComponent(Graphics var1) { + super.paintComponent(var1); + if (this.isMoveOn && this.getButtonList().size() > 1 && !VanChartAttrHelper.isDefaultAxis(this.buttonName)) { + this.paintDeleteButton(var1); + } + + } + + private List getButtonList() { + return CustomChartAxisButtonPane.this.indexList_Y; + } + + private void noSelected() { + + CustomChartAxisButtonPane.ChartAxisButton var2; + Iterator var1 = CustomChartAxisButtonPane.this.indexList_Y.iterator(); + + while(var1.hasNext()) { + var2 = (CustomChartAxisButtonPane.ChartAxisButton)var1.next(); + var2.setSelected(false); + } + + } + + private void checkMoveOn(boolean var1) { + Iterator var2; + CustomChartAxisButtonPane.ChartAxisButton var3; + + for(var2 = CustomChartAxisButtonPane.this.indexList_Y.iterator(); var2.hasNext(); var3.isMoveOn = false) { + var3 = (CustomChartAxisButtonPane.ChartAxisButton)var2.next(); + } + + this.isMoveOn = var1; + } + + private Rectangle2D getRectBounds() { + return this.getBounds(); + } + + private void deleteAButton() { + List var1 = this.getButtonList(); + if (var1.contains(this) && var1.size() > 1) { + var1.remove(this); + CustomChartAxisButtonPane.this.parent.delAxisPane(this.buttonName); + //CustomChartAxisButtonPane.this.parent.removeAxis(this.buttonName); + if (this.isSelected()) { + ((CustomChartAxisButtonPane.ChartAxisButton)var1.get(0)).setSelected(true); + CustomChartAxisButtonPane.this.changeAxisSelected(((CustomChartAxisButtonPane.ChartAxisButton)var1.get(0)).getButtonName()); + + } + } + + this.reLayoutPane(); + } + + private void reLayoutPane() { + CustomChartAxisButtonPane.this.layoutPane(); + } + + @Override + protected MouseListener getMouseListener() { + return new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent var1) { + CustomChartAxisButtonPane.ChartAxisButton.this.mouseClick(var1); + } + @Override + public void mouseEntered(MouseEvent var1) { + CustomChartAxisButtonPane.ChartAxisButton.this.checkMoveOn(true); + } + @Override + public void mouseExited(MouseEvent var1) { + CustomChartAxisButtonPane.ChartAxisButton.this.checkMoveOn(false); + } + }; + } + + public void mouseClick(MouseEvent var1) { + Rectangle2D var2 = this.getRectBounds(); + if (var2 != null) { + if ((double)var1.getX() >= var2.getWidth() - 10.0D && !VanChartAttrHelper.isDefaultAxis(this.buttonName)) { + this.deleteAButton(); + this.fireSelectedChanged(); + } else { + if (this.isEnabled()) { + this.noSelected(); + CustomChartAxisButtonPane.this.changeAxisSelected(this.getButtonName()); + this.setSelectedWithFireListener(true); + this.fireSelectedChanged(); + } + + } + } + } + } + +} diff --git a/src/com/fr/plugin/pielinecomb/comp/CustomChartFillStylePane.java b/src/com/fr/plugin/pielinecomb/comp/CustomChartFillStylePane.java new file mode 100644 index 0000000..79b5593 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/CustomChartFillStylePane.java @@ -0,0 +1,75 @@ +package com.fr.plugin.pielinecomb.comp; + +import com.fr.chart.base.AttrFillStyle; +import com.fr.design.gui.icombobox.ColorSchemeComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.DesignerBean; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.predefined.ui.detail.ColorFillStylePane; +import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import java.awt.*; + +/** + * @author duan.jingliang + * @date 2022/10/11 + */ +public class CustomChartFillStylePane extends ColorFillStylePane implements DesignerBean { + public static final String name = "customChartFillStyle"; + + public CustomChartFillStylePane() { + DesignerContext.setDesignerBean("customChartFillStyle", this); + } + + @Override + protected void styleSelectBoxChange() { + super.styleSelectBoxChange(); + } + + @Override + protected ColorSchemeComboBox createColorSchemeComboBox() { + return new CustomColorSchemeComboBox(); + } + + @Override + protected void initLayout() { + super.initLayout(); + this.add(this.getContentPane(), "Center"); + } + + @Override + protected JPanel getContentPane() { + JPanel var1 = super.getContentPane(); + var1.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); + return var1; + } + + @Override + protected Component[][] contentPaneComponents() { + return new Component[][]{{null, null}, {new UILabel(Toolkit.i18nText("Fine-Design_Chart_Match_Color_Scheme")), this.getStyleSelectBox()}, {null, this.getCustomPane()}}; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Fine-Design_Chart_Color"); + } + + public void populateBean(AttrFillStyle var1) { + this.populateBean(var1.getColorFillStyle()); + } + + public void updateBean(AttrFillStyle var1) { + var1.setColorFillStyle(this.updateBean()); + } + + @Override + public void refreshBeanElement() { + AttrFillStyle var1 = new AttrFillStyle(); + this.updateBean(var1); + this.getStyleSelectBox().refresh(); + this.populateBean(var1); + GUICoreUtils.repaint(this); + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/CustomColorSchemeComboBox.java b/src/com/fr/plugin/pielinecomb/comp/CustomColorSchemeComboBox.java new file mode 100644 index 0000000..0190eaf --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/CustomColorSchemeComboBox.java @@ -0,0 +1,45 @@ +package com.fr.plugin.pielinecomb.comp; + + +import com.fr.design.gui.icombobox.ColorSchemeComboBox; +import com.fr.design.i18n.Toolkit; + +import java.util.Map; + +/** + * @author duan.jingliang + * @date 2022/10/11 + */ +public class CustomColorSchemeComboBox extends ColorSchemeComboBox { + + @Override + protected Map getColorSchemesFromConfig() { + Map schemesConfig = super.getColorSchemesFromConfig(); + schemesConfig.remove(Toolkit.i18nText("Fine-Design_Chart_Custom_Gradient")); + return schemesConfig; + } + + @Override + public SelectType getSelectType() { + int var1 = this.getSelectedIndex(); + int var2 = this.getItemCount(); + if (var1 == var2 - 1) { + return SelectType.COMBINATION_COLOR; + } else { + return SelectType.NORMAL; + } + } + + @Override + public void setSelectType(SelectType var1) { + int var2 = this.getItemCount(); + switch(var1) { + case DEFAULT: + this.setSelectedIndex(0); + break; + case COMBINATION_COLOR: + this.setSelectedIndex(var2 - 1); + } + + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/CustomFormatPane.java b/src/com/fr/plugin/pielinecomb/comp/CustomFormatPane.java new file mode 100644 index 0000000..8d55cdb --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/CustomFormatPane.java @@ -0,0 +1,355 @@ +package com.fr.plugin.pielinecomb.comp; + +import com.fr.base.GraphHelper; +import com.fr.data.core.FormatField; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.UIConstants; +import com.fr.design.event.GlobalNameListener; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.TextFontComboBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.style.FRFontPane; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.ComparatorUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.text.Format; + +/** + * @author duan.jingliang + * @date 2022/10/21 + */ +public class CustomFormatPane extends BasicBeanPane { + private static final int LABEL_X = 4; + private static final int LABEL_Y = 18; + private static final int LABEL_DELTA_WIDTH = 8; + private static final int LABEL_HEIGHT = 15; + private static final int CURRENCY_FLAG_POINT = 6; + private static final Border LEFT_BORDER = BorderFactory.createEmptyBorder(0, 30, 0, 0); + private static final Integer[] TYPES = new Integer[]{0, 1, 2, 3, 4, 5, 6, 7}; + private static final Integer[] DATE_TYPES = new Integer[]{0, 5, 6}; + private Format format; + private UIComboBox typeComboBox; + private TextFontComboBox textField; + private UILabel sampleLabel; + private JPanel contentPane; + private JPanel txtCenterPane; + private JPanel centerPane; + private JPanel optionPane; + private UICheckBox roundingBox; + private JPanel formatFontPane; + private FRFontPane frFontPane; + private boolean isRightFormat; + private boolean isDate = false; + private GlobalNameListener globalNameListener = null; + ItemListener itemListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent var1) { + if (var1.getStateChange() == 1) { + int var2 = CustomFormatPane.this.getFormatContents(); + String[] var3 = FormatField.getInstance().getFormatArray(var2, false); + CardLayout var4 = (CardLayout)CustomFormatPane.this.centerPane.getLayout(); + if (CustomFormatPane.this.isTextOrNull()) { + CustomFormatPane.this.centerPane.setPreferredSize(new Dimension(0, 0)); + var4.show(CustomFormatPane.this.centerPane, "hide"); + } else { + CustomFormatPane.this.textField.removeAllItems(); + CustomFormatPane.this.textField.setItemArray(var3); + CustomFormatPane.this.textField.setSelectedIndex(0); + CustomFormatPane.this.centerPane.setPreferredSize(new Dimension(270, 65)); + var4.show(CustomFormatPane.this.centerPane, "show"); + } + + CardLayout var5 = (CardLayout)CustomFormatPane.this.optionPane.getLayout(); + if (CustomFormatPane.this.getFormatContents() == 3) { + CustomFormatPane.this.optionPane.setPreferredSize(new Dimension(100, 20)); + var5.show(CustomFormatPane.this.optionPane, "show"); + } else { + CustomFormatPane.this.optionPane.setPreferredSize(new Dimension(0, 0)); + var5.show(CustomFormatPane.this.optionPane, "hide"); + CustomFormatPane.this.roundingBox.setSelected(false); + } + } + + } + }; + ItemListener textFieldItemListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent var1) { + if (var1.getStateChange() == 1) { + CustomFormatPane.this.refreshPreviewLabel(); + } + + } + }; + + public CustomFormatPane() { + this.initComponents(TYPES); + } + + protected void initComponents(Integer[] var1) { + this.setLayout(new BorderLayout(0, 4)); + this.initSampleLabel(); + this.contentPane = new JPanel(new BorderLayout(0, 4)) { + @Override + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, 65); + } + }; + this.typeComboBox = new UIComboBox(var1); + UIComboBoxRenderer var2 = this.createComBoxRender(); + this.typeComboBox.setRenderer(var2); + this.typeComboBox.addItemListener(this.itemListener); + this.typeComboBox.setGlobalName("typeComboBox"); + this.contentPane.add(this.sampleLabel, "North"); + this.txtCenterPane = new JPanel(new BorderLayout()); + this.textField = new TextFontComboBox(); + this.textField.addItemListener(this.textFieldItemListener); + this.textField.setEditable(true); + this.textField.setGlobalName("textField"); + this.txtCenterPane.add(this.textField, "North"); + this.contentPane.add(this.txtCenterPane, "Center"); + this.centerPane = new JPanel(new CardLayout()); + this.centerPane.add(new JPanel(), "hide"); + this.centerPane.setPreferredSize(new Dimension(0, 0)); + this.centerPane.add(this.contentPane, "show"); + this.frFontPane = new FRFontPane(); + UILabel var3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FR_Font"), 2); + JPanel var4 = new JPanel(new BorderLayout()); + var4.add(var3, "North"); + this.typeComboBox.setPreferredSize(new Dimension(155, 20)); + JPanel var5 = new JPanel(new BorderLayout()); + var5.add(this.typeComboBox, "Center"); + var5.setBorder(LEFT_BORDER); + this.frFontPane.setBorder(LEFT_BORDER); + JPanel var6 = new JPanel(new BorderLayout()); + var6.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Option"), 2), "West"); + this.roundingBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Option_Half_Up")); + this.roundingBox.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0)); + this.roundingBox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent var1) { + } + }); + this.roundingBox.setGlobalName("roundingBox"); + var6.add(this.roundingBox, "Center"); + this.optionPane = new JPanel(new CardLayout()); + this.optionPane.add(new JPanel(), "hide"); + this.optionPane.setPreferredSize(new Dimension(0, 0)); + this.optionPane.add(var6, "show"); + Component[][] var7 = this.getComponent(var4, this.centerPane, var5); + this.add(this.createContentPane(var7), "Center"); + } + + protected JPanel createContentPane(Component[][] var1) { + double var2 = -1.0D; + double var4 = -2.0D; + double[] var6 = new double[]{var4, var4, var4, var4, var4}; + double[] var7 = new double[]{var4, var2}; + int[][] var8 = new int[][]{{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + return TableLayoutHelper.createGapTableLayoutPane(var1, var6, var7, var8, 10.0D, 6.0D); + } + + protected Component[][] getComponent(JPanel var1, JPanel var2, JPanel var3) { + return new Component[][]{{null, null}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format"), 2), var3}, {var2, null}, {this.optionPane, null}, {var1, this.frFontPane}}; + } + + protected UIComboBoxRenderer createComBoxRender() { + return new UIComboBoxRenderer() { + @Override + public Component getListCellRendererComponent(JList var1, Object var2, int var3, boolean var4, boolean var5) { + JLabel var6 = (JLabel)super.getListCellRendererComponent(var1, var2, var3, var4, var5); + if (var2 instanceof Integer) { + var6.setText(" " + FormatField.getInstance().getName((Integer)var2)); + } + + return var6; + } + }; + } + + private void initSampleLabel() { + UIRoundedBorder var1 = new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 4); + String var2 = Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample"); + TitledBorder var3 = BorderFactory.createTitledBorder(var1, var2, 1, 0, (Font)null, UIConstants.LINE_COLOR); + this.sampleLabel = new UILabel(FormatField.getInstance().getFormatValue()) { + @Override + public void paint(Graphics var1) { + super.paint(var1); + int var2 = this.getWidth(); + Color var3 = var1.getColor(); + var1.setColor(this.getBackground()); + var1.fillRect(4, 18, var2 - 8, 15); + var1.setColor(UIConstants.LINE_COLOR); + FontMetrics var4 = var1.getFontMetrics(); + int var5 = var4.stringWidth(this.getText()); + GraphHelper.drawString(var1, this.getText(), (double)((var2 - var5) / 2), 26.0D); + var1.setColor(var3); + } + }; + this.sampleLabel.setHorizontalAlignment(0); + this.sampleLabel.setBorder(var3); + } + + @Override + public Dimension getPreferredSize() { + return this.typeComboBox.getSelectedIndex() == 0 ? this.typeComboBox.getPreferredSize() : super.getPreferredSize(); + } + + @Override + public void populateBean(TextFormat textFormat) { + this.typeComboBox.setSelectedItem(textFormat.getType()); + this.textField.setSelectedItem(textFormat.getFormatStr()); + } + + @Override + public TextFormat updateBean() { + TextFormat textFormat = new TextFormat(); + textFormat.setFormatStr(String.valueOf(this.textField.getSelectedItem())); + textFormat.setType((Integer)this.typeComboBox.getSelectedItem()); + return textFormat; + } + + @Override + protected String title4PopupWindow() { + return null; + } + + private boolean isCurrencyFormatStyle(String var1) { + if (var1.length() == 0) { + return false; + } else if (var1.charAt(0) != 164 && var1.charAt(0) != '$') { + return var1.length() > 6 && var1.startsWith("#,##0;"); + } else { + return true; + } + } + + public static int isArrayContainPattern(String[] var0, String var1) { + for(int var2 = 0; var2 < var0.length; ++var2) { + if (ComparatorUtils.equals(var0[var2], var1)) { + return var2; + } + } + + return -1; + } + + private void setPatternComboBoxAndList(int var1, String var2) { + this.typeComboBox.setSelectedItem(var1); + this.textField.setSelectedItem(var2); + } + + private boolean isTimeType(String var1) { + return var1.matches(".*[Hhmsa].*"); + } + + private int getFormatContents() { + return (Integer)this.typeComboBox.getSelectedItem(); + } + + private void refreshPreviewLabel() { + this.sampleLabel.setText(FormatField.getInstance().getFormatValue()); + this.sampleLabel.setForeground(UIManager.getColor("Label.foreground")); + + try { + this.isRightFormat = true; + if (StringUtils.isEmpty(String.valueOf(this.textField.getSelectedItem()))) { + return; + } + + this.sampleLabel.setText(FormatField.getInstance().getFormatValue(this.getFormatContents(), String.valueOf(this.textField.getSelectedItem()))); + } catch (Exception var2) { + this.sampleLabel.setForeground(Color.red); + this.sampleLabel.setText(var2.getMessage()); + this.isRightFormat = false; + } + + } + + private boolean isTextOrNull() { + int var1 = this.getFormatContents(); + return var1 == 7 || var1 == 0; + } + + public void justUsePercentFormat() { + this.typeComboBox.setEnabled(false); + this.typeComboBox.setSelectedItem(3); + } + + public void setForDataSheet() { + Integer[] var1 = new Integer[]{0, 1, 2, 3, 4}; + this.typeComboBox = new UIComboBox(var1); + UIComboBoxRenderer var2 = new UIComboBoxRenderer() { + @Override + public Component getListCellRendererComponent(JList var1, Object var2, int var3, boolean var4, boolean var5) { + JLabel var6 = (JLabel)super.getListCellRendererComponent(var1, var2, var3, var4, var5); + if (var2 instanceof Integer) { + var6.setText(" " + FormatField.getInstance().getName((Integer)var2)); + } + + return var6; + } + }; + this.typeComboBox.setRenderer(var2); + this.typeComboBox.addItemListener(this.itemListener); + this.setTypeComboBoxPane(this.typeComboBox); + } + + protected void setTypeComboBoxPane(UIComboBox var1) { + this.add(var1, "North"); + } + + public void setComboBoxModel(boolean var1) { + if (this.isDate != var1) { + this.isDate = var1; + this.typeComboBox.setSelectedIndex(0); + int var2; + if (var1) { + for(var2 = 0; var2 < DATE_TYPES.length; ++var2) { + this.typeComboBox.addItem(DATE_TYPES[var2]); + } + + for(var2 = 0; var2 < TYPES.length; ++var2) { + this.typeComboBox.removeItemAt(1); + } + } else { + for(var2 = 0; var2 < TYPES.length; ++var2) { + this.typeComboBox.addItem(TYPES[var2]); + } + + for(var2 = 0; var2 < DATE_TYPES.length; ++var2) { + this.typeComboBox.removeItemAt(1); + } + } + } + + } + + public void registerNameListener(GlobalNameListener var1) { + this.globalNameListener = var1; + } + + public void registerChangeListener(UIObserverListener var1) { + this.typeComboBox.registerChangeListener(var1); + this.textField.registerChangeListener(var1); + } + + public boolean shouldResponseNameListener() { + return false; + } + + public void setGlobalName(String var1) { + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/TextFormat.java b/src/com/fr/plugin/pielinecomb/comp/TextFormat.java new file mode 100644 index 0000000..d87f83e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/TextFormat.java @@ -0,0 +1,26 @@ +package com.fr.plugin.pielinecomb.comp; + +/** + * @author duan.jingliang + * @date 2022/10/21 + */ +public class TextFormat { + private Integer type; + private String formatStr; + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getFormatStr() { + return formatStr; + } + + public void setFormatStr(String formatStr) { + this.formatStr = formatStr; + } +} diff --git a/src/com/fr/plugin/pielinecomb/comp/WebPageRender.java b/src/com/fr/plugin/pielinecomb/comp/WebPageRender.java new file mode 100644 index 0000000..dae7678 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/comp/WebPageRender.java @@ -0,0 +1,147 @@ +package com.fr.plugin.pielinecomb.comp; + +import com.fr.general.IOUtils; +import com.fr.json.JSONObject; +import com.fr.stable.StringUtils; +import com.fr.stable.os.OperatingSystem; +import com.fr.third.org.apache.commons.io.FileUtils; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.InputStreamReader; + +/** + * @author duan.jingliang + * @date 2022/9/28 + */ +public class WebPageRender { + private static String CHART_PATH = ""; + private static WebPageRender webPage = new WebPageRender(); + + private WebPageRender() { + } + public static WebPageRender getInstance() { + return webPage; + } + + public String makeChartImage(JSONObject options, int width, int height) { + Process process = null; + try { + prepareChartDir(options); + + String cmd = ""; + if (OperatingSystem.isWindows()) { + cmd += "cmd /c cd " + CHART_PATH + " && phantomjs "; + } else { + cmd += "cd " + CHART_PATH + " && phantomjs "; + } + cmd += "export.js -chartname PieLineCombChartWrapper -width " + width + " -height " + height; + + process = Runtime.getRuntime().exec(cmd); + /** + * 获取控制台输出信息 + * 通过JS中使用console.log()打印输出base64编码 + * 获取进程输入流,进行base64编码获取 + */ + BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream())); + + String line = ""; + StringBuffer base64Img = new StringBuffer(); + while ((line = input.readLine()) != null) { + base64Img.append(line); + } + + String imgStr = base64Img.toString(); + if (imgStr.indexOf(",") > 0) { + imgStr = imgStr.substring(imgStr.indexOf(",") + 1); + } + + return imgStr; + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (null != process) { + process.destroy(); + } + } + return ""; + } + + private void prepareChartDir(JSONObject options) { + try { + options.put("isLoadAnimal", false); + String optionStr = options.toString(); + optionStr = "window.chartOptions = " + optionStr; + + if (StringUtils.isEmpty(CHART_PATH)) { + String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getFile(); + path = java.net.URLDecoder.decode(path, "UTF-8"); + System.out.println("path: " + path); + File pluginDir = new File(path); + CHART_PATH = pluginDir.getParent() + File.separator + "chartexport"; + } + + File chartPath = new File(CHART_PATH); + chartPath.mkdirs(); + + File delFile = new File(CHART_PATH + File.separator + "chartdata.js"); + if (delFile.exists()) { + delFile.delete(); + } + + /*if (OperatingSystem.isWindows()) { + if (!new File(CHART_PATH + File.separator + "phantomjs.exe").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/boxplot/web/phantomjs.exe"), "phantomjs.exe", chartPath); + } + } else if (OperatingSystem.isMacos()) { + if (!new File(CHART_PATH + File.separator + "phantomjs").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/boxplot/web/phantomjs-mac"), "phantomjs", chartPath); + } + } else { + if (!new File(CHART_PATH + File.separator + "phantomjs").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/boxplot/web/phantomjs-linux"), "phantomjs", chartPath); + } + }*/ + + if (!new File(CHART_PATH + File.separator + "fr.js").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/pielinecomb/web/fr.js"), "fr.js", chartPath); + } + if (!new File(CHART_PATH + File.separator + "jquery.js").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/pielinecomb/web/jquery.js"), "jquery.js", chartPath); + } + if (!new File(CHART_PATH + File.separator + "echarts.js").exists()) { + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/pielinecomb/web/echarts.min.js"), "echarts.js", chartPath); + } + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/pielinecomb/web/export.js"), "export.js", chartPath); + IOUtils.copy(this.getClass().getResourceAsStream("/com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js"), "chartwrapper.js", chartPath); + IOUtils.copy(new ByteArrayInputStream(optionStr.getBytes("UTF-8")), "chartdata.js", chartPath); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public boolean isDataChanged(JSONObject options) { + try { + if (StringUtils.isEmpty(CHART_PATH)) { + return true; + } + String optionStr = options.toString(); + optionStr = "window.chartOptions = " + optionStr; + + File dataFile = new File(CHART_PATH + File.separator + "chartdata.js"); + if (dataFile.exists()) { + String oldData = FileUtils.readFileToString(dataFile, "UTF-8"); + if (StringUtils.isNotEmpty(oldData) && oldData.equals(optionStr)) { + return false; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return true; + } + +} diff --git a/src/com/fr/plugin/pielinecomb/data/AbstractMultiDataContentsPane.java b/src/com/fr/plugin/pielinecomb/data/AbstractMultiDataContentsPane.java new file mode 100644 index 0000000..fad0ad3 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/AbstractMultiDataContentsPane.java @@ -0,0 +1,139 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.mainframe.chart.gui.data.DataContentsPane; +import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.util.Iterator; +import java.util.List; + +public abstract class AbstractMultiDataContentsPane extends DataContentsPane { + + private String dataType; + private DataChartGroupPane dataChartGroupPane; + + public AbstractMultiDataContentsPane(String dataType) { + this.dataType = dataType; + } + + private List paneList; + + protected abstract List createPaneList(); + + public abstract void dataPaneTabChange(String dataType); + + private List getPaneList() { + if ((this.paneList == null) || (this.paneList.size() == 0)) { + this.paneList = createPaneList(); + } + return this.paneList; + } + + @Override + public void setSupportCellData(boolean paramBoolean) { + Iterator localIterator = getPaneList().iterator(); + while (localIterator.hasNext()) { + NormalChartDataPane localAbstractSingleNormalChartDataPane = (NormalChartDataPane) localIterator.next(); + localAbstractSingleNormalChartDataPane.setSupportCellData(paramBoolean); + } + } + + @Override + public void populate(ChartCollection paramChartCollection) { + Iterator localIterator = getPaneList().iterator(); + while (localIterator.hasNext()) { + NormalChartDataPane localAbstractSingleNormalChartDataPane = (NormalChartDataPane) localIterator.next(); + localAbstractSingleNormalChartDataPane.populate(paramChartCollection); + } + dataChartGroupPane.populateBean(this.dataType); + } + + @Override + public void update(ChartCollection paramChartCollection) { + Iterator localIterator = getPaneList().iterator(); + while (localIterator.hasNext()) { + NormalChartDataPane localAbstractSingleNormalChartDataPane = (NormalChartDataPane) localIterator.next(); + localAbstractSingleNormalChartDataPane.update(paramChartCollection); + } + } + + @Override + protected JPanel createContentPane() { + int i = getPaneList().size(); + String[] arrayOfString = new String[i]; + JPanel[] arrayOfJPanel = new JPanel[i]; + for (int j = 0; j < i; j++) { + NormalChartDataPane normalChartDataPane = (NormalChartDataPane) getPaneList().get(j); + arrayOfJPanel[j] = normalChartDataPane; + arrayOfString[j] = normalChartDataPane.title4PopupWindow(); + } + dataChartGroupPane = new DataChartGroupPane(arrayOfString, arrayOfJPanel); + return dataChartGroupPane; + } + + private class DataChartGroupPane extends JPanel { + private String[] tilteNames; + private UIButtonGroup titleGroup; + private CardLayout dataCardLayout; + private JPanel cardPane; + + public DataChartGroupPane(final String[] var1, final JPanel[] var2) { + tilteNames = var1; + titleGroup = new UIButtonGroup(var1); + titleGroup.setSelectedIndex(0); + dataCardLayout = new CardLayout(); + cardPane = new JPanel(dataCardLayout) { + @Override + public Dimension getPreferredSize() { + return var2[titleGroup.getSelectedIndex()].getPreferredSize(); + } + }; + + for (int var6 = 0; var6 < var2.length && var6 < var1.length; ++var6) { + cardPane.add(var2[var6], var1[var6]); + } + + titleGroup.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + dataCardLayout.show(cardPane, var1[titleGroup.getSelectedIndex()]); + DataChartGroupPane.this.tabChanged(titleGroup.getSelectedIndex()); + } + }); + titleGroup.setBorder(this.getButtonGroupBorder()); + this.setLayout(new BorderLayout(0, 4)); + this.add(titleGroup, "North"); + this.add(cardPane, "Center"); + } + + public void populateBean(String dataType) { + if (null != titleGroup) { + if (StringUtils.isNotEmpty(dataType)) { + for (int i = 0; i < tilteNames.length; i++) { + if (dataType.equals(tilteNames[i])) { + titleGroup.setSelectedIndex(i); + dataCardLayout.show(cardPane, tilteNames[titleGroup.getSelectedIndex()]); + break; + } + } + } + } + } + + protected void tabChanged(int i) { + NormalChartDataPane normalChartDataPane = (NormalChartDataPane) getPaneList().get(i); + AbstractMultiDataContentsPane.this.dataPaneTabChange(normalChartDataPane.title4PopupWindow()); + } + + protected Border getButtonGroupBorder() { + return null; + } + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/CombDataPane.java b/src/com/fr/plugin/pielinecomb/data/CombDataPane.java new file mode 100644 index 0000000..f6f468e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/CombDataPane.java @@ -0,0 +1,68 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.chart.chartattr.ChartCollection; +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.plugin.pielinecomb.PieLineCombChart; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +public class CombDataPane extends ChartDataPane { + + private PieLineCombChart chart; + + public CombDataPane(AttributeChangeListener listener) { + super(listener); + } + + @Override + protected JPanel createContentPane() { + String dataType = ""; + if (null != chart) { + dataType = chart.getDataType(); + } + this.contentsPane = new AbstractMultiDataContentsPane(dataType) { + @Override + protected List createPaneList() { + ArrayList localArrayList = new ArrayList(); + if (null != chart && chart.getChartType() == 0) { + localArrayList.add(new PieDataPane(CombDataPane.this.listener, CombDataPane.this)); + } else if (null != chart && chart.getChartType() == 1) { + localArrayList.add(new LineDataPane(CombDataPane.this.listener, CombDataPane.this)); + } else { + localArrayList.add(new PieDataPane(CombDataPane.this.listener, CombDataPane.this)); + localArrayList.add(new LineDataPane(CombDataPane.this.listener, CombDataPane.this)); + } + return localArrayList; + } + + @Override + public void dataPaneTabChange(String dataType) { + CombDataPane.this.chart.setDataType(dataType); + } + }; + return this.contentsPane; + } + + protected JPanel createContentPane(ChartCollection paramChartCollection) { + chart = paramChartCollection.getSelectedChart(PieLineCombChart.class); + return createContentPane(); + } + + @Override + protected void repeatLayout(ChartCollection chartCollection) { + if (this.contentsPane != null) { + remove(this.contentsPane); + } + setLayout(new BorderLayout(0, 0)); + createContentPane(chartCollection); + if (this.contentsPane != null) { + this.contentsPane.setSupportCellData(isSupportCellData()); + } + } + +} diff --git a/src/com/fr/plugin/pielinecomb/data/DataUtils.java b/src/com/fr/plugin/pielinecomb/data/DataUtils.java new file mode 100644 index 0000000..518d01e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/DataUtils.java @@ -0,0 +1,67 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.extended.chart.AbstractChart; +import com.fr.extended.chart.AbstractDataConfig; +import com.fr.extended.chart.DataSet; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.stable.StringUtils; + +import java.util.List; + +/** + * @author duan.jingliang + */ +public class DataUtils { + public static PieLineCombChart getSelectSubChart(ChartCollection paramChartCollection) { + return (PieLineCombChart) getSelectedChart(PieLineCombChart.class, paramChartCollection); + } + + public static T getSelectedChart(Class paramClass, ChartCollection paramChartCollection) { + if (paramChartCollection == null) { + return null; + } + return paramChartCollection.getSelectedChart(paramClass); + } + + public static DataSet getSingleDataSet(String paramAbstractDataType, AbstractChart paramAbstractChart) { + ExtendedMultiDataSet localExtendedMultiDataSet = getMultiDataSet(paramAbstractChart); + if (localExtendedMultiDataSet != null) { + return localExtendedMultiDataSet.getSingleDataSet(paramAbstractDataType); + } + return null; + } + + public static void putSingleDataSet(String paramAbstractDataType, DataSet paramDataSet, AbstractChart paramAbstractChart) { + ExtendedMultiDataSet localExtendedMultiDataSet = getMultiDataSet(paramAbstractChart); + if (localExtendedMultiDataSet != null) { + localExtendedMultiDataSet.putSingleDataSet(paramAbstractDataType, paramDataSet); + } else { + paramAbstractChart.setFilterDefinition(new ExtendedMultiDataSet()); + } + } + + private static ExtendedMultiDataSet getMultiDataSet(AbstractChart paramAbstractChart) { + TopDefinitionProvider localTopDefinitionProvider = paramAbstractChart.getFilterDefinition(); + if ((localTopDefinitionProvider instanceof ExtendedMultiDataSet)) { + return (ExtendedMultiDataSet) localTopDefinitionProvider; + } + return null; + } + + public static T getDataConfig(String paramAbstractDataType, AbstractChart paramAbstractChart) { + DataSet localDataSet = getSingleDataSet(paramAbstractDataType, paramAbstractChart); + if (localDataSet == null) { + return null; + } + AbstractDataConfig localAbstractDataConfig = localDataSet.getDataConfig(); + return (T) localAbstractDataConfig; + } + + public static boolean isReportDataFieldNotSet(List paramList) { + return (paramList.size() == 1) && (StringUtils.isEmpty(Utils.objectToString(paramList.get(0)))); + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/ExtendedMultiDataSet.java b/src/com/fr/plugin/pielinecomb/data/ExtendedMultiDataSet.java new file mode 100644 index 0000000..45142a1 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/ExtendedMultiDataSet.java @@ -0,0 +1,144 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.base.chart.chartdata.BaseTableDefinition; +import com.fr.base.chart.chartdata.ChartData; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.base.chart.chartdata.model.DataProcessor; +import com.fr.base.chart.cross.FormulaProcessor; +import com.fr.chart.chartdata.TableDataDefinition; +import com.fr.extended.chart.DataSet; +import com.fr.extended.chart.ExtendedReportDataSet; +import com.fr.extended.chart.ExtendedTableDataSet; +import com.fr.general.data.DataModel; +import com.fr.general.xml.GeneralXMLTools; +import com.fr.script.Calculator; +import com.fr.stable.AssistUtils; +import com.fr.stable.FCloneable; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLable; +import com.fr.stable.xml.XMLableReader; + +import java.util.*; + +public class ExtendedMultiDataSet extends TableDataDefinition { + private Map multiDataSetMap = new HashMap(); + + public DataSet getSingleDataSet(String paramAbstractDataType) + { + return (DataSet)this.multiDataSetMap.get(paramAbstractDataType); + } + + public void putSingleDataSet(String paramAbstractDataType, DataSet paramDataSet) + { + this.multiDataSetMap.put(paramAbstractDataType, paramDataSet); + } + + @Override + public ChartData calcu4ChartData(Calculator paramCalculator, DataProcessor paramDataProcessor) + { + Iterator localIterator = this.multiDataSetMap.entrySet().iterator(); + while (localIterator.hasNext()) + { + Map.Entry localEntry = (Map.Entry)localIterator.next(); + DataSet localDataSet = (DataSet)localEntry.getValue(); + if ((localDataSet instanceof ExtendedTableDataSet)) { + ((ExtendedTableDataSet)localDataSet).calcu4ChartData(paramCalculator, paramDataProcessor); + } else if ((localDataSet instanceof ExtendedReportDataSet)) { + ((ExtendedReportDataSet)localDataSet).createChartData(paramCalculator); + } + } + return null; + } + + @Override + public void dealFormula(FormulaProcessor paramFormulaProcessor) + { + super.dealFormula(paramFormulaProcessor); + Iterator localIterator = this.multiDataSetMap.values().iterator(); + while (localIterator.hasNext()) + { + DataSet localDataSet = (DataSet)localIterator.next(); + if ((localDataSet instanceof TopDefinitionProvider)) { + ((TopDefinitionProvider)localDataSet).dealFormula(paramFormulaProcessor); + } + } + } + + @Override + public ChartData createChartData(DataModel paramDataModel, DataProcessor paramDataProcessor) + { + return null; + } + + @Override + public List getDataModelList() + { + ArrayList localArrayList = new ArrayList(); + Iterator localIterator = this.multiDataSetMap.entrySet().iterator(); + while (localIterator.hasNext()) + { + Map.Entry localEntry = (Map.Entry)localIterator.next(); + DataSet localDataSet = (DataSet)localEntry.getValue(); + if ((localDataSet instanceof BaseTableDefinition)) { + localArrayList.addAll(((BaseTableDefinition)localDataSet).getDataModelList()); + } + } + return localArrayList; + } + + @Override + public void writeXML(XMLPrintWriter paramXMLPrintWriter) + { + Iterator localIterator = this.multiDataSetMap.entrySet().iterator(); + while (localIterator.hasNext()) + { + Map.Entry localEntry = (Map.Entry)localIterator.next(); + String localAbstractDataType = (String)localEntry.getKey(); + DataSet localDataSet = (DataSet)localEntry.getValue(); + if ((localDataSet instanceof XMLable)) { + GeneralXMLTools.writeXMLable(paramXMLPrintWriter, (XMLable)localDataSet, localAbstractDataType); + } + } + } + + @Override + public void readXML(XMLableReader paramXMLableReader) + { + if (paramXMLableReader.isChildNode()) + { + String str = paramXMLableReader.getTagName(); + String localAbstractDataType = str; + this.multiDataSetMap.put(localAbstractDataType, (DataSet)GeneralXMLTools.readXMLable(paramXMLableReader)); + } + } + + @Override + public boolean equals(Object paramObject) + { + return ((paramObject instanceof ExtendedMultiDataSet)) && (AssistUtils.equals(this.multiDataSetMap, ((ExtendedMultiDataSet)paramObject).multiDataSetMap)); + } + + @Override + public ExtendedMultiDataSet clone() + throws CloneNotSupportedException + { + ExtendedMultiDataSet localExtendedMultiDataSet = (ExtendedMultiDataSet)super.clone(); + HashMap localHashMap = new HashMap(); + Iterator localIterator = this.multiDataSetMap.entrySet().iterator(); + while (localIterator.hasNext()) + { + Map.Entry localEntry = (Map.Entry)localIterator.next(); + String localAbstractDataType = (String)localEntry.getKey(); + DataSet localDataSet = (DataSet)localEntry.getValue(); + localHashMap.put(localAbstractDataType, (localDataSet instanceof FCloneable) ? (DataSet)((FCloneable)localDataSet).clone() : localDataSet); + } + localExtendedMultiDataSet.multiDataSetMap = localHashMap; + return localExtendedMultiDataSet; + } + + @Override + public int hashCode() + { + return super.hashCode() + AssistUtils.hashCode(new Object[] { this.multiDataSetMap }); + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/LineDataConfig.java b/src/com/fr/plugin/pielinecomb/data/LineDataConfig.java new file mode 100644 index 0000000..8ff20f7 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/LineDataConfig.java @@ -0,0 +1,83 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.extended.chart.AbstractDataConfig; +import com.fr.extended.chart.ExtendedField; +import com.fr.stable.AssistUtils; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class LineDataConfig extends AbstractDataConfig { + + private ExtendedField category = new ExtendedField(); + private ExtendedField gridline = new ExtendedField(); + private ExtendedField regioncolor = new ExtendedField(); + + + @Override + protected void readAttr(XMLableReader xmLableReader) { + readExtendedField(category, "category", xmLableReader); + readExtendedField(gridline, "gridline", xmLableReader); + readExtendedField(regioncolor, "regioncolor", xmLableReader); + } + + @Override + protected void writeAttr(XMLPrintWriter xmlPrintWriter) { + writeExtendedField(category, "category", xmlPrintWriter); + writeExtendedField(gridline, "gridline", xmlPrintWriter); + writeExtendedField(regioncolor, "regioncolor", xmlPrintWriter); + } + + @Override + public ExtendedField[] dataSetFields() { + return new ExtendedField[]{ + category, gridline, regioncolor + }; + } + + @Override + public LineDataConfig clone() throws CloneNotSupportedException { + LineDataConfig result = (LineDataConfig)super.clone(); + result.setCategory(this.getCategory().clone()); + result.setGridline(this.getGridline().clone()); + result.setRegioncolor(this.getRegioncolor().clone()); + return result; + } + + @Override + public boolean equals(Object obj) { + return super.equals(obj) + && obj instanceof LineDataConfig + && AssistUtils.equals(this.getCategory(), ((LineDataConfig) obj).getCategory()) + && AssistUtils.equals(this.getGridline(), ((PieDataConfig) obj).getGridline()) + && AssistUtils.equals(this.getRegioncolor(), ((PieDataConfig) obj).getRegioncolor()) + ; + } + + public ExtendedField getCategory() { + return category; + } + + public void setCategory(ExtendedField category) { + this.category = category; + } + + public ExtendedField getGridline() { + return gridline; + } + + public void setGridline(ExtendedField gridline) { + this.gridline = gridline; + } + + public ExtendedField getRegioncolor() { + return regioncolor; + } + + public void setRegioncolor(ExtendedField regioncolor) { + this.regioncolor = regioncolor; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/LineDataPane.java b/src/com/fr/plugin/pielinecomb/data/LineDataPane.java new file mode 100644 index 0000000..3b02265 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/LineDataPane.java @@ -0,0 +1,110 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.ReportDataDefinition; +import com.fr.chart.chartdata.TableDataDefinition; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ReportDataPane; +import com.fr.design.mainframe.chart.gui.data.TableDataPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.extended.chart.*; +import com.fr.plugin.pielinecomb.PieLineCombChart; + +public class LineDataPane extends NormalChartDataPane { + + + public LineDataPane(AttributeChangeListener paramAttributeChangeListener, ChartDataPane paramChartDataPane) { + super(paramAttributeChangeListener, paramChartDataPane); + } + + protected AbstractExtendedChartReportDataPane createReportDataContentPane() { + return new LineReportDataPane(); + } + + protected AbstractExtendedChartTableDataPane createTableDataContentPane() { + return new LineTableDataPane(); + } + + @Override + public String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Typeline"); + } + + @Override + protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { + TableDataPane tdp = new TableDataPane(chartDataPane) { + private AbstractExtendedChartTableDataPane pane; + + @Override + protected AbstractTableDataContentPane getContentPane(Chart paramAnonymousChart) { + this.pane = LineDataPane.this.createTableDataContentPane(); + return this.pane; + } + + @Override + public void populateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = paramAnonymousChartCollection.getSelectedChart(PieLineCombChart.class); + if (localAbstractChart != null) { + DataSet localDataSet = DataUtils.getSingleDataSet(PieLineCombChart.LINE_DATA, localAbstractChart); + if (accept(paramAnonymousChartCollection)) { + populateDSName((TableDataDefinition) localDataSet); + } + this.pane.populateDataSet(localDataSet); + } + } + + @Override + public void updateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + ExtendedTableDataSet localExtendedTableDataSet = this.pane.updateDataSet(); + updateDSName(localExtendedTableDataSet); + DataUtils.putSingleDataSet(PieLineCombChart.LINE_DATA, localExtendedTableDataSet, localAbstractChart); + } + + @Override + public boolean accept(Object paramAnonymousObject) { + return true; + } + }; + + return tdp; + } + + @Override + protected ReportDataPane getReportDataPane(ChartDataPane paramChartDataPane) { + return new ReportDataPane(paramChartDataPane) { + private AbstractExtendedChartReportDataPane pane; + + @Override + protected AbstractReportDataContentPane getContentPane(Chart paramAnonymousChart) { + this.pane = LineDataPane.this.createReportDataContentPane(); + return this.pane; + } + + @Override + public void populateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + if (localAbstractChart != null) { + DataSet localDataSet = DataUtils.getSingleDataSet(PieLineCombChart.LINE_DATA, localAbstractChart); + this.pane.populateDataSet(localDataSet); + } + } + + @Override + public void updateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + DataUtils.putSingleDataSet(PieLineCombChart.LINE_DATA, this.pane.updateDataSet(), localAbstractChart); + } + + @Override + public boolean accept(Object paramAnonymousObject) { + return ((paramAnonymousObject instanceof ChartCollection)) && ((DataUtils.getSingleDataSet(PieLineCombChart.LINE_DATA, DataUtils.getSelectSubChart((ChartCollection) paramAnonymousObject)) instanceof ReportDataDefinition)); + } + }; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/LineReportDataPane.java b/src/com/fr/plugin/pielinecomb/data/LineReportDataPane.java new file mode 100644 index 0000000..360c423 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/LineReportDataPane.java @@ -0,0 +1,62 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartReportDataPane; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class LineReportDataPane extends AbstractExtendedChartReportDataPane { + private TinyFormulaPane category; + private TinyFormulaPane gridline; + private TinyFormulaPane regioncolor; + + + @Override + protected boolean hasCustomFieldPane() { + return true; + } + + @Override + protected String[] fieldLabel() { + return new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-category"), + Toolkit.i18nText("Plugin-Pielinecomb-gridline"), + Toolkit.i18nText("Plugin-Pielinecomb-regioncolor") + }; + } + + @Override + protected TinyFormulaPane[] formulaPanes() { + if (null == category) { + this.category = new TinyFormulaPane(); + } + if (this.gridline == null) { + this.gridline = new TinyFormulaPane(); + } + if (this.regioncolor == null) { + this.regioncolor = new TinyFormulaPane(); + } + return new TinyFormulaPane[]{ + category, gridline, regioncolor + }; + } + + @Override + protected void populate(LineDataConfig dataConfig) { + populateField(this.category, dataConfig.getCategory()); + populateField(this.gridline, dataConfig.getGridline()); + populateField(this.regioncolor, dataConfig.getRegioncolor()); + } + + @Override + protected LineDataConfig update() { + LineDataConfig dataConfig = new LineDataConfig(); + updateField(this.category, dataConfig.getCategory()); + updateField(this.gridline, dataConfig.getGridline()); + updateField(this.regioncolor, dataConfig.getRegioncolor()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/LineTableDataPane.java b/src/com/fr/plugin/pielinecomb/data/LineTableDataPane.java new file mode 100644 index 0000000..f9bd39c --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/LineTableDataPane.java @@ -0,0 +1,69 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartTableDataPane; +import com.fr.extended.chart.ExtendedCustomFieldComboBoxPane; +import com.fr.extended.chart.UIComboBoxWithNone; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class LineTableDataPane extends AbstractExtendedChartTableDataPane { + private UIComboBoxWithNone category; + private UIComboBoxWithNone gridline; + private UIComboBoxWithNone regioncolor; + + + @Override + protected ExtendedCustomFieldComboBoxPane createExtendedCustomFieldComboBoxPane() { + return new ExtendedCustomFieldComboBoxPane(){ + @Override + protected boolean valueComboBoxHasNone() { + return true; + } + }; + } + + @Override + protected String[] fieldLabels() { + return new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-category"), + Toolkit.i18nText("Plugin-Pielinecomb-gridline"), + Toolkit.i18nText("Plugin-Pielinecomb-regioncolor") + }; + } + + @Override + protected UIComboBox[] filedComboBoxes() { + if (this.category == null) { + this.category = new UIComboBoxWithNone(); + } + if (this.gridline == null) { + this.gridline = new UIComboBoxWithNone(); + } + if (this.regioncolor == null) { + this.regioncolor = new UIComboBoxWithNone(); + } + return new UIComboBox[]{ + category, gridline, regioncolor + }; + } + + @Override + protected void populate(LineDataConfig dataConfig) { + populateField(this.category, dataConfig.getCategory()); + populateField(this.gridline, dataConfig.getGridline()); + populateField(this.regioncolor, dataConfig.getRegioncolor()); + } + + @Override + protected LineDataConfig update() { + LineDataConfig dataConfig = new LineDataConfig(); + updateField(this.category, dataConfig.getCategory()); + updateField(this.gridline, dataConfig.getGridline()); + updateField(this.regioncolor, dataConfig.getRegioncolor()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/PieDataConfig.java b/src/com/fr/plugin/pielinecomb/data/PieDataConfig.java new file mode 100644 index 0000000..3bf6de7 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/PieDataConfig.java @@ -0,0 +1,82 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.extended.chart.AbstractDataConfig; +import com.fr.extended.chart.ExtendedField; +import com.fr.stable.AssistUtils; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class PieDataConfig extends AbstractDataConfig { + + private ExtendedField category = new ExtendedField(); + private ExtendedField gridline = new ExtendedField(); + private ExtendedField regioncolor = new ExtendedField(); + + @Override + protected void readAttr(XMLableReader xmLableReader) { + readExtendedField(category, "category", xmLableReader); + readExtendedField(gridline, "gridline", xmLableReader); + readExtendedField(regioncolor, "regioncolor", xmLableReader); + } + + @Override + protected void writeAttr(XMLPrintWriter xmlPrintWriter) { + writeExtendedField(category, "category", xmlPrintWriter); + writeExtendedField(gridline, "gridline", xmlPrintWriter); + writeExtendedField(regioncolor, "regioncolor", xmlPrintWriter); + } + + @Override + public ExtendedField[] dataSetFields() { + return new ExtendedField[]{ + category, gridline, regioncolor + }; + } + + @Override + public PieDataConfig clone() throws CloneNotSupportedException { + PieDataConfig result = (PieDataConfig)super.clone(); + result.setCategory(this.getCategory().clone()); + result.setGridline(this.getGridline().clone()); + result.setRegioncolor(this.getRegioncolor().clone()); + return result; + } + + @Override + public boolean equals(Object obj) { + return super.equals(obj) + && obj instanceof PieDataConfig + && AssistUtils.equals(this.getCategory(), ((PieDataConfig) obj).getCategory()) + && AssistUtils.equals(this.getGridline(), ((PieDataConfig) obj).getGridline()) + && AssistUtils.equals(this.getRegioncolor(), ((PieDataConfig) obj).getRegioncolor()) + ; + } + + public ExtendedField getCategory() { + return category; + } + + public void setCategory(ExtendedField category) { + this.category = category; + } + + public ExtendedField getGridline() { + return gridline; + } + + public void setGridline(ExtendedField gridline) { + this.gridline = gridline; + } + + public ExtendedField getRegioncolor() { + return regioncolor; + } + + public void setRegioncolor(ExtendedField regioncolor) { + this.regioncolor = regioncolor; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/PieDataPane.java b/src/com/fr/plugin/pielinecomb/data/PieDataPane.java new file mode 100644 index 0000000..1aa6da7 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/PieDataPane.java @@ -0,0 +1,110 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.ReportDataDefinition; +import com.fr.chart.chartdata.TableDataDefinition; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ReportDataPane; +import com.fr.design.mainframe.chart.gui.data.TableDataPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.extended.chart.*; +import com.fr.plugin.pielinecomb.PieLineCombChart; + +public class PieDataPane extends NormalChartDataPane { + + + public PieDataPane(AttributeChangeListener paramAttributeChangeListener, ChartDataPane paramChartDataPane) { + super(paramAttributeChangeListener, paramChartDataPane); + } + + protected AbstractExtendedChartReportDataPane createReportDataContentPane() { + return new PieReportDataPane(); + } + + protected AbstractExtendedChartTableDataPane createTableDataContentPane() { + return new PieTableDataPane(); + } + + @Override + public String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Typepie"); + } + + @Override + protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { + TableDataPane tdp = new TableDataPane(chartDataPane) { + private AbstractExtendedChartTableDataPane pane; + + @Override + protected AbstractTableDataContentPane getContentPane(Chart paramAnonymousChart) { + this.pane = PieDataPane.this.createTableDataContentPane(); + return this.pane; + } + + @Override + public void populateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = paramAnonymousChartCollection.getSelectedChart(PieLineCombChart.class); + if (localAbstractChart != null) { + DataSet localDataSet = DataUtils.getSingleDataSet(PieLineCombChart.PIE_DATA, localAbstractChart); + if (accept(paramAnonymousChartCollection)) { + populateDSName((TableDataDefinition) localDataSet); + } + this.pane.populateDataSet(localDataSet); + } + } + + @Override + public void updateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + ExtendedTableDataSet localExtendedTableDataSet = this.pane.updateDataSet(); + updateDSName(localExtendedTableDataSet); + DataUtils.putSingleDataSet(PieLineCombChart.PIE_DATA, localExtendedTableDataSet, localAbstractChart); + } + + @Override + public boolean accept(Object paramAnonymousObject) { + return true; + } + }; + + return tdp; + } + + @Override + protected ReportDataPane getReportDataPane(ChartDataPane paramChartDataPane) { + return new ReportDataPane(paramChartDataPane) { + private AbstractExtendedChartReportDataPane pane; + + @Override + protected AbstractReportDataContentPane getContentPane(Chart paramAnonymousChart) { + this.pane = PieDataPane.this.createReportDataContentPane(); + return this.pane; + } + + @Override + public void populateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + if (localAbstractChart != null) { + DataSet localDataSet = DataUtils.getSingleDataSet(PieLineCombChart.PIE_DATA, localAbstractChart); + this.pane.populateDataSet(localDataSet); + } + } + + @Override + public void updateBean(ChartCollection paramAnonymousChartCollection) { + AbstractChart localAbstractChart = DataUtils.getSelectSubChart(paramAnonymousChartCollection); + DataUtils.putSingleDataSet(PieLineCombChart.PIE_DATA, this.pane.updateDataSet(), localAbstractChart); + } + + @Override + public boolean accept(Object paramAnonymousObject) { + return ((paramAnonymousObject instanceof ChartCollection)) && ((DataUtils.getSingleDataSet(PieLineCombChart.PIE_DATA, DataUtils.getSelectSubChart((ChartCollection) paramAnonymousObject)) instanceof ReportDataDefinition)); + } + }; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/PieReportDataPane.java b/src/com/fr/plugin/pielinecomb/data/PieReportDataPane.java new file mode 100644 index 0000000..bbf8971 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/PieReportDataPane.java @@ -0,0 +1,62 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartReportDataPane; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class PieReportDataPane extends AbstractExtendedChartReportDataPane { + + private TinyFormulaPane category; + private TinyFormulaPane gridline; + private TinyFormulaPane regioncolor; + + @Override + protected boolean hasCustomFieldPane() { + return true; + } + + @Override + protected String[] fieldLabel() { + return new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-category"), + Toolkit.i18nText("Plugin-Pielinecomb-gridline"), + Toolkit.i18nText("Plugin-Pielinecomb-regioncolor") + }; + } + + @Override + protected TinyFormulaPane[] formulaPanes() { + if (null == category) { + this.category = new TinyFormulaPane(); + } + if (this.gridline == null) { + this.gridline = new TinyFormulaPane(); + } + if (this.regioncolor == null) { + this.regioncolor = new TinyFormulaPane(); + } + return new TinyFormulaPane[]{ + category, gridline, regioncolor + }; + } + + @Override + protected void populate(PieDataConfig dataConfig) { + populateField(this.category, dataConfig.getCategory()); + populateField(this.gridline, dataConfig.getGridline()); + populateField(this.regioncolor, dataConfig.getRegioncolor()); + } + + @Override + protected PieDataConfig update() { + PieDataConfig dataConfig = new PieDataConfig(); + updateField(this.category, dataConfig.getCategory()); + updateField(this.gridline, dataConfig.getGridline()); + updateField(this.regioncolor, dataConfig.getRegioncolor()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/pielinecomb/data/PieTableDataPane.java b/src/com/fr/plugin/pielinecomb/data/PieTableDataPane.java new file mode 100644 index 0000000..bd07df9 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/data/PieTableDataPane.java @@ -0,0 +1,69 @@ +package com.fr.plugin.pielinecomb.data; + +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.i18n.Toolkit; +import com.fr.extended.chart.AbstractExtendedChartTableDataPane; +import com.fr.extended.chart.ExtendedCustomFieldComboBoxPane; +import com.fr.extended.chart.UIComboBoxWithNone; + +/** + * @author duan.jingliang + * @date 2022/10/19 + */ +public class PieTableDataPane extends AbstractExtendedChartTableDataPane { + private UIComboBoxWithNone category; + private UIComboBoxWithNone gridline; + private UIComboBoxWithNone regioncolor; + + + @Override + protected ExtendedCustomFieldComboBoxPane createExtendedCustomFieldComboBoxPane() { + return new ExtendedCustomFieldComboBoxPane(){ + @Override + protected boolean valueComboBoxHasNone() { + return true; + } + }; + } + + @Override + protected String[] fieldLabels() { + return new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-category"), + Toolkit.i18nText("Plugin-Pielinecomb-gridline"), + Toolkit.i18nText("Plugin-Pielinecomb-regioncolor") + }; + } + + @Override + protected UIComboBox[] filedComboBoxes() { + if (this.category == null) { + this.category = new UIComboBoxWithNone(); + } + if (this.gridline == null) { + this.gridline = new UIComboBoxWithNone(); + } + if (this.regioncolor == null) { + this.regioncolor = new UIComboBoxWithNone(); + } + return new UIComboBox[]{ + category, gridline, regioncolor + }; + } + + @Override + protected void populate(PieDataConfig dataConfig) { + populateField(this.category, dataConfig.getCategory()); + populateField(this.gridline, dataConfig.getGridline()); + populateField(this.regioncolor, dataConfig.getRegioncolor()); + } + + @Override + protected PieDataConfig update() { + PieDataConfig dataConfig = new PieDataConfig(); + updateField(this.category, dataConfig.getCategory()); + updateField(this.gridline, dataConfig.getGridline()); + updateField(this.regioncolor, dataConfig.getRegioncolor()); + return dataConfig; + } +} diff --git a/src/com/fr/plugin/pielinecomb/images/comb.png b/src/com/fr/plugin/pielinecomb/images/comb.png new file mode 100644 index 0000000000000000000000000000000000000000..3842c719cf09a7bf8c380295a7d6f1e734235a76 GIT binary patch literal 3505 zcmV;i4NmfjP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)p@E5RI61Ft6o-prbbn>P~)iy)E2AN zsU20jsWz_8Qg>31P|s0cqrPALg8E|(vWA65poU1JRAaZs8I2(p#xiB`SVGovRs-uS zYnV-9TeA7=Om+qP8+I>yOjAR1s%ETak!GFdam@h^# z)@rS0t$wXH+Irf)+G6c;?H29p+V6F6oj{!|o%K3xI`?%6x;DB|x`n#ibhIR?(H}Q3Gzd138Ei2)WAMz7W9Vy`X}HnwgyEn!VS)>mv$8&{hQn>w4zwy3R}t;BYlZQm5)6pty=DfLrs+A-|>>;~;Q z_F?uV_HFjh9n2gO9o9Q^JA86v({H5aB!kjoO6 zc9$1ZZKsN-Zl8L~mE{`ly3)1N^`o1+o7}D0ZPeY&J;i;i`%NyJ8_8Y6J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z0^UhPK~#9!?AggrlR+5AasMMo;UbBagT};oP%jOS+1Ys% zMd3dgu?+$&zyd750xZA+EWiSsjNq#s(`d|Lw9d%VOf`imYMDw-aBc4lsU`syU;!53 zBmyre3wS5{u?&^-DB7l8@RtQR-!S>h*s1QG`6IA`!qb?K0)H`j*-3rWqwWej+*71n zjF8pX%E{MP*xT?JjrBd%&l2l`?XGD6x?)~*eg_8G$)ji+3W~bHcGomJ?z+(XFJTN6 zQy8+5)n3Je!FOwd)6HWPHic>VLGIo<=oGqmz9Pm8k%&>)%{iW==-$|x4y0k`P4s)z7rarK1{3(S2 z34Op$R-+rOGs4!=VGg$6!x(T-7_xEHSHaF(zD2D4BipWp$nC77AZX#rhjQ$_&)HZs z{=*4SCAek0YZ=?nN~RQMb8!@{GeU+fir({_tKsYDWE%#*#J-khcHj1L#9N6jV8s$D zBlvlMF8K>-mQi(so5wma$`a>?9qeyzL%Ra|{ZXpznFA8kymgcRO2QaeJocxDipXxS zkZvt)E3-bG_I6Gn{ueXMbk^!vE zakYaL>Z2YEvV_iWr(>cI0H-_t%h*|&!zmXQ@Aj@*FWV~yNVyPM%3;-l8>3Iq%T9ED z2VF7mQeHaTQ@;hT*LbKFTp#sd4wdmH9$eLUBn>z|uW%d%cR`|r- z*s5MxfCX591z3Ou_%DIu@i-=viJY7qa&vS4`OMDF#%i^Sza;?{U;!3j0Ty5Z7GMGX fSK!$H1pYbzh_@O>LpESd00000NkvXXu0mjfZ40tI literal 0 HcmV?d00001 diff --git a/src/com/fr/plugin/pielinecomb/images/demo.png b/src/com/fr/plugin/pielinecomb/images/demo.png new file mode 100644 index 0000000000000000000000000000000000000000..d5aa9198bdc693564bfdf20382fb7bf56aab75e4 GIT binary patch literal 32465 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 DR^lg* literal 0 HcmV?d00001 diff --git a/src/com/fr/plugin/pielinecomb/images/icon.png b/src/com/fr/plugin/pielinecomb/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f873c92fabe65c4b5a07b2940fffe9600becff31 GIT binary patch literal 3198 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 literal 0 HcmV?d00001 diff --git a/src/com/fr/plugin/pielinecomb/images/line.png b/src/com/fr/plugin/pielinecomb/images/line.png new file mode 100644 index 0000000000000000000000000000000000000000..b79532d27e038f3050d4f9bf385e1aa64204bd2d GIT binary patch literal 3849 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 M07*qoM6N<$f&)jrqyPW_ literal 0 HcmV?d00001 diff --git a/src/com/fr/plugin/pielinecomb/locale/pielinecomb.properties b/src/com/fr/plugin/pielinecomb/locale/pielinecomb.properties new file mode 100644 index 0000000..4d97250 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/locale/pielinecomb.properties @@ -0,0 +1,107 @@ +Plugin-Pielinecomb-Typepie=\u67F1\u5F62\u56FE +Plugin-Pielinecomb-Typeline=\u6298\u7EBF\u56FE +Plugin-Pielinecomb-Typecomb=\u67F1\u5F62\u6298\u7EBF\u7EC4\u5408\u56FE + +Plugin-Pielinecomb-category=\u5206\u7C7B +Plugin-Pielinecomb-gridline=\u7F51\u683C\u7EBF +Plugin-Pielinecomb-regioncolor=\u80CC\u666F\u8272 + +Plugin-Pielinecomb-isVisiableTitle=\u663E\u793A\u6807\u9898 +Plugin-Pielinecomb-titleBgColor=\u80CC\u666F\u989C\u8272 +Plugin-Pielinecomb-titleBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-Pielinecomb-TitleText=\u5185\u5BB9 +Plugin-Pielinecomb-TitlePosition=\u4F4D\u7F6E +Plugin-Pielinecomb-TitleExpand=\u6807\u9898\u8BBE\u7F6E +Plugin-Pielinecomb-TitleStyle=\u6837\u5F0F +Plugin-Pielinecomb-TitleNameExpand=\u6807\u9898 +Plugin-Pielinecomb-bgExpand=\u80CC\u666F + +Plugin-Pielinecomb-StyleLegendTitle=\u56FE\u4F8B +Plugin-Pielinecomb-showylegend=\u663E\u793A\u56FE\u4F8B +Plugin-Pielinecomb-legendposition=\u65B9\u4F4D +Plugin-Pielinecomb-legendalignment=\u4F4D\u7F6E +Plugin-Pielinecomb-legendmargin=\u8FB9\u8DDD +Plugin-Pielinecomb-ChartLegendPositionExpand=\u56FE\u4F8B\u4F4D\u7F6E + +Plugin-Pielinecomb-auto=\u81EA\u52A8 +Plugin-Pielinecomb-general=\u901A\u7528 +Plugin-Pielinecomb-custom=\u81EA\u5B9A\u4E49 +Plugin-Pielinecomb-layout=\u5E03\u5C40 +Plugin-Pielinecomb-format=\u683C\u5F0F +Plugin-Pielinecomb-condition=\u6761\u4EF6 +Plugin-Pielinecomb-textDirection=\u6587\u672C\u65B9\u5411 +Plugin-Pielinecomb-DirectOrientation=\u6A2A\u5411 +Plugin-Pielinecomb-DirectVertical=\u7EB5\u5411 +Plugin-Pielinecomb-left=\u5DE6\u4FA7 +Plugin-Pielinecomb-right=\u53F3\u4FA7 +Plugin-Pielinecomb-hyperLink=\u8D85\u7EA7\u94FE\u63A5 +Plugin-Pielinecomb-color=\u914D\u8272 + +Plugin-Pielinecomb-StyleSeriesTitle=\u7CFB\u5217 +Plugin-Pielinecomb-posoutside=\u5916\u4FA7 +Plugin-Pielinecomb-posinside=\u5185\u4FA7 +Plugin-Pielinecomb-poscenter=\u5C45\u4E2D +Plugin-Pielinecomb-postop=\u4E0A\u65B9 +Plugin-Pielinecomb-posbottom=\u4E0B\u65B9 +Plugin-Pielinecomb-StyleLegendLabel=\u6807\u7B7E +Plugin-Pielinecomb-showPieLabel=\u663E\u793A\u6807\u7B7E +Plugin-Pielinecomb-showPieCategory=\u5206\u7C7B\u540D +Plugin-Pielinecomb-showPieSeries=\u7CFB\u5217\u540D +Plugin-Pielinecomb-showPieValue=\u6570\u503C +Plugin-Pielinecomb-brokenLine=\u6298\u7EBF +Plugin-Pielinecomb-smoothLine=\u66F2\u7EBF + +Plugin-Pielinecomb-barWidthLabel=\u67F1\u5BBD\u65B9\u5F0F +Plugin-Pielinecomb-barWidth=\u5BBD\u5EA6 +Plugin-Pielinecomb-seriesGapWidth=\u7CFB\u5217\u95F4\u9694 + +Plugin-Pielinecomb-seriesColor=\u7CFB\u5217\u8272 +Plugin-Pielinecomb-customColor=\u81EA\u5B9A\u4E49\u989C\u8272 +Plugin-Pielinecomb-Default=\u9ED8\u8BA4 +Plugin-Pielinecomb-shapeCircle=\u5706\u5F62 +Plugin-Pielinecomb-shapeRect=\u6B63\u65B9\u5F62 +Plugin-Pielinecomb-shapeTriangle=\u4E09\u89D2\u5F62 +Plugin-Pielinecomb-shapeDiamond=\u83F1\u5F62 + +Plugin-Pielinecomb-lineType=\u7EBF\u578B +Plugin-Pielinecomb-lineWidth=\u7EBF\u5BBD +Plugin-Pielinecomb-lineCornerType=\u5F62\u6001 + +Plugin-Pielinecomb-lineCornerShape=\u70B9\u6837\u5F0F +Plugin-Pielinecomb-lineCornerColorType=\u586B\u5145\u989C\u8272 +Plugin-Pielinecomb-lineCornerRadius=\u534A\u5F84 +Plugin-Pielinecomb-LineStyle=\u7EBF\u6837\u5F0F +Plugin-Pielinecomb-CornerStyle=\u6807\u8BB0\u70B9 + +Plugin-Pielinecomb-StyleAxisTitle=\u5750\u6807\u8F74 +Plugin-Pielinecomb-StyleAxisXTitle=X\u8F74 +Plugin-Pielinecomb-StyleAxisYTitle=Y\u8F74 +Plugin-Pielinecomb-textRotation=\u6587\u672C\u65CB\u8F6C +Plugin-Pielinecomb-isLabelVisiable=\u663E\u793A\u6807\u7B7E +Plugin-Pielinecomb-axisLabelTitle=\u8F74\u6807\u7B7E +Plugin-Pielinecomb-labelFormatType=\u8F74\u6807\u7B7E\u683C\u5F0F +Plugin-Pielinecomb-yAxisPosition=\u8F74\u6807\u7B7E\u4F4D\u7F6E +Plugin-Pielinecomb-valueDefined=\u503C\u5B9A\u4E49 +Plugin-Pielinecomb-minValue=\u81EA\u5B9A\u4E49\u6700\u5C0F\u503C +Plugin-Pielinecomb-maxValue=\u81EA\u5B9A\u4E49\u6700\u5927\u503C +Plugin-Pielinecomb-intervalValue=\u81EA\u5B9A\u4E49\u523B\u5EA6\u503C + +Plugin-Pielinecomb-showPieTip=\u663E\u793A\u63D0\u793A +Plugin-Pielinecomb-StyleLegendTips=\u63D0\u793A +Plugin-Pielinecomb-Cond-AddCondtion=\u6DFB\u52A0 +Plugin-Pielinecomb-Cond-clearButton=\u6E05\u7A7A +Plugin-Pielinecomb-styleCondition=\u6837\u5F0F\u6761\u4EF6\u5C5E\u6027 +Plugin-Pielinecomb-AnimalTitle=\u7279\u6548 + +Plugin-Pielinecomb-lineColor=\u7F51\u683C\u7EBF\u989C\u8272 +Plugin-Pielinecomb-bgGridX=Y\u8F74\u7F51\u683C\u7EBF +Plugin-Pielinecomb-StyleBgTitle=\u80CC\u666F +Plugin-Pielinecomb-BgXTitleStyle=X\u8F74\u80CC\u666F +Plugin-Pielinecomb-fixHeight=\u56FA\u5B9A\u95F4\u9694 +Plugin-Pielinecomb-BgYTitleStyle=Y\u8F74\u80CC\u666F +Plugin-Pielinecomb-Cond-CustomGrid=\u81EA\u5B9A\u4E49\u7F51\u683C +Plugin-Pielinecomb-bgChartType=\u914D\u7F6E\u6570\u636E +Plugin-Pielinecomb-seriesAxisRela=\u7CFB\u5217\u5750\u6807\u914D\u7F6E +Plugin-Pielinecomb-seriesAxis=\u7CFB\u5217\u5750\u6807 + +Plugin-Pielinecomb-isShowZoomTool=\u663E\u793A\u6570\u636E\u7F29\u653E\u7EC4\u4EF6 \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/locale/pielinecomb_zh_CN.properties b/src/com/fr/plugin/pielinecomb/locale/pielinecomb_zh_CN.properties new file mode 100644 index 0000000..4d97250 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/locale/pielinecomb_zh_CN.properties @@ -0,0 +1,107 @@ +Plugin-Pielinecomb-Typepie=\u67F1\u5F62\u56FE +Plugin-Pielinecomb-Typeline=\u6298\u7EBF\u56FE +Plugin-Pielinecomb-Typecomb=\u67F1\u5F62\u6298\u7EBF\u7EC4\u5408\u56FE + +Plugin-Pielinecomb-category=\u5206\u7C7B +Plugin-Pielinecomb-gridline=\u7F51\u683C\u7EBF +Plugin-Pielinecomb-regioncolor=\u80CC\u666F\u8272 + +Plugin-Pielinecomb-isVisiableTitle=\u663E\u793A\u6807\u9898 +Plugin-Pielinecomb-titleBgColor=\u80CC\u666F\u989C\u8272 +Plugin-Pielinecomb-titleBgOpacity=\u4E0D\u900F\u660E\u5EA6 +Plugin-Pielinecomb-TitleText=\u5185\u5BB9 +Plugin-Pielinecomb-TitlePosition=\u4F4D\u7F6E +Plugin-Pielinecomb-TitleExpand=\u6807\u9898\u8BBE\u7F6E +Plugin-Pielinecomb-TitleStyle=\u6837\u5F0F +Plugin-Pielinecomb-TitleNameExpand=\u6807\u9898 +Plugin-Pielinecomb-bgExpand=\u80CC\u666F + +Plugin-Pielinecomb-StyleLegendTitle=\u56FE\u4F8B +Plugin-Pielinecomb-showylegend=\u663E\u793A\u56FE\u4F8B +Plugin-Pielinecomb-legendposition=\u65B9\u4F4D +Plugin-Pielinecomb-legendalignment=\u4F4D\u7F6E +Plugin-Pielinecomb-legendmargin=\u8FB9\u8DDD +Plugin-Pielinecomb-ChartLegendPositionExpand=\u56FE\u4F8B\u4F4D\u7F6E + +Plugin-Pielinecomb-auto=\u81EA\u52A8 +Plugin-Pielinecomb-general=\u901A\u7528 +Plugin-Pielinecomb-custom=\u81EA\u5B9A\u4E49 +Plugin-Pielinecomb-layout=\u5E03\u5C40 +Plugin-Pielinecomb-format=\u683C\u5F0F +Plugin-Pielinecomb-condition=\u6761\u4EF6 +Plugin-Pielinecomb-textDirection=\u6587\u672C\u65B9\u5411 +Plugin-Pielinecomb-DirectOrientation=\u6A2A\u5411 +Plugin-Pielinecomb-DirectVertical=\u7EB5\u5411 +Plugin-Pielinecomb-left=\u5DE6\u4FA7 +Plugin-Pielinecomb-right=\u53F3\u4FA7 +Plugin-Pielinecomb-hyperLink=\u8D85\u7EA7\u94FE\u63A5 +Plugin-Pielinecomb-color=\u914D\u8272 + +Plugin-Pielinecomb-StyleSeriesTitle=\u7CFB\u5217 +Plugin-Pielinecomb-posoutside=\u5916\u4FA7 +Plugin-Pielinecomb-posinside=\u5185\u4FA7 +Plugin-Pielinecomb-poscenter=\u5C45\u4E2D +Plugin-Pielinecomb-postop=\u4E0A\u65B9 +Plugin-Pielinecomb-posbottom=\u4E0B\u65B9 +Plugin-Pielinecomb-StyleLegendLabel=\u6807\u7B7E +Plugin-Pielinecomb-showPieLabel=\u663E\u793A\u6807\u7B7E +Plugin-Pielinecomb-showPieCategory=\u5206\u7C7B\u540D +Plugin-Pielinecomb-showPieSeries=\u7CFB\u5217\u540D +Plugin-Pielinecomb-showPieValue=\u6570\u503C +Plugin-Pielinecomb-brokenLine=\u6298\u7EBF +Plugin-Pielinecomb-smoothLine=\u66F2\u7EBF + +Plugin-Pielinecomb-barWidthLabel=\u67F1\u5BBD\u65B9\u5F0F +Plugin-Pielinecomb-barWidth=\u5BBD\u5EA6 +Plugin-Pielinecomb-seriesGapWidth=\u7CFB\u5217\u95F4\u9694 + +Plugin-Pielinecomb-seriesColor=\u7CFB\u5217\u8272 +Plugin-Pielinecomb-customColor=\u81EA\u5B9A\u4E49\u989C\u8272 +Plugin-Pielinecomb-Default=\u9ED8\u8BA4 +Plugin-Pielinecomb-shapeCircle=\u5706\u5F62 +Plugin-Pielinecomb-shapeRect=\u6B63\u65B9\u5F62 +Plugin-Pielinecomb-shapeTriangle=\u4E09\u89D2\u5F62 +Plugin-Pielinecomb-shapeDiamond=\u83F1\u5F62 + +Plugin-Pielinecomb-lineType=\u7EBF\u578B +Plugin-Pielinecomb-lineWidth=\u7EBF\u5BBD +Plugin-Pielinecomb-lineCornerType=\u5F62\u6001 + +Plugin-Pielinecomb-lineCornerShape=\u70B9\u6837\u5F0F +Plugin-Pielinecomb-lineCornerColorType=\u586B\u5145\u989C\u8272 +Plugin-Pielinecomb-lineCornerRadius=\u534A\u5F84 +Plugin-Pielinecomb-LineStyle=\u7EBF\u6837\u5F0F +Plugin-Pielinecomb-CornerStyle=\u6807\u8BB0\u70B9 + +Plugin-Pielinecomb-StyleAxisTitle=\u5750\u6807\u8F74 +Plugin-Pielinecomb-StyleAxisXTitle=X\u8F74 +Plugin-Pielinecomb-StyleAxisYTitle=Y\u8F74 +Plugin-Pielinecomb-textRotation=\u6587\u672C\u65CB\u8F6C +Plugin-Pielinecomb-isLabelVisiable=\u663E\u793A\u6807\u7B7E +Plugin-Pielinecomb-axisLabelTitle=\u8F74\u6807\u7B7E +Plugin-Pielinecomb-labelFormatType=\u8F74\u6807\u7B7E\u683C\u5F0F +Plugin-Pielinecomb-yAxisPosition=\u8F74\u6807\u7B7E\u4F4D\u7F6E +Plugin-Pielinecomb-valueDefined=\u503C\u5B9A\u4E49 +Plugin-Pielinecomb-minValue=\u81EA\u5B9A\u4E49\u6700\u5C0F\u503C +Plugin-Pielinecomb-maxValue=\u81EA\u5B9A\u4E49\u6700\u5927\u503C +Plugin-Pielinecomb-intervalValue=\u81EA\u5B9A\u4E49\u523B\u5EA6\u503C + +Plugin-Pielinecomb-showPieTip=\u663E\u793A\u63D0\u793A +Plugin-Pielinecomb-StyleLegendTips=\u63D0\u793A +Plugin-Pielinecomb-Cond-AddCondtion=\u6DFB\u52A0 +Plugin-Pielinecomb-Cond-clearButton=\u6E05\u7A7A +Plugin-Pielinecomb-styleCondition=\u6837\u5F0F\u6761\u4EF6\u5C5E\u6027 +Plugin-Pielinecomb-AnimalTitle=\u7279\u6548 + +Plugin-Pielinecomb-lineColor=\u7F51\u683C\u7EBF\u989C\u8272 +Plugin-Pielinecomb-bgGridX=Y\u8F74\u7F51\u683C\u7EBF +Plugin-Pielinecomb-StyleBgTitle=\u80CC\u666F +Plugin-Pielinecomb-BgXTitleStyle=X\u8F74\u80CC\u666F +Plugin-Pielinecomb-fixHeight=\u56FA\u5B9A\u95F4\u9694 +Plugin-Pielinecomb-BgYTitleStyle=Y\u8F74\u80CC\u666F +Plugin-Pielinecomb-Cond-CustomGrid=\u81EA\u5B9A\u4E49\u7F51\u683C +Plugin-Pielinecomb-bgChartType=\u914D\u7F6E\u6570\u636E +Plugin-Pielinecomb-seriesAxisRela=\u7CFB\u5217\u5750\u6807\u914D\u7F6E +Plugin-Pielinecomb-seriesAxis=\u7CFB\u5217\u5750\u6807 + +Plugin-Pielinecomb-isShowZoomTool=\u663E\u793A\u6570\u636E\u7F29\u653E\u7EC4\u4EF6 \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/ui/BgGridCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/BgGridCondCreator.java new file mode 100644 index 0000000..f39ed8d --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/BgGridCondCreator.java @@ -0,0 +1,100 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.BgGridXJson; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +/** + * @author duan.jingliang + */ +public class BgGridCondCreator extends AbstractVanChartScrollPane { + + private UISpinner valueY; + private ColorSelectBox lineColor; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.valueY.setValue(chartConf.getDouble("valueY")); + this.lineColor.setSelectObject(MapUtil.toColor(chartConf.getString("lineColor"))); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("valueY", this.valueY.getValue()); + chartConf.put("lineColor", MapUtil.toHex(this.lineColor.getSelectObject())); + + BgGridXJson json = new BgGridXJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.valueY = new UISpinner(0, 999999999, 1, 100); + this.lineColor = new ColorSelectBox(100); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-showPieValue")), this.valueY}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineColor")), this.lineColor} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f}); + } + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/BgGridCondListPane.java b/src/com/fr/plugin/pielinecomb/ui/BgGridCondListPane.java new file mode 100644 index 0000000..cbfbb66 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/BgGridCondListPane.java @@ -0,0 +1,149 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.i18n.Toolkit; +import com.fr.general.NameObject; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.BgGridXJson; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.stable.ListMap; +import com.fr.stable.Nameable; +import com.fr.van.chart.designer.component.VanChartUIListControlPane; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author duan.jingliang + */ +public class BgGridCondListPane extends VanChartUIListControlPane { + + private PieLineCombChart chart; + + private HashMap paneMap; + private HashMap jsonMap; + + public BgGridCondListPane() { + paneMap = new HashMap(6); + paneMap.put(CustomJsonObject.BG_GRID_X, BgGridCondCreator.class); + + jsonMap = new HashMap(6); + jsonMap.put(CustomJsonObject.BG_GRID_X, BgGridXJson.class); + } + + @Override + protected void update(Plot plot) { + } + + public void populateStyle(PieLineCombChart chart) { + this.chart = chart; + + JSONObject styleCond = chart.getStyleCond(); + if (null != styleCond && null != styleCond.get("grid")) { + JSONArray chartConf = styleCond.getJSONArray("grid"); + ArrayList noList = new ArrayList(); + for (int i = 0; null != chartConf && i < chartConf.size(); i++) { + JSONObject line = chartConf.getJSONObject(i); + if (null != line) { + try { + CustomJsonObject json = (CustomJsonObject)this.getJsonByTitle(line.getString("title")).newInstance(); + json.put(line); + UIMenuNameableCreator var11 = new UIMenuNameableCreator(line.getString("titleName"), json, this.getEditPaneByTitle(line.getString("title"))); + noList.add(new NameObject(var11.getName(), var11.getObj())); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + this.populate((Nameable[])noList.toArray(new NameObject[noList.size()])); + this.doLayout(); + } + + } + + public void updateStyle(PieLineCombChart chart) { + Nameable[] nameables = this.update(); + + JSONArray objConf = JSONArray.create(); + for (int i = 0; i < nameables.length; i++) { + CustomJsonObject noObj = (CustomJsonObject)((NameObject)nameables[i]).getObject(); + if (null == noObj) { + noObj = new CustomJsonObject(); + noObj.put(JSONObject.create()); + } + if (null == noObj.get()) { + noObj.put(JSONObject.create()); + } + + noObj.get().put("titleName", ((NameObject)nameables[i]).getName()); + objConf.add(noObj.get()); + } + + if (null == chart.getStyleCond()) { + chart.setStyleCond(JSONObject.create()); + } + chart.getStyleCond().put("grid", objConf); + + } + + @Override + public NameableCreator[] createNameableCreators() { + ListMap creatorMap = new ListMap(); + + NameableCreator grid = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-bgGridX"), BgGridXJson.class, BgGridCondCreator.class); + creatorMap.put(grid.menuName(), grid); + + return (NameableCreator[])creatorMap.values().toArray(new NameableCreator[creatorMap.size()]); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + protected String getAddItemText() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-CustomGrid"); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + Constructor var2 = null; + try { + var2 = nameableCreator.getUpdatePane().getConstructor(); + return (BasicBeanPane)var2.newInstance(); + } catch (InstantiationException var4) { + FineLoggerFactory.getLogger().error(var4.getMessage(), var4); + } catch (IllegalAccessException var5) { + FineLoggerFactory.getLogger().error(var5.getMessage(), var5); + } catch (NoSuchMethodException var6) { + return super.createPaneByCreators(nameableCreator); + } catch (InvocationTargetException var7) { + FineLoggerFactory.getLogger().error(var7.getMessage(), var7); + } + return null; + } + + private Class getEditPaneByTitle(String title) { + return (Class)paneMap.get(title); + } + + private Class getJsonByTitle(String title) { + return (Class)jsonMap.get(title); + } + + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/LineCondListPane.java b/src/com/fr/plugin/pielinecomb/ui/LineCondListPane.java new file mode 100644 index 0000000..ddcb49c --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/LineCondListPane.java @@ -0,0 +1,161 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.i18n.Toolkit; +import com.fr.general.NameObject; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemColorJson; +import com.fr.plugin.pielinecomb.vo.ItemLabelJson; +import com.fr.plugin.pielinecomb.vo.ItemTipsJson; +import com.fr.stable.ListMap; +import com.fr.stable.Nameable; +import com.fr.van.chart.designer.component.VanChartUIListControlPane; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author duan.jingliang + */ +public class LineCondListPane extends VanChartUIListControlPane { + + private PieLineCombChart chart; + + private HashMap paneMap; + private HashMap jsonMap; + + public LineCondListPane() { + paneMap = new HashMap(6); + paneMap.put(CustomJsonObject.ITEM_COLOR, PieLineCombColorCondCreator.class); + paneMap.put(CustomJsonObject.ITEM_LABEL, LineLabelCondCreator.class); + paneMap.put(CustomJsonObject.ITEM_TIPS, PieLineCombTipsCondCreator.class); + + jsonMap = new HashMap(6); + jsonMap.put(CustomJsonObject.ITEM_COLOR, ItemColorJson.class); + jsonMap.put(CustomJsonObject.ITEM_LABEL, ItemLabelJson.class); + jsonMap.put(CustomJsonObject.ITEM_TIPS, ItemTipsJson.class); + } + + @Override + protected void update(Plot plot) { + } + + public void populateStyle(PieLineCombChart chart) { + this.chart = chart; + + JSONObject styleCond = chart.getStyleCond(); + if (null != styleCond && null != styleCond.get("line")) { + JSONArray chartConf = styleCond.getJSONArray("line"); + ArrayList noList = new ArrayList(); + for (int i = 0; null != chartConf && i < chartConf.size(); i++) { + JSONObject line = chartConf.getJSONObject(i); + if (null != line) { + try { + CustomJsonObject json = (CustomJsonObject)this.getJsonByTitle(line.getString("title")).newInstance(); + json.put(line); + UIMenuNameableCreator var11 = new UIMenuNameableCreator(line.getString("titleName"), json, this.getEditPaneByTitle(line.getString("title"))); + noList.add(new NameObject(var11.getName(), var11.getObj())); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + this.populate((Nameable[])noList.toArray(new NameObject[noList.size()])); + this.doLayout(); + } + + } + + public void updateStyle(PieLineCombChart chart) { + Nameable[] nameables = this.update(); + + JSONArray objConf = JSONArray.create(); + for (int i = 0; i < nameables.length; i++) { + CustomJsonObject noObj = (CustomJsonObject)((NameObject)nameables[i]).getObject(); + if (null == noObj) { + noObj = new CustomJsonObject(); + noObj.put(JSONObject.create()); + } + if (null == noObj.get()) { + noObj.put(JSONObject.create()); + } + + noObj.get().put("titleName", ((NameObject)nameables[i]).getName()); + objConf.add(noObj.get()); + } + + if (null == chart.getStyleCond()) { + chart.setStyleCond(JSONObject.create()); + } + chart.getStyleCond().put("line", objConf); + + } + + @Override + public NameableCreator[] createNameableCreators() { + ListMap creatorMap = new ListMap(); + + NameableCreator color = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-color"), ItemColorJson.class, PieLineCombColorCondCreator.class); + creatorMap.put(color.menuName(), color); + + NameableCreator label = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendLabel"), ItemLabelJson.class, LineLabelCondCreator.class); + creatorMap.put(label.menuName(), label); + + NameableCreator tips = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendTips"), ItemTipsJson.class, PieLineCombTipsCondCreator.class); + creatorMap.put(tips.menuName(), tips); + + return (NameableCreator[])creatorMap.values().toArray(new NameableCreator[creatorMap.size()]); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + protected String getAddItemText() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + Constructor var2 = null; + try { + var2 = nameableCreator.getUpdatePane().getConstructor(); + return (BasicBeanPane)var2.newInstance(); + } catch (InstantiationException var4) { + FineLoggerFactory.getLogger().error(var4.getMessage(), var4); + } catch (IllegalAccessException var5) { + FineLoggerFactory.getLogger().error(var5.getMessage(), var5); + } catch (NoSuchMethodException var6) { + return super.createPaneByCreators(nameableCreator); + } catch (InvocationTargetException var7) { + FineLoggerFactory.getLogger().error(var7.getMessage(), var7); + } + return null; + } + + private Class getEditPaneByTitle(String title) { + return (Class)paneMap.get(title); + } + + private Class getJsonByTitle(String title) { + return (Class)jsonMap.get(title); + } + + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/LineLabelCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/LineLabelCondCreator.java new file mode 100644 index 0000000..a2e3de2 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/LineLabelCondCreator.java @@ -0,0 +1,148 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemLabelJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class LineLabelCondCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private LineLabelStylePane lineLabelStylePane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.lineLabelStylePane.populateBean(chartConf); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("condition", this.condition.getText()); + + JSONObject pieLabel = this.lineLabelStylePane.update(); + chartConf.mergeIn(pieLabel); + + ItemLabelJson json = new ItemLabelJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.lineLabelStylePane = new LineLabelStylePane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.lineLabelStylePane); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox filed = new UIComboBox(new String[]{"分类名", "系列名", "数值"}); + final UIComboBox cond = new UIComboBox(new String[]{"==", "!=", ">", ">=", "<", "<="}); + + UIButton add = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{filed, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{" + filed.getSelectedItem() + "}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-condition"), sumPane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/LineLabelStylePane.java b/src/com/fr/plugin/pielinecomb/ui/LineLabelStylePane.java new file mode 100644 index 0000000..0110478 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/LineLabelStylePane.java @@ -0,0 +1,202 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author duan.jingliang + * @date 2022/10/22 + */ +public class LineLabelStylePane extends JPanel { + private UIButtonGroup lineValueType; + private CardLayout lineCardLayout; + private JPanel lineCardPane; + + private UICheckBox showLineLabel; + private UICheckBox showLineCategory; + private UICheckBox showLineSeries; + private UICheckBox showLineValue; + private UITextArea lineJsPane; + private ChartTextAttrPane lineTextAttrPane; + + private UIButtonGroup linePosition; + + + public LineLabelStylePane() { + initComponents(); + } + + public void populateBean(JSONObject chartConf) { + this.showLineLabel.setSelected(chartConf.getBoolean("showLineLabel")); + this.lineValueType.setSelectedItem(chartConf.getInt("lineValueType")); + this.showLineCategory.setSelected(chartConf.getBoolean("showLineCategory")); + this.showLineSeries.setSelected(chartConf.getBoolean("showLineSeries")); + this.showLineValue.setSelected(chartConf.getBoolean("showLineValue")); + this.lineJsPane.setText(chartConf.getString("lineJsPane")); + this.linePosition.setSelectedItem(chartConf.getString("linePosition")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("linelabelfamily"), + chartConf.getInt("linelabelstyle"), + chartConf.getInt("linelabelsize"), + MapUtil.toColor(chartConf.getString("linelabelcolor"))); + this.lineTextAttrPane.populate(textFont); + + if (chartConf.getInt("lineValueType") == 2) { + this.lineCardLayout.show(this.lineCardPane, "linejs"); + } else { + this.lineCardLayout.show(this.lineCardPane, "linecheck"); + } + } + + public JSONObject update() { + JSONObject chartConf = JSONObject.create(); + chartConf.put("showLineLabel", this.showLineLabel.isSelected()); + chartConf.put("lineValueType", this.lineValueType.getSelectedItem()); + chartConf.put("showLineCategory", this.showLineCategory.isSelected()); + chartConf.put("showLineSeries", this.showLineSeries.isSelected()); + chartConf.put("showLineValue", this.showLineValue.isSelected()); + chartConf.put("lineJsPane", this.lineJsPane.getText()); + chartConf.put("linePosition", this.linePosition.getSelectedItem()); + + TextAttr textAttr = this.lineTextAttrPane.update(); + chartConf.put("linelabelsize", textAttr.getFRFont().getSize()); + chartConf.put("linelabelstyle", textAttr.getFRFont().getStyle()); + chartConf.put("linelabelfamily", textAttr.getFRFont().getFamily()); + chartConf.put("linelabelcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + return chartConf; + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createLineLabelPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + + private JPanel createLineLabelPane() { + lineValueType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-general"), + Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, + new Integer[]{1, 2} + ); + lineValueType.setSelectedItem(1); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.lineValueType} + }; + JPanel lineValueTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + + showLineLabel = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-showPieLabel")); + + showLineCategory = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-showPieCategory")); + showLineSeries = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-showPieSeries")); + showLineValue = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-showPieValue")); + + Component[][] compCheck = new Component[][]{ + new Component[]{showLineCategory}, + new Component[]{showLineSeries}, + new Component[]{showLineValue} + }; + final JPanel checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compCheck, new double[]{p, p, p, p}, new double[]{f}); + + lineJsPane = new UITextArea(6, 6); + + lineCardPane = new JPanel(this.lineCardLayout = new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != lineValueType.getSelectedItem() && lineValueType.getSelectedItem() == 2) { + return lineJsPane.getPreferredSize(); + } else { + return checkPane.getPreferredSize(); + } + } + }; + lineCardPane.add(checkPane, "linecheck"); + lineCardPane.add(lineJsPane, "linejs"); + this.lineCardLayout.show(lineCardPane, "linecheck"); + lineValueType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (lineValueType.getSelectedItem() == 1) { + lineCardLayout.show(lineCardPane, "linecheck"); + } else { + lineCardLayout.show(lineCardPane, "linejs"); + } + } + }); + + Component[][] contentComp = new Component[][]{ + new Component[]{lineValueTypePane}, + new Component[]{lineCardPane} + }; + JPanel contentCompPane = TableLayout4VanChartHelper.createGapTableLayoutPane(contentComp, new double[]{p, p, p}, new double[]{f}); + JPanel contentPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleText"), contentCompPane); + + JPanel stylePane = createLineTextPane(); + + JPanel layoutPane = createLinePosition(); + + Component[][] comps = new Component[][]{ + new Component[]{showLineLabel}, + new Component[]{contentPane}, + new Component[]{stylePane}, + new Component[]{layoutPane} + }; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{f}); + } + + private JPanel createLinePosition() { + this.linePosition = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-postop"), + Toolkit.i18nText("Plugin-Pielinecomb-posbottom") + }, + new String[]{"top", "bottom"} + ); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition")), this.linePosition} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-layout"), pane); + } + + private JPanel createLineTextPane() { + this.lineTextAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.lineTextAttrPane); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/MapUtil.java b/src/com/fr/plugin/pielinecomb/ui/MapUtil.java new file mode 100644 index 0000000..09893b5 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/MapUtil.java @@ -0,0 +1,94 @@ +package com.fr.plugin.pielinecomb.ui; + +import java.awt.*; +import java.util.Map; + +/** + * @author duan.jingliang + */ +public class MapUtil { + public static String getString(Map map, String key) { + return getString(map, key, null); + } + + public static String getString(Map map, String key, String def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return map.get(key).toString(); + } else { + return def; + } + } + + public static Integer getInteger(Map map, String key) { + return getInteger(map, key, null); + } + + public static Integer getInteger(Map map, String key, Integer def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return Integer.parseInt(map.get(key).toString()); + } else { + return def; + } + } + + public static Double getDouble(Map map, String key) { + return getDouble(map, key, null); + } + + public static Double getDouble(Map map, String key, Double def) { + if (null == map) { + return def; + } + if (null != map.get(key)) { + return Double.parseDouble(map.get(key).toString()); + } else { + return def; + } + } + + public static Boolean getBoolean(Map map, String key) { + return getBoolean(map, key, null); + } + + public static Boolean getBoolean(Map map, String key, Boolean def) { + if (null == map) { + return def; + } + String s = getString(map, key); + if (null != s) { + if ("true".equals(s)) { + return true; + } else if ("false".equals(s)){ + return false; + } else { + return def; + } + } else { + return def; + } + } + + public static String toHex(Color c) { + if (null == c) { + return "transparent"; + } + String hex = Integer.toHexString(c.getRGB()); + if (hex.length() == 8) { + hex = "#" + hex.substring(2); + } + return hex; + } + public static Color toColor(String c) { + if (null != c && c.startsWith("#")) { + c = c.substring(1); + return new Color(Integer.parseInt(c, 16)); + } + return null; + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieCondListPane.java b/src/com/fr/plugin/pielinecomb/ui/PieCondListPane.java new file mode 100644 index 0000000..ef09cc6 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieCondListPane.java @@ -0,0 +1,161 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.i18n.Toolkit; +import com.fr.general.NameObject; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemColorJson; +import com.fr.plugin.pielinecomb.vo.ItemLabelJson; +import com.fr.plugin.pielinecomb.vo.ItemTipsJson; +import com.fr.stable.ListMap; +import com.fr.stable.Nameable; +import com.fr.van.chart.designer.component.VanChartUIListControlPane; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author duan.jingliang + */ +public class PieCondListPane extends VanChartUIListControlPane { + + private PieLineCombChart chart; + + private HashMap paneMap; + private HashMap jsonMap; + + public PieCondListPane() { + paneMap = new HashMap(6); + paneMap.put(CustomJsonObject.ITEM_COLOR, PieLineCombColorCondCreator.class); + paneMap.put(CustomJsonObject.ITEM_LABEL, PieLabelCondCreator.class); + paneMap.put(CustomJsonObject.ITEM_TIPS, PieLineCombTipsCondCreator.class); + + jsonMap = new HashMap(6); + jsonMap.put(CustomJsonObject.ITEM_COLOR, ItemColorJson.class); + jsonMap.put(CustomJsonObject.ITEM_LABEL, ItemLabelJson.class); + jsonMap.put(CustomJsonObject.ITEM_TIPS, ItemTipsJson.class); + } + + @Override + protected void update(Plot plot) { + } + + public void populateStyle(PieLineCombChart chart) { + this.chart = chart; + + JSONObject styleCond = chart.getStyleCond(); + if (null != styleCond && null != styleCond.get("pie")) { + JSONArray chartConf = styleCond.getJSONArray("pie"); + ArrayList noList = new ArrayList(); + for (int i = 0; null != chartConf && i < chartConf.size(); i++) { + JSONObject line = chartConf.getJSONObject(i); + if (null != line) { + try { + CustomJsonObject json = (CustomJsonObject)this.getJsonByTitle(line.getString("title")).newInstance(); + json.put(line); + UIMenuNameableCreator var11 = new UIMenuNameableCreator(line.getString("titleName"), json, this.getEditPaneByTitle(line.getString("title"))); + noList.add(new NameObject(var11.getName(), var11.getObj())); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + this.populate((Nameable[])noList.toArray(new NameObject[noList.size()])); + this.doLayout(); + } + + + } + + public void updateStyle(PieLineCombChart chart) { + Nameable[] nameables = this.update(); + + JSONArray objConf = JSONArray.create(); + for (int i = 0; i < nameables.length; i++) { + CustomJsonObject noObj = (CustomJsonObject)((NameObject)nameables[i]).getObject(); + if (null == noObj) { + noObj = new CustomJsonObject(); + noObj.put(JSONObject.create()); + } + if (null == noObj.get()) { + noObj.put(JSONObject.create()); + } + + noObj.get().put("titleName", ((NameObject)nameables[i]).getName()); + objConf.add(noObj.get()); + } + + if (null == chart.getStyleCond()) { + chart.setStyleCond(JSONObject.create()); + } + chart.getStyleCond().put("pie", objConf); + } + + @Override + public NameableCreator[] createNameableCreators() { + ListMap creatorMap = new ListMap(); + + NameableCreator color = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-color"), ItemColorJson.class, PieLineCombColorCondCreator.class); + creatorMap.put(color.menuName(), color); + + NameableCreator label = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendLabel"), ItemLabelJson.class, PieLabelCondCreator.class); + creatorMap.put(label.menuName(), label); + + NameableCreator tips = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendTips"), ItemTipsJson.class, PieLineCombTipsCondCreator.class); + creatorMap.put(tips.menuName(), tips); + + return (NameableCreator[])creatorMap.values().toArray(new NameableCreator[creatorMap.size()]); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + protected String getAddItemText() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + Constructor var2 = null; + try { + var2 = nameableCreator.getUpdatePane().getConstructor(); + return (BasicBeanPane)var2.newInstance(); + } catch (InstantiationException var4) { + FineLoggerFactory.getLogger().error(var4.getMessage(), var4); + } catch (IllegalAccessException var5) { + FineLoggerFactory.getLogger().error(var5.getMessage(), var5); + } catch (NoSuchMethodException var6) { + return super.createPaneByCreators(nameableCreator); + } catch (InvocationTargetException var7) { + FineLoggerFactory.getLogger().error(var7.getMessage(), var7); + } + return null; + } + + private Class getEditPaneByTitle(String title) { + return (Class)paneMap.get(title); + } + + private Class getJsonByTitle(String title) { + return (Class)jsonMap.get(title); + } + + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLabelCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/PieLabelCondCreator.java new file mode 100644 index 0000000..6b74068 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLabelCondCreator.java @@ -0,0 +1,148 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemLabelJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class PieLabelCondCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private PieLabelStylePane pieLabelStylePane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.pieLabelStylePane.populateBean(chartConf); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("condition", this.condition.getText()); + + JSONObject pieLabel = this.pieLabelStylePane.update(); + chartConf.mergeIn(pieLabel); + + ItemLabelJson json = new ItemLabelJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.pieLabelStylePane = new PieLabelStylePane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.pieLabelStylePane); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox filed = new UIComboBox(new String[]{"分类名", "系列名", "数值"}); + final UIComboBox cond = new UIComboBox(new String[]{"==", "!=", ">", ">=", "<", "<="}); + + UIButton add = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{filed, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{" + filed.getSelectedItem() + "}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-condition"), sumPane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLabelStylePane.java b/src/com/fr/plugin/pielinecomb/ui/PieLabelStylePane.java new file mode 100644 index 0000000..ef07fbc --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLabelStylePane.java @@ -0,0 +1,215 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author duan.jingliang + * @date 2022/10/22 + */ +public class PieLabelStylePane extends JPanel { + + private UIButtonGroup pieValueType; + private CardLayout pieCardLayout; + private JPanel pieCardPane; + + private UICheckBox showPieLabel; + private UICheckBox showPieCategory; + private UICheckBox showPieSeries; + private UICheckBox showPieValue; + private UITextArea pieJsPane; + private ChartTextAttrPane pieTextAttrPane; + + private UIButtonGroup piePosition; + private UIButtonGroup pieDirection; + + + public PieLabelStylePane() { + initComponents(); + } + + public void populateBean(JSONObject chartConf) { + this.showPieLabel.setSelected(chartConf.getBoolean("showPieLabel")); + this.pieValueType.setSelectedItem(chartConf.getInt("pieValueType")); + this.showPieCategory.setSelected(chartConf.getBoolean("showPieCategory")); + this.showPieSeries.setSelected(chartConf.getBoolean("showPieSeries")); + this.showPieValue.setSelected(chartConf.getBoolean("showPieValue")); + this.pieJsPane.setText(chartConf.getString("pieJsPane")); + this.piePosition.setSelectedItem(chartConf.getString("piePosition")); + this.pieDirection.setSelectedItem(chartConf.getInt("pieDirection")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("pielabelfamily"), + chartConf.getInt("pielabelstyle"), + chartConf.getInt("pielabelsize"), + MapUtil.toColor(chartConf.getString("pielabelcolor"))); + this.pieTextAttrPane.populate(textFont); + + if (chartConf.getInt("pieValueType") == 2) { + this.pieCardLayout.show(this.pieCardPane, "piejs"); + } else { + this.pieCardLayout.show(this.pieCardPane, "piecheck"); + } + + } + + public JSONObject update() { + JSONObject chartConf = JSONObject.create(); + chartConf.put("showPieLabel", this.showPieLabel.isSelected()); + chartConf.put("pieValueType", this.pieValueType.getSelectedItem()); + chartConf.put("showPieCategory", this.showPieCategory.isSelected()); + chartConf.put("showPieSeries", this.showPieSeries.isSelected()); + chartConf.put("showPieValue", this.showPieValue.isSelected()); + chartConf.put("pieJsPane", this.pieJsPane.getText()); + chartConf.put("piePosition", this.piePosition.getSelectedItem()); + chartConf.put("pieDirection", this.pieDirection.getSelectedItem()); + + TextAttr textAttr = this.pieTextAttrPane.update(); + chartConf.put("pielabelsize", textAttr.getFRFont().getSize()); + chartConf.put("pielabelstyle", textAttr.getFRFont().getStyle()); + chartConf.put("pielabelfamily", textAttr.getFRFont().getFamily()); + chartConf.put("pielabelcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + return chartConf; + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createPieLabelPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + + private JPanel createPieLabelPane() { + pieValueType = new UIButtonGroup(new String[]{ + com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-general"), + com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, + new Integer[]{1, 2} + ); + pieValueType.setSelectedItem(1); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.pieValueType} + }; + JPanel pieValueTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + + showPieLabel = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieLabel")); + + showPieCategory = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieCategory")); + showPieSeries = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieSeries")); + showPieValue = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieValue")); + + Component[][] compCheck = new Component[][]{ + new Component[]{showPieCategory}, + new Component[]{showPieSeries}, + new Component[]{showPieValue} + }; + final JPanel checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compCheck, new double[]{p, p, p, p}, new double[]{f}); + + pieJsPane = new UITextArea(6, 6); + + pieCardPane = new JPanel(this.pieCardLayout = new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != pieValueType.getSelectedItem() && pieValueType.getSelectedItem() == 2) { + return pieJsPane.getPreferredSize(); + } else { + return checkPane.getPreferredSize(); + } + } + }; + pieCardPane.add(checkPane, "piecheck"); + pieCardPane.add(pieJsPane, "piejs"); + this.pieCardLayout.show(pieCardPane, "piecheck"); + pieValueType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + CardLayout card = (CardLayout)pieCardPane.getLayout(); + if (pieValueType.getSelectedItem() == 1) { + card.show(pieCardPane, "piecheck"); + } else { + card.show(pieCardPane, "piejs"); + } + } + }); + + Component[][] contentComp = new Component[][]{ + new Component[]{pieValueTypePane}, + new Component[]{pieCardPane} + }; + JPanel contentCompPane = TableLayout4VanChartHelper.createGapTableLayoutPane(contentComp, new double[]{p, p, p}, new double[]{f}); + JPanel contentPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleText"), contentCompPane); + + JPanel stylePane = createPieTextPane(); + + JPanel layoutPane = createPiePosition(); + + Component[][] comps = new Component[][]{ + new Component[]{showPieLabel}, + new Component[]{contentPane}, + new Component[]{stylePane}, + new Component[]{layoutPane} + }; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{f}); + } + + private JPanel createPiePosition() { + this.piePosition = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-posoutside"), + Toolkit.i18nText("Plugin-Pielinecomb-posinside"), + Toolkit.i18nText("Plugin-Pielinecomb-poscenter") + }, + new String[]{"top", "insideTop", "inside"} + ); + this.pieDirection = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-DirectOrientation"), + Toolkit.i18nText("Plugin-Pielinecomb-DirectVertical") + }, + new Integer[]{0, 90} + ); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition")), this.piePosition}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-textDirection")), this.pieDirection} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-layout"), pane); + } + + private JPanel createPieTextPane() { + this.pieTextAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.pieTextAttrPane); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombColorCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombColorCondCreator.java new file mode 100644 index 0000000..40ea9b9 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombColorCondCreator.java @@ -0,0 +1,158 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemColorJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class PieLineCombColorCondCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private ColorSelectBox itemcolor; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.itemcolor.setSelectObject(MapUtil.toColor(chartConf.getString("itemcolor", "#ffffff"))); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("itemcolor", MapUtil.toHex(this.itemcolor.getSelectObject())); + chartConf.put("condition", this.condition.getText()); + + ItemColorJson json = new ItemColorJson(); + chartConf.put("title", json.getTilte()); + + json.put(chartConf); + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-condition"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.itemcolor = new ColorSelectBox(100); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-color")), this.itemcolor} + }; + + double p = TableLayout.PREFERRED; + double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL}; + double[] rowSize = {p, p, p}; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), panel); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox filed = new UIComboBox(new String[]{"分类名", "系列名", "数值"}); + final UIComboBox cond = new UIComboBox(new String[]{"==", "!=", ">", ">=", "<", "<="}); + + UIButton add = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{filed, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{" + filed.getSelectedItem() + "}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-condition"), sumPane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombHyperLink.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombHyperLink.java new file mode 100644 index 0000000..dcc2c7e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombHyperLink.java @@ -0,0 +1,60 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.base.BaseFormula; +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.js.NameJavaScriptGroup; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.van.chart.custom.component.VanChartHyperLinkPane; + +import java.util.Map; + +public class PieLineCombHyperLink extends VanChartHyperLinkPane { + private PieLineCombChart chart; + private String chartType; + + public PieLineCombHyperLink(String chartType) { + this.chartType = chartType; + } + + + public void populateBean(PieLineCombChart paramAbstractECharts) { + this.chart = paramAbstractECharts; + populate(paramAbstractECharts.getPlot()); + } + + public void updateBean(PieLineCombChart paramAbstractECharts) { + update(paramAbstractECharts.getPlot()); + } + + @Override + public NameableCreator[] createNameableCreators() { + return super.createNameableCreators(); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + return super.createPaneByCreators(nameableCreator); + } + + @Override + protected Map getHyperLinkEditorMap() { + return this.chart.getHyperLinkEditorMap(); + } + + @Override + public void refreshNameableCreator(NameableCreator[] nameableCreators) { + super.refreshNameableCreator(nameableCreators); + } + + @Override + protected NameJavaScriptGroup populateHotHyperLink(Plot paramPlot) { + return this.chart.getLinkConf().getNameJavaScriptGroup(this.chartType); + } + + @Override + protected void updateHotHyperLink(Plot paramPlot, NameJavaScriptGroup paramNameJavaScriptGroup) { + this.chart.getLinkConf().setNameJavaScriptGroup(this.chartType, paramNameJavaScriptGroup); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombLabelCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombLabelCondCreator.java new file mode 100644 index 0000000..8ef17b9 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombLabelCondCreator.java @@ -0,0 +1,193 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemColorJson; +import com.fr.plugin.pielinecomb.vo.ItemLabelJson; +import com.fr.plugin.pielinecomb.vo.ItemTipsJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class PieLineCombLabelCondCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private ColorSelectBox bgcolor; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.bgcolor.setSelectObject(MapUtil.toColor(chartConf.getString("bgcolor", "#ffffff"))); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("bgcolor", MapUtil.toHex(this.bgcolor.getSelectObject())); + chartConf.put("condition", this.condition.getText()); + + CustomJsonObject json = new CustomJsonObject(); + json.put(chartConf); + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.bgcolor = new ColorSelectBox(100); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-BmwGantt-Cond-bgcolor")), this.bgcolor} + }; + + double p = TableLayout.PREFERRED; + double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL}; + double[] rowSize = {p, p, p}; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-BmwGantt-Cond-BgStyleExpand"), panel); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox cond = new UIComboBox(new String[]{"==", "!="}); + UILabel name = new UILabel(Toolkit.i18nText("Plugin-BmwGantt-Cond-groupNameLabel")); + UIButton add = new UIButton(Toolkit.i18nText("Plugin-BmwGantt-Cond-addButton")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-BmwGantt-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{name, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{分组名}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"), sumPane); + } + + + public static class PieLineCombStyleColorCondCreator extends PieLineCombLabelCondCreator { + + @Override + public CustomJsonObject updateBean() { + ItemColorJson json = new ItemColorJson(); + CustomJsonObject srcObj = super.updateBean(); + srcObj.get().put("title", json.getTilte()); + json.put(srcObj.get()); + return json; + } + } + + public static class PieLineCombStyleLabelCondCreator extends PieLineCombLabelCondCreator { + + @Override + public CustomJsonObject updateBean() { + ItemLabelJson json = new ItemLabelJson(); + CustomJsonObject srcObj = super.updateBean(); + srcObj.get().put("title", json.getTilte()); + json.put(srcObj.get()); + return json; + } + } + + public static class PieLineCombStyleTipsCondCreator extends PieLineCombLabelCondCreator { + + @Override + public CustomJsonObject updateBean() { + ItemTipsJson json = new ItemTipsJson(); + CustomJsonObject srcObj = super.updateBean(); + srcObj.get().put("title", json.getTilte()); + json.put(srcObj.get()); + return json; + } + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAnimalPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAnimalPane.java new file mode 100644 index 0000000..29ed9b6 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAnimalPane.java @@ -0,0 +1,200 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.HyperLinkObject; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +public class PieLineCombStyleAnimalPane extends ExtendedScrollPane { + + private UIButtonGroup chartType; + private JPanel cardPane; + + /** + * 柱形图 + * */ + private PieLineCombHyperLink pieHyperLink; + private PieCondListPane pieStyleCondPane; + + + /** + * 折线图 + * */ + private PieLineCombHyperLink lineHyperLink; + private LineCondListPane lineStyleCondPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + + this.pieHyperLink.populateBean(chart); + this.lineHyperLink.populateBean(chart); + + this.pieStyleCondPane.populateStyle(chart); + this.lineStyleCondPane.populateStyle(chart); + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + this.pieHyperLink.updateBean(chart); + this.lineHyperLink.updateBean(chart); + + this.pieStyleCondPane.updateStyle(chart); + this.lineStyleCondPane.updateStyle(chart); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-AnimalTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel chartTypePane = createChartTypePane(); + JPanel mainPane = createMainPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{chartTypePane}, + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createMainPane() { + JPanel piePane = createPiePane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + cardPane = new JPanel(new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != chartType.getSelectedItem() && chartType.getSelectedItem() == 2) { + return linePane.getPreferredSize(); + } else { + return piePane.getPreferredSize(); + } + } + }; + cardPane.add(piePane, "pie"); + cardPane.add(linePane, "line"); + ((CardLayout)cardPane.getLayout()).show(cardPane, "pie"); + + Component[][] comp = new Component[][]{ + new Component[]{cardPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createLinePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + JPanel linkPane = createLineLinkPane(); + JPanel condPane = createLineCondPane(); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{linkPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createPiePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + JPanel linkPane = createPieLinkPane(); + JPanel condPane = createPieCondPane(); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{linkPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createChartTypePane() { + + chartType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline") + }, + new Integer[]{1, 2} + ); + chartType.setSelectedItem(1); + + chartType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + CardLayout card = (CardLayout) cardPane.getLayout(); + if (chartType.getSelectedItem() == 1) { + card.show(cardPane, "pie"); + } else { + card.show(cardPane, "line"); + } + } + }); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.chartType} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createPieLinkPane() { + this.pieHyperLink = new PieLineCombHyperLink(HyperLinkObject.CHART_TYPE_PIE); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-hyperLink"), this.pieHyperLink); + } + + private JPanel createLineLinkPane() { + this.lineHyperLink = new PieLineCombHyperLink(HyperLinkObject.CHART_TYPE_LINE); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-hyperLink"), this.lineHyperLink); + } + + private JPanel createPieCondPane() { + this.pieStyleCondPane = new PieCondListPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-styleCondition"), this.pieStyleCondPane); + } + + private JPanel createLineCondPane() { + this.lineStyleCondPane = new LineCondListPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-styleCondition"), this.lineStyleCondPane); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisPane.java new file mode 100644 index 0000000..06e4444 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisPane.java @@ -0,0 +1,163 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.event.GlobalNameListener; +import com.fr.design.event.GlobalNameObserver; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.comp.CustomChartAxisButtonPane; + +import javax.swing.*; +import java.awt.*; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +public class PieLineCombStyleAxisPane extends ExtendedScrollPane { + + private CustomChartAxisButtonPane axisButtonPane; + + private LinkedHashMap axisPaneMap = new LinkedHashMap<>();; + private JPanel axisCardPane; + + private PieLineCombStylePane stylePane; + + public PieLineCombStyleAxisPane(PieLineCombStylePane stylePane) { + this.stylePane = stylePane; + } + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getAxisConf(); + + if (null == axisPaneMap) { + axisPaneMap = new LinkedHashMap<>(); + } + + JSONObject axisX = chartConf.getJSONObject("axisX"); + PieLineCombStyleAxisXPane axisXPane = new PieLineCombStyleAxisXPane(stylePane); + axisXPane.populateBean(axisX); + axisPaneMap.put(axisX.getString("axisName"), axisXPane); + axisCardPane.add(axisXPane, axisX.getString("axisName")); + + JSONArray axisYList = chartConf.getJSONArray("axisY"); + for (int i = 0; i < axisYList.size(); i++) { + JSONObject axisY = axisYList.getJSONObject(i); + PieLineCombStyleAxisYPane axisYPane = new PieLineCombStyleAxisYPane(stylePane); + axisYPane.populateBean(axisY); + + axisPaneMap.put(axisY.getString("axisName"), axisYPane); + axisCardPane.add(axisYPane, axisY.getString("axisName")); + } + + axisButtonPane.populateBean(chartConf); + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + if (null != axisPaneMap && !axisPaneMap.isEmpty()) { + Iterator it = axisPaneMap.keySet().iterator(); + JSONArray axisY = JSONArray.create(); + while(it.hasNext()) { + String name = it.next(); + if (name.startsWith("X")) { + PieLineCombStyleAxisXPane xPane = (PieLineCombStyleAxisXPane)axisPaneMap.get(name); + JSONObject axisXTmp = xPane.update(); + axisXTmp.put("axisName", name); + chartConf.put("axisX", axisXTmp); + } else if (name.startsWith("Y")) { + PieLineCombStyleAxisYPane yPane = (PieLineCombStyleAxisYPane)axisPaneMap.get(name); + JSONObject axisYTmp = yPane.update(); + axisYTmp.put("axisName", name); + axisY.put(axisYTmp); + } + } + chartConf.put("axisY", axisY); + } + + chart.setAxisConf(chartConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleAxisTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createMainPane(); + JPanel axisPane = createAxisPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane}, + new Component[]{axisPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createMainPane() { + axisButtonPane = new CustomChartAxisButtonPane(this); + return axisButtonPane; + } + + private JPanel createAxisPane() { + axisCardPane = new JPanel(new CardLayout()); +// axisPaneMap = new LinkedHashMap<>(); +// axisPaneMap.put("X轴", new PieLineCombStyleAxisXPane()); +// axisPaneMap.put("Y轴", new PieLineCombStyleAxisYPane()); +// Iterator it = axisPaneMap.keySet().iterator(); +// while (it.hasNext()) { +// String name = it.next(); +// axisCardPane.add(axisPaneMap.get(name), name); +// } + ((CardLayout)axisCardPane.getLayout()).show(axisCardPane, "X轴"); + return axisCardPane; + } + + public void addAxisPane(String name) { + axisPaneMap.put(name, new PieLineCombStyleAxisYPane(stylePane)); + axisCardPane.add(axisPaneMap.get(name), name); + } + + public void delAxisPane(String name) { + axisPaneMap.remove(name); + stylePane.attributeChanged(); + } + + public void changeAxisSelected(String name) { + ((CardLayout)axisCardPane.getLayout()).show(axisCardPane, name); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisXPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisXPane.java new file mode 100644 index 0000000..ea1e49a --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisXPane.java @@ -0,0 +1,296 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.event.GlobalNameListener; +import com.fr.design.event.GlobalNameObserver; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.comp.CustomFormatPane; +import com.fr.plugin.pielinecomb.comp.TextFormat; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +public class PieLineCombStyleAxisXPane extends ExtendedScrollPane { + + private UICheckBox isTitleVisiable; + private TinyFormulaPane titleName; + private UIButtonGroup titleAlignment; + private ChartTextAttrPane titleTextAttrPane; + private UINumberDragPane titleRotation; + + private UICheckBox isLabelVisiable; + private ChartTextAttrPane labelTextAttrPane; + private UINumberDragPane labelRotation; + + private UIButtonGroup labelFormatType; + private CustomFormatPane formatPane; + private UITextArea labelJsPane; + + private PieLineCombStylePane stylePane; + public PieLineCombStyleAxisXPane(PieLineCombStylePane stylePane) { + this.stylePane = stylePane; + } + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(JSONObject chartConf) { + this.isTitleVisiable.setSelected(chartConf.getBoolean("isTitleVisiable")); + this.titleName.populateBean(chartConf.getString("titleName")); + this.titleAlignment.setSelectedItem(chartConf.getInt("titleAlignment")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("titlefamily"), + chartConf.getInt("titlestyle"), + chartConf.getInt("titlesize"), + MapUtil.toColor(chartConf.getString("titlecolor"))); + this.titleTextAttrPane.populate(textFont); + + this.titleRotation.populateBean(chartConf.getDouble("titleRotation")); + + this.isLabelVisiable.setSelected(chartConf.getBoolean("isLabelVisiable")); + textFont = FRFont.getInstance(chartConf.getString("labelfamily"), + chartConf.getInt("labelstyle"), + chartConf.getInt("labelsize"), + MapUtil.toColor(chartConf.getString("labelcolor"))); + this.labelTextAttrPane.populate(textFont); + + this.labelRotation.populateBean(chartConf.getDouble("labelRotation")); + + this.labelFormatType.setSelectedItem(chartConf.getInt("labelFormatType")); + TextFormat format = new TextFormat(); + format.setType(chartConf.getInt("xformattype")); + format.setFormatStr(chartConf.getString("xformatstr")); + this.formatPane.populateBean(format); + this.labelJsPane.setText(chartConf.getString("labelJsPane")); + } + + @Override + public void updateBean(JSONObject jsonObject) { + } + + public JSONObject update() { + JSONObject chartConf = new JSONObject(); + chartConf.put("isTitleVisiable", isTitleVisiable.isSelected()); + chartConf.put("titleName", titleName.updateBean()); + chartConf.put("titleAlignment", titleAlignment.getSelectedItem()); + + TextAttr textAttr = this.titleTextAttrPane.update(); + chartConf.put("titlesize", textAttr.getFRFont().getSize()); + chartConf.put("titlestyle", textAttr.getFRFont().getStyle()); + chartConf.put("titlefamily", textAttr.getFRFont().getFamily()); + chartConf.put("titlecolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chartConf.put("titleRotation", titleRotation.updateBean()); + + chartConf.put("isLabelVisiable", isLabelVisiable.isSelected()); + textAttr = this.labelTextAttrPane.update(); + chartConf.put("labelsize", textAttr.getFRFont().getSize()); + chartConf.put("labelstyle", textAttr.getFRFont().getStyle()); + chartConf.put("labelfamily", textAttr.getFRFont().getFamily()); + chartConf.put("labelcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chartConf.put("labelRotation", labelRotation.updateBean()); + + chartConf.put("labelFormatType", labelFormatType.getSelectedItem()); + TextFormat format = formatPane.updateBean(); + chartConf.put("xformatstr", format.getFormatStr()); + chartConf.put("xformattype", format.getType()); + chartConf.put("labelJsPane", labelJsPane.getText()); + + return chartConf; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleAxisXTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + initListener(this); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel titlePane = createTitlePane(); + JPanel labelPane = createLabelPane(); + JPanel formatPane = createLabelFormatPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{titlePane}, + new Component[]{labelPane}, + new Component[]{formatPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + public void initListener(Container var1) { + for(int var2 = 0; var2 < var1.getComponentCount(); ++var2) { + Component var3 = var1.getComponent(var2); + if (var3 instanceof Container) { + this.initListener((Container)var3); + } + + if (var3 instanceof UIObserver) { + ((UIObserver)var3).registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + PieLineCombStyleAxisXPane.this.stylePane.attributeChanged(); + } + }); + } + } + + } + + } + + private JPanel createTitlePane() { + isTitleVisiable = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isVisiableTitle")); + titleName = new TinyFormulaPane(); + + Icon[] titlePositonIcons = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + Integer[] titlePositionVal = new Integer[]{2, 0, 4}; + this.titleAlignment = new UIButtonGroup(titlePositonIcons, titlePositionVal); + + titleRotation = new UINumberDragPane(-90, 90); + + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitleText")), this.titleName}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition")), this.titleAlignment}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-textRotation")), this.titleRotation} + }; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{p, f}); + + + titleTextAttrPane = new ChartTextAttrPane(); + + Component[][] sumComp = new Component[][]{ + new Component[]{isTitleVisiable}, + new Component[]{panel}, + new Component[]{titleTextAttrPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(sumComp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleNameExpand"), sumPane); + + } + + private JPanel createLabelPane() { + isLabelVisiable = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isLabelVisiable")); + labelTextAttrPane = new ChartTextAttrPane(); + labelRotation = new UINumberDragPane(-90, 90); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-textRotation")), this.labelRotation} + }; + JPanel rotatePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] sumComp = new Component[][]{ + new Component[]{isLabelVisiable}, + new Component[]{labelTextAttrPane}, + new Component[]{rotatePane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(sumComp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-axisLabelTitle"), sumPane); + + } + + private JPanel createLabelFormatPane() { + labelFormatType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-general"), + Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, new Integer[]{1, 2}); + + labelFormatType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + checkFormatType(); + } + }); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-labelFormatType")), this.labelFormatType} + }; + JPanel typePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{p, f}); + + + formatPane = new CustomFormatPane() { + @Override + protected Component[][] getComponent(JPanel var1, JPanel var2, JPanel var3) { + var3.setBorder(BorderFactory.createEmptyBorder()); + return new Component[][]{{var3, null}, {var2, null}}; + } + }; + + labelJsPane = new UITextArea(6, 6); + + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(formatPane, BorderLayout.NORTH); + contentPane.add(labelJsPane, BorderLayout.CENTER); + + labelJsPane.setVisible(false); + + Component[][] comp = new Component[][]{ + new Component[]{typePane}, + new Component[]{contentPane} + }; + JPanel compPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-format"), compPane); + } + + private void checkFormatType() { + if (labelFormatType.getSelectedItem() == 1) { + formatPane.setVisible(true); + labelJsPane.setVisible(false); + } else { + formatPane.setVisible(false); + labelJsPane.setVisible(true); + } + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisYPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisYPane.java new file mode 100644 index 0000000..38749b0 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleAxisYPane.java @@ -0,0 +1,363 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.comp.CustomFormatPane; +import com.fr.plugin.pielinecomb.comp.TextFormat; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +public class PieLineCombStyleAxisYPane extends ExtendedScrollPane { + + private UICheckBox isTitleVisiable; + private TinyFormulaPane titleName; + private UIButtonGroup titleAlignment; + private ChartTextAttrPane titleTextAttrPane; + private UINumberDragPane titleRotation; + + private UICheckBox isLabelVisiable; + private ChartTextAttrPane labelTextAttrPane; + private UINumberDragPane labelRotation; + + private UIButtonGroup labelFormatType; + private CustomFormatPane formatPane; + private UITextArea labelJsPane; + + private UICheckBox showMinValue; + private UICheckBox showMaxValue; + private UICheckBox showInterval; + private TinyFormulaPane minValue; + private TinyFormulaPane maxValue; + private TinyFormulaPane intervalValue; + + private UIButtonGroup position; + + private PieLineCombStylePane stylePane; + + public PieLineCombStyleAxisYPane(PieLineCombStylePane stylePane) { + this.stylePane = stylePane; + } + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(JSONObject chartConf) { + this.isTitleVisiable.setSelected(chartConf.getBoolean("isTitleVisiable")); + this.titleName.populateBean(chartConf.getString("titleName")); + this.titleAlignment.setSelectedItem(chartConf.getInt("titleAlignment")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("titlefamily"), + chartConf.getInt("titlestyle"), + chartConf.getInt("titlesize"), + MapUtil.toColor(chartConf.getString("titlecolor"))); + this.titleTextAttrPane.populate(textFont); + + this.titleRotation.populateBean(chartConf.getDouble("titleRotation")); + + this.isLabelVisiable.setSelected(chartConf.getBoolean("isLabelVisiable")); + textFont = FRFont.getInstance(chartConf.getString("labelfamily"), + chartConf.getInt("labelstyle"), + chartConf.getInt("labelsize"), + MapUtil.toColor(chartConf.getString("labelcolor"))); + this.labelTextAttrPane.populate(textFont); + + this.labelRotation.populateBean(chartConf.getDouble("labelRotation")); + + this.labelFormatType.setSelectedItem(chartConf.getInt("labelFormatType")); + TextFormat format = new TextFormat(); + format.setType(chartConf.getInt("yformattype")); + format.setFormatStr(chartConf.getString("yformatstr")); + this.formatPane.populateBean(format); + this.labelJsPane.setText(chartConf.getString("labelJsPane")); + + this.showMinValue.setSelected(chartConf.getBoolean("showMinValue")); + this.showMaxValue.setSelected(chartConf.getBoolean("showMaxValue")); + this.showInterval.setSelected(chartConf.getBoolean("showInterval")); + + this.minValue.populateBean(chartConf.getString("minValue")); + this.maxValue.populateBean(chartConf.getString("maxValue")); + this.intervalValue.populateBean(chartConf.getString("intervalValue")); + + this.position.setSelectedItem(chartConf.getString("position")); + } + + @Override + public void updateBean(JSONObject json) { + } + + public JSONObject update() { + JSONObject chartConf = new JSONObject(); + chartConf.put("isTitleVisiable", isTitleVisiable.isSelected()); + chartConf.put("titleName", titleName.updateBean()); + chartConf.put("titleAlignment", titleAlignment.getSelectedItem()); + + TextAttr textAttr = this.titleTextAttrPane.update(); + chartConf.put("titlesize", textAttr.getFRFont().getSize()); + chartConf.put("titlestyle", textAttr.getFRFont().getStyle()); + chartConf.put("titlefamily", textAttr.getFRFont().getFamily()); + chartConf.put("titlecolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chartConf.put("titleRotation", titleRotation.updateBean()); + + chartConf.put("isLabelVisiable", isLabelVisiable.isSelected()); + textAttr = this.labelTextAttrPane.update(); + chartConf.put("labelsize", textAttr.getFRFont().getSize()); + chartConf.put("labelstyle", textAttr.getFRFont().getStyle()); + chartConf.put("labelfamily", textAttr.getFRFont().getFamily()); + chartConf.put("labelcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chartConf.put("labelRotation", labelRotation.updateBean()); + + chartConf.put("labelFormatType", labelFormatType.getSelectedItem()); + TextFormat format = formatPane.updateBean(); + chartConf.put("yformatstr", format.getFormatStr()); + chartConf.put("yformattype", format.getType()); + chartConf.put("labelJsPane", labelJsPane.getText()); + + chartConf.put("showMinValue", showMinValue.isSelected()); + chartConf.put("showMaxValue", showMaxValue.isSelected()); + chartConf.put("showInterval", showInterval.isSelected()); + + chartConf.put("minValue", minValue.updateBean()); + chartConf.put("maxValue", maxValue.updateBean()); + chartConf.put("intervalValue", intervalValue.updateBean()); + + chartConf.put("position", position.getSelectedItem()); + + return chartConf; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleAxisYTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + initListener(this); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel titlePane = createTitlePane(); + JPanel labelPane = createLabelPane(); + JPanel valuePane = createValuePane(); + JPanel posPane = createPositionPane(); + JPanel formatPane = createLabelFormatPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{titlePane}, + new Component[]{labelPane}, + new Component[]{valuePane}, + new Component[]{posPane}, + new Component[]{formatPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + public void initListener(Container var1) { + for(int var2 = 0; var2 < var1.getComponentCount(); ++var2) { + Component var3 = var1.getComponent(var2); + if (var3 instanceof Container) { + this.initListener((Container)var3); + } + + if (var3 instanceof UIObserver) { + ((UIObserver)var3).registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + PieLineCombStyleAxisYPane.this.stylePane.attributeChanged(); + } + }); + } + } + } + + } + + private JPanel createTitlePane() { + isTitleVisiable = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isVisiableTitle")); + titleName = new TinyFormulaPane(); + + Icon[] titlePositonIcons = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png")}; + Integer[] titlePositionVal = new Integer[]{2, 0, 4}; + this.titleAlignment = new UIButtonGroup(titlePositonIcons, titlePositionVal); + + titleRotation = new UINumberDragPane(-90, 90); + + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitleText")), this.titleName}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition")), this.titleAlignment}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-textRotation")), this.titleRotation} + }; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{p, f}); + + + titleTextAttrPane = new ChartTextAttrPane(); + + Component[][] sumComp = new Component[][]{ + new Component[]{isTitleVisiable}, + new Component[]{panel}, + new Component[]{titleTextAttrPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(sumComp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleNameExpand"), sumPane); + + } + + private JPanel createLabelPane() { + isLabelVisiable = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isLabelVisiable")); + labelTextAttrPane = new ChartTextAttrPane(); + labelRotation = new UINumberDragPane(-90, 90); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-textRotation")), this.labelRotation} + }; + JPanel rotatePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] sumComp = new Component[][]{ + new Component[]{isLabelVisiable}, + new Component[]{labelTextAttrPane}, + new Component[]{rotatePane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(sumComp, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-axisLabelTitle"), sumPane); + + } + + private JPanel createLabelFormatPane() { + labelFormatType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-general"), + Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, new Integer[]{1, 2}); + + labelFormatType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + checkFormatType(); + } + }); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-labelFormatType")), this.labelFormatType} + }; + JPanel typePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{p, f}); + + + formatPane = new CustomFormatPane() { + @Override + protected Component[][] getComponent(JPanel var1, JPanel var2, JPanel var3) { + var3.setBorder(BorderFactory.createEmptyBorder()); + return new Component[][]{{var3, null}, {var2, null}}; + } + }; + + labelJsPane = new UITextArea(6, 6); + + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(formatPane, BorderLayout.NORTH); + contentPane.add(labelJsPane, BorderLayout.CENTER); + + labelJsPane.setVisible(false); + + Component[][] comp = new Component[][]{ + new Component[]{typePane}, + new Component[]{contentPane} + }; + JPanel compPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-format"), compPane); + } + + private JPanel createValuePane() { + showMinValue = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-minValue")); + showMaxValue = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-maxValue")); + showInterval = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-intervalValue")); + minValue = new TinyFormulaPane(); + maxValue = new TinyFormulaPane(); + intervalValue = new TinyFormulaPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{showMinValue, minValue}, + new Component[]{showMaxValue, maxValue}, + new Component[]{showInterval, intervalValue} + }; + JPanel valuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-valueDefined"), valuePane); + } + + private JPanel createPositionPane() { + position = new UIButtonGroup<>(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-left"), + Toolkit.i18nText("Plugin-Pielinecomb-right") + }, + new String[]{"left", "right"} + ); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-yAxisPosition")), position} + }; + JPanel posPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition"), posPane); + } + + private void checkFormatType() { + if (labelFormatType.getSelectedItem() == 1) { + formatPane.setVisible(true); + labelJsPane.setVisible(false); + } else { + formatPane.setVisible(false); + labelJsPane.setVisible(true); + } + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleBgPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleBgPane.java new file mode 100644 index 0000000..5d102e8 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleBgPane.java @@ -0,0 +1,210 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.config.predefined.ColorFillStyle; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.comp.CustomChartFillStylePane; +import com.fr.stable.StringUtils; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +public class PieLineCombStyleBgPane extends ExtendedScrollPane { + + private ColorSelectBox bgColor; + private UINumberDragPane bgOpacity; + private UICheckBox isShowZoomTool; + + private UIButtonGroup chartType; + private CustomChartFillStylePane fillStylePane; + private ColorSelectBox gridXColor; + + private ColorSelectBox gridYColor; + private UISpinner fixHeight; + private BgGridCondListPane bgGridListPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getBgConf(); + + this.bgColor.setSelectObject(MapUtil.toColor(chartConf.getString("bgColor"))); + this.bgOpacity.populateBean(chartConf.getDouble("bgOpacity")); + this.isShowZoomTool.setSelected(chartConf.getBoolean("isShowZoomTool")); + this.gridXColor.setSelectObject(MapUtil.toColor(chartConf.getString("gridXColor"))); + this.gridYColor.setSelectObject(MapUtil.toColor(chartConf.getString("gridYColor"))); + this.fixHeight.setValue(chartConf.getDouble("fixHeight")); + this.chartType.setSelectedItem(chartConf.getInt("chartType")); + this.bgGridListPane.populateStyle(chart); + + String colors = chartConf.getString("gridXColorList"); + if (StringUtils.isNotEmpty(colors)) { + java.util.List colorList = new java.util.ArrayList(); + String[] colorArr = colors.split("\\|"); + for (int i = 0; i < colorArr.length; i++) { + colorList.add(MapUtil.toColor(colorArr[i])); + } + ColorFillStyle fillStyle = new ColorFillStyle(); + fillStyle.setColorStyle(1); + fillStyle.setColorList(colorList); + fillStyle.setCustomFillStyle(chartConf.getBoolean("gridXColorCustom")); + fillStyle.setFillStyleName(chartConf.getString("gridXColorName")); + this.fillStylePane.populateBean(fillStyle); + } + + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + chartConf.put("bgColor", MapUtil.toHex(this.bgColor.getSelectObject())); + chartConf.put("bgOpacity", this.bgOpacity.updateBean()); + chartConf.put("isShowZoomTool", this.isShowZoomTool.isSelected()); + chartConf.put("gridXColor", MapUtil.toHex(this.gridXColor.getSelectObject())); + chartConf.put("gridYColor", MapUtil.toHex(this.gridYColor.getSelectObject())); + chartConf.put("fixHeight", this.fixHeight.getValue()); + chartConf.put("chartType", chartType.getSelectedItem()); + this.bgGridListPane.updateStyle(chart); + + ColorFillStyle fillStyle = this.fillStylePane.updateBean(); + java.util.List colorList = fillStyle.getColorList(); + StringBuffer colorStr = new StringBuffer(); + for (int i = 0; i < colorList.size(); i++) { + if (i > 0) { + colorStr.append("|"); + } + String tmpColor = MapUtil.toHex(colorList.get(i)); + colorStr.append(tmpColor); + } + chartConf.put("gridXColorList", colorStr.toString()); + chartConf.put("gridXColorName", fillStyle.getFillStyleName()); + chartConf.put("gridXColorCustom", fillStyle.isCustomFillStyle()); + + chart.setBgConf(chartConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleBgTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel bgPane = createBgPane(); + JPanel xPane = createBgXPane(); + JPanel yPane = createBgYPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{bgPane}, + new Component[]{xPane}, + new Component[]{yPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createBgYPane() { + this.gridYColor = new ColorSelectBox(100); + this.fixHeight = new UISpinner(0, 999999999, 1, 100); + this.bgGridListPane = new BgGridCondListPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-fixHeight")), this.fixHeight}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineColor")), this.gridYColor} + }; + JPanel gridPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] comps = new Component[][]{ + new Component[]{gridPane}, + new Component[]{this.bgGridListPane} + }; + + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-BgYTitleStyle"), pane); + } + + private JPanel createBgXPane() { + chartType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline") + }, + new Integer[]{1, 2} + ); + chartType.setSelectedItem(1); + + this.gridXColor = new ColorSelectBox(100); + this.fillStylePane = new CustomChartFillStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-bgChartType")), this.chartType}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineColor")), this.gridXColor} + }; + JPanel gridPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{p, f}); + + Component[][] comps = new Component[][]{ + new Component[]{gridPane}, + new Component[]{this.fillStylePane} + }; + + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p}, new double[]{f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-BgXTitleStyle"), pane); + } + + private JPanel createBgPane() { + this.bgColor = new ColorSelectBox(100); + this.bgOpacity = new UINumberDragPane(0, 100); + this.isShowZoomTool = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isShowZoomTool")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgColor")), this.bgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgOpacity")), this.bgOpacity}, + new Component[]{null, this.isShowZoomTool} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-bgExpand"), pane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLabelPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLabelPane.java new file mode 100644 index 0000000..e4dc132 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLabelPane.java @@ -0,0 +1,153 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +public class PieLineCombStyleLabelPane extends ExtendedScrollPane { + + private UIButtonGroup chartType; + private CardLayout cardLayout; + private JPanel cardPane; + + /** + * 柱形图 配置 + * */ + private PieLabelStylePane pieLabelStylePane; + + /** + * 折线图 配置 + * */ + private LineLabelStylePane lineLabelStylePane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getLabelConf(); + + this.chartType.setSelectedItem(chartConf.getInt("chartType")); + + this.pieLabelStylePane.populateBean(chartConf); + this.lineLabelStylePane.populateBean(chartConf); + + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + chartConf.put("chartType", this.chartType.getSelectedItem()); + + JSONObject pieLabel = this.pieLabelStylePane.update(); + JSONObject lineLabel = this.lineLabelStylePane.update(); + chartConf.mergeIn(pieLabel); + chartConf.mergeIn(lineLabel); + + chart.setLabelConf(chartConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendLabel"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createMainPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + } + + + + private JPanel createChartTypePane() { + chartType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline") + }, + new Integer[]{1, 2} + ); + chartType.setSelectedItem(1); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.chartType} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + + + private JPanel createMainPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + this.pieLabelStylePane = new PieLabelStylePane(); + this.lineLabelStylePane = new LineLabelStylePane(); + + JPanel chartTypePane = createChartTypePane(); + + cardPane = new JPanel(this.cardLayout = new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != chartType.getSelectedItem() && chartType.getSelectedItem() == 2) { + return lineLabelStylePane.getPreferredSize(); + } else { + return pieLabelStylePane.getPreferredSize(); + } + } + }; + cardPane.add(pieLabelStylePane, "pie"); + cardPane.add(lineLabelStylePane, "line"); + this.cardLayout.show(cardPane, "pie"); + chartType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (chartType.getSelectedItem() == 1) { + cardLayout.show(cardPane, "pie"); + } else { + cardLayout.show(cardPane, "line"); + } + } + }); + + Component[][] comp = new Component[][]{ + new Component[]{chartTypePane}, + new Component[]{cardPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLegendPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLegendPane.java new file mode 100644 index 0000000..a81ab84 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleLegendPane.java @@ -0,0 +1,139 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +public class PieLineCombStyleLegendPane extends ExtendedScrollPane { + + private UICheckBox showlegend; + private UIButtonGroup legendposition; + private UIButtonGroup legendalignment; + private UISpinner legendmargin; + + private ChartTextAttrPane textAttrPane; + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getLegendConf(); + + this.showlegend.setSelected(chartConf.getBoolean("showlegend")); + this.legendposition.setSelectedItem(chartConf.getInt("legendposition")); + this.legendalignment.setSelectedItem(chartConf.getInt("legendalignment")); + this.legendmargin.setValue(chartConf.getDouble("legendmargin")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("legendfamily"), + chartConf.getInt("legendstyle"), + chartConf.getInt("legendsize"), + MapUtil.toColor(chartConf.getString("legendcolor"))); + this.textAttrPane.populate(textFont); + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + chartConf.put("showlegend", this.showlegend.isSelected()); + chartConf.put("legendposition", this.legendposition.getSelectedItem()); + chartConf.put("legendalignment", this.legendalignment.getSelectedItem()); + chartConf.put("legendmargin", this.legendmargin.getValue()); + + TextAttr textAttr = this.textAttrPane.update(); + chartConf.put("legendsize", textAttr.getFRFont().getSize()); + chartConf.put("legendstyle", textAttr.getFRFont().getStyle()); + chartConf.put("legendfamily", textAttr.getFRFont().getFamily()); + chartConf.put("legendcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chart.setLegendConf(chartConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel positionPane = createLegendPosition(); + JPanel stylePane = createTitleStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{showlegend}, + new Component[]{positionPane}, + new Component[]{stylePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createLegendPosition(){ + String[] var3 = new String[]{Toolkit.i18nText("Fine-Design_Chart_Style_Alignment_Top"), Toolkit.i18nText("Fine-Design_Chart_Style_Alignment_Bottom"), Toolkit.i18nText("Fine-Design_Chart_Style_Alignment_Left"), Toolkit.i18nText("Fine-Design_Chart_Style_Alignment_Right")}; + Integer[] var4 = new Integer[]{1, 3, 2, 4}; + Icon[] var5 = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top.png"), BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_bottom.png"), BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_left.png"), BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_right.png")}; + + this.legendposition = new UIButtonGroup(var5, var4); + this.legendposition.setAllToolTips(var3); + + this.showlegend = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-showylegend")); + + Icon[] titlePositonIcons = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + Integer[] titlePositionVal = new Integer[]{2, 0, 4}; + this.legendalignment = new UIButtonGroup(titlePositonIcons, titlePositionVal); + + this.legendmargin = new UISpinner(0, 500, 1, 20); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comps = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-legendposition")), this.legendposition}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-legendalignment")), this.legendalignment}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-legendmargin")), this.legendmargin} + }; + + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{p, f}); + + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-ChartLegendPositionExpand"), panel); + + } + + private JPanel createTitleStylePane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.textAttrPane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStylePane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStylePane.java new file mode 100644 index 0000000..2bc41f5 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStylePane.java @@ -0,0 +1,42 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.extended.chart.AbstractExtendedStylePane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.plugin.pielinecomb.PieLineCombChart; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author duan.jingliang + * @date 2022/8/19 + */ +public class PieLineCombStylePane extends AbstractExtendedStylePane { + + private AttributeChangeListener attributeChangeListener; + + public PieLineCombStylePane(){ + super(); + } + public PieLineCombStylePane(AttributeChangeListener attributeChangeListener){ + super(attributeChangeListener); + this.attributeChangeListener = attributeChangeListener; + } + + @Override + protected List> initPaneList() { + List> list = new ArrayList>(); + list.add(new PieLineCombStyleTitlePane()); + list.add(new PieLineCombStyleLegendPane()); + list.add(new PieLineCombStyleLabelPane()); + list.add(new PieLineCombStyleSeriesPane()); + list.add(new PieLineCombStyleAxisPane(this)); +// list.add(new PieLineCombStyleAxisXPane()); +// list.add(new PieLineCombStyleAxisYPane()); + list.add(new PieLineCombStyleBgPane()); + list.add(new PieLineCombStyleTipsPane()); + list.add(new PieLineCombStyleAnimalPane()); + return list; + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleSeriesPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleSeriesPane.java new file mode 100644 index 0000000..86af89e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleSeriesPane.java @@ -0,0 +1,372 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.config.predefined.ColorFillStyle; +import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.chart.type.LineType; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.comp.CustomChartFillStylePane; +import com.fr.stable.StringUtils; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; +import com.fr.van.chart.designer.component.LineTypeComboBox; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class PieLineCombStyleSeriesPane extends ExtendedScrollPane { + + private CustomChartFillStylePane fillStylePane; + private UIButtonGroup chartType; + + private CardLayout cardLayout; + private JPanel cardPane; + + /** + * 柱形图 + * */ + private UIButtonGroup pieWidthType; + private UISpinner pieFixWidth; + private UINumberDragPaneWithPercent pieSeriesGapWidth; + + private SeriesAxisRelaCondListPane pieSeriesAxisRelaListPane; + + /** + * 折线图 + * */ + private LineTypeComboBox lineType; + private UISpinner lineWidth; + private UIButtonGroup lineCornerType; + + private UIComboBox lineCornerShape; + private UIComboBox lineCornerColorType; + private ColorBackgroundQuickPane lineCornerColor; + private UISpinner lineCornerRadius; + private SeriesAxisRelaCondListPane lineSeriesAxisRelaListPane; + + + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getSeriesConf(); + + String colors = chartConf.getString("seriesColorList"); + if (StringUtils.isNotEmpty(colors)) { + java.util.List colorList = new java.util.ArrayList(); + String[] colorArr = colors.split("\\|"); + for (int i = 0; i < colorArr.length; i++) { + colorList.add(MapUtil.toColor(colorArr[i])); + } + ColorFillStyle fillStyle = new ColorFillStyle(); + fillStyle.setColorStyle(1); + fillStyle.setColorList(colorList); + fillStyle.setCustomFillStyle(chartConf.getBoolean("seriesColorCustom")); + fillStyle.setFillStyleName(chartConf.getString("seriesColorName")); + this.fillStylePane.populateBean(fillStyle); + } + + this.chartType.setSelectedItem(chartConf.getInt("chartType")); + if (chartConf.getInt("chartType") == 2) { + this.cardLayout.show(cardPane, "line"); + } + + pieWidthType.setSelectedItem(chartConf.getInt("pieWidthType")); + pieFixWidth.setValue(chartConf.getDouble("pieFixWidth")); + pieSeriesGapWidth.populateBean(chartConf.getDouble("pieSeriesGapWidth")); + + lineType.setSelectedItem(LineType.parse(chartConf.getString("lineType"))); + lineWidth.setValue(chartConf.getDouble("lineWidth")); + lineCornerType.setSelectedItem(chartConf.getInt("lineCornerType")); + lineCornerShape.setSelectedItem(chartConf.getString("lineCornerShape")); + lineCornerColorType.setSelectedItem(chartConf.getString("lineCornerColorType")); + lineCornerColor.populateColor(MapUtil.toColor(chartConf.getString("lineCornerColor"))); + lineCornerRadius.setValue(chartConf.getDouble("lineCornerRadius")); + + pieSeriesAxisRelaListPane.populateStyle(chart); + lineSeriesAxisRelaListPane.populateStyle(chart); + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + ColorFillStyle fillStyle = this.fillStylePane.updateBean(); + java.util.List colorList = fillStyle.getColorList(); + StringBuffer colorStr = new StringBuffer(); + for (int i = 0; i < colorList.size(); i++) { + if (i > 0) { + colorStr.append("|"); + } + String tmpColor = MapUtil.toHex(colorList.get(i)); + colorStr.append(tmpColor); + } + chartConf.put("seriesColorList", colorStr.toString()); + chartConf.put("seriesColorName", fillStyle.getFillStyleName()); + chartConf.put("seriesColorCustom", fillStyle.isCustomFillStyle()); + chartConf.put("chartType", chartType.getSelectedItem()); + + chartConf.put("pieWidthType", pieWidthType.getSelectedItem()); + chartConf.put("pieFixWidth", pieFixWidth.getValue()); + chartConf.put("pieSeriesGapWidth", pieSeriesGapWidth.updateBean()); + + chartConf.put("lineType", ((LineType)lineType.getSelectedItem()).getStringType()); + chartConf.put("lineWidth", lineWidth.getValue()); + chartConf.put("lineCornerType", lineCornerType.getSelectedItem()); + chartConf.put("lineCornerShape", lineCornerShape.getSelectedItem()); + chartConf.put("lineCornerColorType", lineCornerColorType.getSelectedItem()); + chartConf.put("lineCornerColor", MapUtil.toHex(lineCornerColor.updateColor())); + chartConf.put("lineCornerRadius", lineCornerRadius.getValue()); + + chart.setSeriesConf(chartConf); + + pieSeriesAxisRelaListPane.updateStyle(chart); + lineSeriesAxisRelaListPane.updateStyle(chart); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleSeriesTitle"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel chartTypePane = createChartTypePane(); + JPanel mainPane = createMainPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{fillStylePane}, + new Component[]{chartTypePane}, + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p, p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createMainPane() { + fillStylePane = new CustomChartFillStylePane(); + + JPanel piePane = createPiePane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + cardPane = new JPanel(this.cardLayout = new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != chartType.getSelectedItem() && chartType.getSelectedItem() == 2) { + return linePane.getPreferredSize(); + } else { + return piePane.getPreferredSize(); + } + } + }; + cardPane.add(piePane, "pie"); + cardPane.add(linePane, "line"); + this.cardLayout.show(cardPane, "pie"); + + Component[][] comp = new Component[][]{ + new Component[]{cardPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createLinePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + lineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED}); + lineWidth = new UISpinner(0, 100, 1, 1); + lineCornerType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-brokenLine"), + Toolkit.i18nText("Plugin-Pielinecomb-smoothLine") + }, + new Integer[]{0, 1} + ); + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineType")), this.lineType}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineWidth")), this.lineWidth}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineCornerType")), this.lineCornerType} + }; + JPanel linePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p}, new double[]{p, f}); + JPanel linePaneTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-LineStyle"), linePane); + + lineCornerShape = new UIComboBox(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Default"), + Toolkit.i18nText("Plugin-Pielinecomb-shapeCircle"), + Toolkit.i18nText("Plugin-Pielinecomb-shapeRect"), + Toolkit.i18nText("Plugin-Pielinecomb-shapeTriangle"), + Toolkit.i18nText("Plugin-Pielinecomb-shapeDiamond") + }); + lineCornerColorType = new UIComboBox(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-seriesColor"), + Toolkit.i18nText("Plugin-Pielinecomb-customColor") + }); + lineCornerColorType.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + if (lineCornerColorType.getSelectedIndex() == 0) { + lineCornerColor.setVisible(false); + } else { + lineCornerColor.setVisible(true); + } + } + }); + lineCornerColor = new ColorBackgroundQuickPane(); + JPanel cornerColorPane = new JPanel(new BorderLayout()); + cornerColorPane.add(lineCornerColor); + lineCornerColor.setVisible(false); + lineCornerRadius = new UISpinner(0, 100, 1, 6); + + comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineCornerShape")), this.lineCornerShape}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineCornerColorType")), this.lineCornerColorType}, + new Component[]{null, cornerColorPane}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-lineCornerRadius")), this.lineCornerRadius} + }; + JPanel cornerPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p, p}, new double[]{p, f}); + JPanel cornerPaneTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-CornerStyle"), cornerPane); + + lineSeriesAxisRelaListPane = new SeriesAxisRelaCondListPane("lineSeriesAxis"); + JPanel lineSeriesAxisPaneTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-seriesAxisRela"), lineSeriesAxisRelaListPane); + + comp = new Component[][]{ + new Component[]{linePaneTitle}, + new Component[]{cornerPaneTitle}, + new Component[]{lineSeriesAxisPaneTitle} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p}, new double[]{f}); + } + + private JPanel createPiePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + pieWidthType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-auto"), + Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, + new Integer[]{1, 2} + ); + + pieFixWidth = new UISpinner(0, 1000, 1, 15); + pieSeriesGapWidth = new UINumberDragPaneWithPercent(0, 100); + + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-seriesGapWidth")), this.pieSeriesGapWidth} + }; + final JPanel gapWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{p, f}); + + comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-barWidth")), this.pieFixWidth} + }; + final JPanel fixWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{p, f}); + + JPanel widthPane = new JPanel(new BorderLayout()); + widthPane.add(gapWidthPane, BorderLayout.NORTH); + widthPane.add(fixWidthPane, BorderLayout.CENTER); + fixWidthPane.setVisible(false); + + pieWidthType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (pieWidthType.getSelectedItem() == 1) { + gapWidthPane.setVisible(true); + fixWidthPane.setVisible(false); + } else { + gapWidthPane.setVisible(false); + fixWidthPane.setVisible(true); + } + } + }); + + comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-barWidthLabel")), this.pieWidthType} + }; + JPanel widthTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{p, f}); + + pieSeriesAxisRelaListPane = new SeriesAxisRelaCondListPane("pieSeriesAxis"); + JPanel pieSeriesAxisPaneTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-seriesAxisRela"), pieSeriesAxisRelaListPane); + + comp = new Component[][]{ + {widthTypePane}, + {widthPane} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p}, new double[]{f}); + JPanel paneTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), pane); + + comp = new Component[][]{ + {paneTitle}, + {pieSeriesAxisPaneTitle} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + } + + private JPanel createChartTypePane() { + + chartType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline") + }, + new Integer[]{1, 2} + ); + chartType.setSelectedItem(1); + + chartType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (chartType.getSelectedItem() == 1) { + cardLayout.show(cardPane, "pie"); + } else { + cardLayout.show(cardPane, "line"); + } + } + }); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.chartType} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTipsPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTipsPane.java new file mode 100644 index 0000000..0660b07 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTipsPane.java @@ -0,0 +1,161 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +public class PieLineCombStyleTipsPane extends ExtendedScrollPane { + + private UIButtonGroup chartType; + private JPanel cardPane; + + /** + * 柱形图 配置 + * */ + private PieLineTipsPane pieTipsPane; + + /** + * 折线图 配置 + * */ + private PieLineTipsPane lineTipsPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject chartConf = chart.getTipsConf(); + + this.chartType.setSelectedItem(chartConf.getInt("chartType")); + + JSONObject pieTips = chartConf.getJSONObject("pie"); + if (null == pieTips) { + pieTips = JSONObject.create(); + } + this.pieTipsPane.populateBean(pieTips); + JSONObject lineTips = chartConf.getJSONObject("line"); + if (null == lineTips) { + lineTips = JSONObject.create(); + } + this.lineTipsPane.populateBean(lineTips); + + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject chartConf = new JSONObject(); + + chartConf.put("chartType", this.chartType.getSelectedItem()); + + JSONObject pieTips = this.pieTipsPane.update(); + JSONObject lineTips = this.lineTipsPane.update(); + chartConf.put("pie", pieTips); + chartConf.put("line", lineTips); + + chart.setTipsConf(chartConf); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-StyleLegendTips"); + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createMainPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createChartTypePane() { + chartType = new UIButtonGroup(new String[]{ + Toolkit.i18nText("Plugin-Pielinecomb-Typepie"), + Toolkit.i18nText("Plugin-Pielinecomb-Typeline") + }, + new Integer[]{1, 2} + ); + chartType.setSelectedItem(1); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.chartType} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + } + + private JPanel createMainPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + this.pieTipsPane = new PieLineTipsPane(); + this.lineTipsPane = new PieLineTipsPane(); + + JPanel chartTypePane = createChartTypePane(); + + cardPane = new JPanel(new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != chartType.getSelectedItem() && chartType.getSelectedItem() == 2) { + return lineTipsPane.getPreferredSize(); + } else { + return pieTipsPane.getPreferredSize(); + } + } + }; + cardPane.add(pieTipsPane, "pie"); + cardPane.add(lineTipsPane, "line"); + ((CardLayout)cardPane.getLayout()).show(cardPane, "pie"); + chartType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + if (chartType.getSelectedItem() == 1) { + ((CardLayout)cardPane.getLayout()).show(cardPane, "pie"); + } else { + ((CardLayout)cardPane.getLayout()).show(cardPane, "line"); + } + } + }); + + Component[][] comp = new Component[][]{ + new Component[]{chartTypePane}, + new Component[]{cardPane} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{f}); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTitlePane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTitlePane.java new file mode 100644 index 0000000..6e7c370 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombStyleTitlePane.java @@ -0,0 +1,142 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.base.BaseUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +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.style.color.ColorSelectBox; +import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; + +public class PieLineCombStyleTitlePane extends ExtendedScrollPane { + + private UICheckBox isTitleVisable; + private ColorSelectBox titleBgColor; + private UINumberDragPane titleBgOpacity; + private TinyFormulaPane titleName; + private UIButtonGroup titleAlignment; + private ChartTextAttrPane textAttrPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(PieLineCombChart chart) { + JSONObject titleConf = chart.getTitleConf(); + this.isTitleVisable.setSelected(titleConf.getBoolean("titlevisiable")); + this.titleBgColor.setSelectObject(MapUtil.toColor(titleConf.getString("titlebgcolor"))); + this.titleBgOpacity.populateBean(titleConf.getDouble("titleBgOpacity")); + this.titleName.populateBean(titleConf.getString("titlename")); + this.titleAlignment.setSelectedItem(titleConf.getInt("titleposition")); + + FRFont titleFont = FRFont.getInstance(titleConf.getString("titlefamily"), + titleConf.getInt("titlestyle"), + titleConf.getInt("titlesize"), + MapUtil.toColor(titleConf.getString("titlecolor"))); + this.textAttrPane.populate(titleFont); + + } + + @Override + public void updateBean(PieLineCombChart chart) { + JSONObject titleConf = JSONObject.create(); + titleConf.put("titlevisiable", this.isTitleVisable.isSelected()); + titleConf.put("titlebgcolor", MapUtil.toHex(this.titleBgColor.getSelectObject())); + titleConf.put("titleBgOpacity", this.titleBgOpacity.updateBean()); + titleConf.put("titlename", this.titleName.updateBean()); + titleConf.put("titleposition", titleAlignment.getSelectedItem()); + + TextAttr titleAttr = this.textAttrPane.update(); + titleConf.put("titlesize", titleAttr.getFRFont().getSize()); + titleConf.put("titlestyle", titleAttr.getFRFont().getStyle()); + titleConf.put("titlefamily", titleAttr.getFRFont().getFamily()); + titleConf.put("titlecolor", MapUtil.toHex(titleAttr.getFRFont().getForeground())); + + + chart.setTitleConf(titleConf); + } + + @Override + protected String title4PopupWindow() { + return PaneTitleConstants.CHART_STYLE_TITLE_TITLE; + } + + private class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + // 内容 + JPanel titleContentPane = createTitleContentPane(); + // 样式 + JPanel stylePane = createTitleStylePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{isTitleVisable}, + new Component[]{titleContentPane}, + new Component[]{stylePane} + } ; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents,rowSize,columnSize); + + this.add(panel,BorderLayout.CENTER); + + this.setVisible(true); + + } + + } + + private JPanel createTitleContentPane(){ + // 内容 + this.isTitleVisable = new UICheckBox(Toolkit.i18nText("Plugin-Pielinecomb-isVisiableTitle")); + this.titleBgColor = new ColorSelectBox(100); + this.titleBgOpacity = new UINumberDragPane(0, 100); + this.titleName = new TinyFormulaPane(); + + // 位置 + Icon[] titlePositonIcons = new Icon[]{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + Integer[] titlePositionVal = new Integer[]{2, 0, 4}; + this.titleAlignment = new UIButtonGroup(titlePositonIcons, titlePositionVal); + + Component[][] components = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgColor")), this.titleBgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgOpacity")), this.titleBgOpacity}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitleText")), this.titleName}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-TitlePosition"), 2), this.titleAlignment} + } ; + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleExpand"), components); + } + + private JPanel createTitleStylePane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.textAttrPane); + } + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineCombTipsCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/PieLineCombTipsCondCreator.java new file mode 100644 index 0000000..6e60dd4 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineCombTipsCondCreator.java @@ -0,0 +1,148 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.ItemTipsJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class PieLineCombTipsCondCreator extends AbstractVanChartScrollPane { + + private UITextArea condition; + + private PieLineTipsPane pieLineTipsPane; + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + this.pieLineTipsPane.populateBean(chartConf); + this.condition.setText(chartConf.getString("condition")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("condition", this.condition.getText()); + + JSONObject tips = this.pieLineTipsPane.update(); + chartConf.mergeIn(tips); + + ItemTipsJson json = new ItemTipsJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-BmwGantt-Cond-condTaskBgTitle"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel condPane = createConditionPane(); + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{condPane}, + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + this.pieLineTipsPane = new PieLineTipsPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.pieLineTipsPane); + } + + private JPanel createConditionPane() { + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox filed = new UIComboBox(new String[]{"分类名", "系列名", "数值"}); + final UIComboBox cond = new UIComboBox(new String[]{"==", "!=", ">", ">=", "<", "<="}); + + UIButton add = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-clearButton")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{filed, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + condition.setEnabled(false); + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{" + filed.getSelectedItem() + "}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-condition"), sumPane); + } + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/PieLineTipsPane.java b/src/com/fr/plugin/pielinecomb/ui/PieLineTipsPane.java new file mode 100644 index 0000000..bd07e7d --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/PieLineTipsPane.java @@ -0,0 +1,208 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.frpane.UINumberDragPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.general.FRFont; +import com.fr.json.JSONObject; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author duan.jingliang + * @date 2022/10/22 + */ +public class PieLineTipsPane extends JPanel { + + private UIButtonGroup valueType; + private JPanel cardPane; + + private UICheckBox showTip; + private UICheckBox showCategory; + private UICheckBox showSeries; + private UICheckBox showValue; + private UITextArea jsPane; + private ChartTextAttrPane textAttrPane; + + private ColorSelectBox bgColor; + private UINumberDragPane bgOpacity; + + public PieLineTipsPane() { + initComponents(); + } + + public void populateBean(JSONObject chartConf) { + this.showTip.setSelected(chartConf.getBoolean("showTip")); + this.valueType.setSelectedItem(chartConf.getInt("valueType")); + this.showCategory.setSelected(chartConf.getBoolean("showCategory")); + this.showSeries.setSelected(chartConf.getBoolean("showSeries")); + this.showValue.setSelected(chartConf.getBoolean("showValue")); + this.jsPane.setText(chartConf.getString("jsPane")); + + FRFont textFont = FRFont.getInstance(chartConf.getString("tipfamily"), + chartConf.getInt("tipstyle"), + chartConf.getInt("tipsize"), + MapUtil.toColor(chartConf.getString("tipcolor"))); + this.textAttrPane.populate(textFont); + + this.bgColor.setSelectObject(MapUtil.toColor(chartConf.getString("bgColor"))); + this.bgOpacity.populateBean(chartConf.getDouble("bgOpacity")); + + if (chartConf.getInt("valueType") == 2) { + ((CardLayout)cardPane.getLayout()).show(cardPane, "piejs"); + } else { + ((CardLayout)cardPane.getLayout()).show(cardPane, "piecheck"); + } + + } + + public JSONObject update() { + JSONObject chartConf = JSONObject.create(); + + chartConf.put("showTip", this.showTip.isSelected()); + chartConf.put("valueType", this.valueType.getSelectedItem()); + chartConf.put("showCategory", this.showCategory.isSelected()); + chartConf.put("showSeries", this.showSeries.isSelected()); + chartConf.put("showValue", this.showValue.isSelected()); + chartConf.put("jsPane", this.jsPane.getText()); + + TextAttr textAttr = this.textAttrPane.update(); + chartConf.put("tipsize", textAttr.getFRFont().getSize()); + chartConf.put("tipstyle", textAttr.getFRFont().getStyle()); + chartConf.put("tipfamily", textAttr.getFRFont().getFamily()); + chartConf.put("tipcolor", MapUtil.toHex(textAttr.getFRFont().getForeground())); + + chartConf.put("bgColor", MapUtil.toHex(this.bgColor.getSelectObject())); + chartConf.put("bgOpacity", this.bgOpacity.updateBean()); + + return chartConf; + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel mainPane = createPieLabelPane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] acomponents = new Component[][]{ + new Component[]{mainPane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, new double[]{p, p}, new double[]{f}); + + this.add(panel,BorderLayout.CENTER); + this.setVisible(true); + } + + private JPanel createPieLabelPane() { + valueType = new UIButtonGroup(new String[]{ + com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-general"), + com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-custom") + }, + new Integer[]{1, 2} + ); + valueType.setSelectedItem(1); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null}, + new Component[]{this.valueType} + }; + JPanel pieValueTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p}, new double[]{f}); + + + showTip = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieTip")); + + showCategory = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieCategory")); + showSeries = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieSeries")); + showValue = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Plugin-Pielinecomb-showPieValue")); + + Component[][] compCheck = new Component[][]{ + new Component[]{showCategory}, + new Component[]{showSeries}, + new Component[]{showValue} + }; + final JPanel checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compCheck, new double[]{p, p, p, p}, new double[]{f}); + + jsPane = new UITextArea(6, 6); + + cardPane = new JPanel(new CardLayout()){ + @Override + public Dimension getPreferredSize() { + if (null != valueType.getSelectedItem() && valueType.getSelectedItem() == 2) { + return jsPane.getPreferredSize(); + } else { + return checkPane.getPreferredSize(); + } + } + }; + cardPane.add(checkPane, "piecheck"); + cardPane.add(jsPane, "piejs"); + ((CardLayout)cardPane.getLayout()).show(cardPane, "piecheck"); + valueType.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent var1x) { + CardLayout card = (CardLayout)cardPane.getLayout(); + if (valueType.getSelectedItem() == 1) { + card.show(cardPane, "piecheck"); + } else { + card.show(cardPane, "piejs"); + } + } + }); + + Component[][] contentComp = new Component[][]{ + new Component[]{pieValueTypePane}, + new Component[]{cardPane} + }; + JPanel contentCompPane = TableLayout4VanChartHelper.createGapTableLayoutPane(contentComp, new double[]{p, p, p}, new double[]{f}); + JPanel contentPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleText"), contentCompPane); + + JPanel stylePane = createPieTextPane(); + + JPanel bgPane = createPieBgPane(); + + Component[][] comps = new Component[][]{ + new Component[]{showTip}, + new Component[]{contentPane}, + new Component[]{stylePane}, + new Component[]{bgPane} + }; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(comps, new double[]{p, p, p, p, p}, new double[]{f}); + } + + private JPanel createPieTextPane() { + this.textAttrPane = new ChartTextAttrPane(); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-TitleStyle"), this.textAttrPane); + } + + private JPanel createPieBgPane() { + this.bgColor = new ColorSelectBox(100); + this.bgOpacity = new UINumberDragPane(0, 100); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] comp = new Component[][]{ + {null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgColor")), this.bgColor}, + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-titleBgOpacity")), this.bgOpacity} + }; + JPanel pane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p}, new double[]{p, f}); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Plugin-Pielinecomb-bgExpand"), pane); + } +} diff --git a/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondCreator.java b/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondCreator.java new file mode 100644 index 0000000..4902d36 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondCreator.java @@ -0,0 +1,190 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.SeriesAxisRelaJson; +import com.fr.van.chart.designer.AbstractVanChartScrollPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author duan.jingliang + */ +public class SeriesAxisRelaCondCreator extends AbstractVanChartScrollPane { + + private UITextField seriesName; + private UIComboBox axisYName; + private PieLineCombChart chart; + + private UITextArea condition; + + public SeriesAxisRelaCondCreator() { + } + + public SeriesAxisRelaCondCreator(PieLineCombChart chart) { + this.chart = chart; + } + + + @Override + protected JPanel createContentPane() { + return new ContentPane(); + } + + @Override + public void populateBean(CustomJsonObject json) { + JSONObject chartConf = null; + if (null != json) { + chartConf = json.get(); + } + if (null != chartConf) { + //this.seriesName.setText(chartConf.getString("seriesName")); + this.condition.setText(chartConf.getString("condition")); + JSONArray axisYList = null; + if (null != chart) { + axisYList = chart.getAxisConf().getJSONArray("axisY"); + } + if (null != axisYList && axisYList.size() > 0) { + java.util.List axisYArr = new java.util.ArrayList<>(); + for (int i = 0; i < axisYList.size(); i++) { + axisYArr.add(axisYList.getJSONObject(i).getString("axisName")); + } + this.axisYName.refreshBoxItems(axisYArr); + } + this.axisYName.setSelectedItem(chartConf.getString("axisYName")); + } + } + + @Override + public CustomJsonObject updateBean() { + JSONObject chartConf = JSONObject.create(); + + //chartConf.put("seriesName", this.seriesName.getText()); + chartConf.put("condition", this.condition.getText()); + chartConf.put("axisYName", this.axisYName.getSelectedItem()); + + SeriesAxisRelaJson json = new SeriesAxisRelaJson(); + chartConf.put("title", json.getTilte()); + json.put(chartConf); + + return json; + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-condition"); + } + + protected class ContentPane extends JPanel { + public ContentPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(new BorderLayout()); + + JPanel linePane = createLinePane(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] acomponents = new Component[][]{ + new Component[]{linePane} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(acomponents, rowSize, columnSize); + this.add(panel, BorderLayout.CENTER); + this.setVisible(true); + } + } + + private JPanel createLinePane() { + java.util.List axisYArr = new java.util.ArrayList<>(); + if (null != this.chart) { + JSONArray axisYList = chart.getAxisConf().getJSONArray("axisY"); + if (null != axisYList && axisYList.size() > 0) { + for (int i = 0; i < axisYList.size(); i++) { + axisYArr.add(axisYList.getJSONObject(i).getString("axisName")); + } + this.axisYName.refreshBoxItems(axisYArr); + } + } + if (axisYArr.isEmpty()) { + axisYArr.add("Y轴"); + } + //this.seriesName = new UITextField(); + this.axisYName = new UIComboBox(axisYArr.toArray(new String[axisYArr.size()])); + //this.axisYPane = new JPanel(new BorderLayout()); + //this.axisYPane.add(this.axisYName, BorderLayout.CENTER); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Toolkit.i18nText("Plugin-Pielinecomb-StyleAxisTitle")), this.axisYName} + }; + JPanel yPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f}); + + condition = new UITextArea(3, 6); + final UITextField value = new UITextField(); + final UIComboBox filed = new UIComboBox(new String[]{"系列序号", "系列名称"}); + final UIComboBox cond = new UIComboBox(new String[]{"==", ">", "<"}); + + UIButton add = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion")); + UIButton clear = new UIButton(Toolkit.i18nText("Plugin-Pielinecomb-Cond-clearButton")); + + Component[][] compc = new Component[][]{ + new Component[]{filed, cond, value, add, clear} + }; + JPanel condPane = TableLayout4VanChartHelper.createGapTableLayoutPane(compc, new double[]{p, p}, new double[]{p, p, f, p, p}); + + Component[][] comp1 = new Component[][]{ + new Component[]{condition} + }; + JPanel areaPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp1, new double[]{p}, new double[]{f}); + + Component[][] comp = new Component[][]{ + new Component[]{yPane}, + new Component[]{condPane}, + new Component[]{areaPane} + }; + JPanel sumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comp, new double[]{p, p, p, p}, new double[]{f}); + + add.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String srcStr = condition.getText(); + if (null != srcStr && !"".equals(srcStr)) { + srcStr += " && "; + } + String condstr = "'{" + filed.getSelectedItem() + "}' " + cond.getSelectedItem() + " '" + value.getText() + "'"; + condition.setText(srcStr + condstr); + } + }); + clear.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + condition.setText(""); + } + }); + + return sumPane; + } + + +} diff --git a/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondListPane.java b/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondListPane.java new file mode 100644 index 0000000..7c8a884 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/ui/SeriesAxisRelaCondListPane.java @@ -0,0 +1,156 @@ +package com.fr.plugin.pielinecomb.ui; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.i18n.Toolkit; +import com.fr.general.NameObject; +import com.fr.json.JSONArray; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.pielinecomb.PieLineCombChart; +import com.fr.plugin.pielinecomb.vo.BgGridXJson; +import com.fr.plugin.pielinecomb.vo.CustomJsonObject; +import com.fr.plugin.pielinecomb.vo.SeriesAxisRelaJson; +import com.fr.stable.ListMap; +import com.fr.stable.Nameable; +import com.fr.van.chart.designer.component.VanChartUIListControlPane; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * @author duan.jingliang + */ +public class SeriesAxisRelaCondListPane extends VanChartUIListControlPane { + + private PieLineCombChart chart; + + private HashMap paneMap; + private HashMap jsonMap; + + private String chartType; + + public SeriesAxisRelaCondListPane(String chartType) { + this.chartType = chartType; + + paneMap = new HashMap(6); + paneMap.put(CustomJsonObject.SERIES_AXIS, SeriesAxisRelaCondCreator.class); + + jsonMap = new HashMap(6); + jsonMap.put(CustomJsonObject.SERIES_AXIS, SeriesAxisRelaJson.class); + } + + + @Override + protected void update(Plot plot) { + } + + public void populateStyle(PieLineCombChart chart) { + this.chart = chart; + + JSONObject styleCond = chart.getStyleCond(); + if (null != styleCond && null != styleCond.get(chartType)) { + JSONArray chartConf = styleCond.getJSONArray(chartType); + ArrayList noList = new ArrayList(); + for (int i = 0; null != chartConf && i < chartConf.size(); i++) { + JSONObject line = chartConf.getJSONObject(i); + if (null != line) { + try { + CustomJsonObject json = (CustomJsonObject)this.getJsonByTitle(line.getString("title")).newInstance(); + json.put(line); + json.get().put("axisY", chart.getAxisConf().getJSONArray("axisY")); + UIMenuNameableCreator var11 = new UIMenuNameableCreator(line.getString("titleName"), json, this.getEditPaneByTitle(line.getString("title"))); + noList.add(new NameObject(var11.getName(), var11.getObj())); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + this.populate((Nameable[])noList.toArray(new NameObject[noList.size()])); + this.doLayout(); + } + + } + + public void updateStyle(PieLineCombChart chart) { + Nameable[] nameables = this.update(); + + JSONArray objConf = JSONArray.create(); + for (int i = 0; i < nameables.length; i++) { + CustomJsonObject noObj = (CustomJsonObject)((NameObject)nameables[i]).getObject(); + if (null == noObj) { + noObj = new CustomJsonObject(); + noObj.put(JSONObject.create()); + } + if (null == noObj.get()) { + noObj.put(JSONObject.create()); + } + + noObj.get().put("titleName", ((NameObject)nameables[i]).getName()); + objConf.add(noObj.get()); + } + + if (null == chart.getStyleCond()) { + chart.setStyleCond(JSONObject.create()); + } + chart.getStyleCond().put(chartType, objConf); + + } + + @Override + public NameableCreator[] createNameableCreators() { + ListMap creatorMap = new ListMap(); + + NameableCreator grid = new NameObjectCreator(Toolkit.i18nText("Plugin-Pielinecomb-seriesAxisRela"), SeriesAxisRelaJson.class, SeriesAxisRelaCondCreator.class); + creatorMap.put(grid.menuName(), grid); + + return (NameableCreator[])creatorMap.values().toArray(new NameableCreator[creatorMap.size()]); + } + + @Override + protected String title4PopupWindow() { + return Toolkit.i18nText("Plugin-Pielinecomb-Cond-AddCondtion"); + } + + @Override + protected String getAddItemText() { + return Toolkit.i18nText("Plugin-Pielinecomb-seriesAxis"); + } + + @Override + public BasicBeanPane createPaneByCreators(NameableCreator nameableCreator) { + Constructor var2 = null; + try { + var2 = nameableCreator.getUpdatePane().getConstructor(PieLineCombChart.class); + return (BasicBeanPane)var2.newInstance(chart); + } catch (InstantiationException var4) { + FineLoggerFactory.getLogger().error(var4.getMessage(), var4); + } catch (IllegalAccessException var5) { + FineLoggerFactory.getLogger().error(var5.getMessage(), var5); + } catch (NoSuchMethodException var6) { + return super.createPaneByCreators(nameableCreator); + } catch (InvocationTargetException var7) { + FineLoggerFactory.getLogger().error(var7.getMessage(), var7); + } + return null; + } + + private Class getEditPaneByTitle(String title) { + return (Class)paneMap.get(title); + } + + private Class getJsonByTitle(String title) { + return (Class)jsonMap.get(title); + } + + + +} diff --git a/src/com/fr/plugin/pielinecomb/vo/BgGridXJson.java b/src/com/fr/plugin/pielinecomb/vo/BgGridXJson.java new file mode 100644 index 0000000..3db5990 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/BgGridXJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.pielinecomb.vo; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:35 + * @description: + */ +public class BgGridXJson extends CustomJsonObject { + private String tilte = BG_GRID_X; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/pielinecomb/vo/CustomJsonObject.java b/src/com/fr/plugin/pielinecomb/vo/CustomJsonObject.java new file mode 100644 index 0000000..83a6052 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/CustomJsonObject.java @@ -0,0 +1,27 @@ +package com.fr.plugin.pielinecomb.vo; + +import com.fr.json.JSONObject; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:33 + * @description: + */ +public class CustomJsonObject { + private JSONObject obj = JSONObject.create(); + + public JSONObject get() { + return obj; + } + + public void put(JSONObject obj) { + this.obj = obj; + } + + public static final String ITEM_COLOR = "color"; + public static final String ITEM_LABEL = "label"; + public static final String ITEM_TIPS = "tips"; + public static final String BG_GRID_X = "bggridx"; + public static final String SERIES_AXIS = "seriesaxis"; + +} diff --git a/src/com/fr/plugin/pielinecomb/vo/HyperLinkObject.java b/src/com/fr/plugin/pielinecomb/vo/HyperLinkObject.java new file mode 100644 index 0000000..9a6d4f6 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/HyperLinkObject.java @@ -0,0 +1,119 @@ +package com.fr.plugin.pielinecomb.vo; + +import com.fr.js.NameJavaScriptGroup; +import com.fr.stable.FCloneable; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLableReader; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +/** + * @author duan.jingliang + * @date 2022/10/23 + */ +public class HyperLinkObject implements XMLReadable, Serializable, FCloneable { + + public static final String XML_TAG_PIE = "CustomHyperLinkPie"; + public static final String XML_TAG_LINE = "CustomHyperLinkLine"; + + public static final String CHART_TYPE_PIE = "pie"; + public static final String CHART_TYPE_LINE = "line"; + + private Map linkMap = new HashMap<>(); + + public NameJavaScriptGroup getNameJavaScriptGroup(String name) { + return this.linkMap.get(name); + } + + public void setNameJavaScriptGroup(String name, NameJavaScriptGroup nameGroup) { + this.linkMap.put(name, nameGroup); + } + + @Override + public void readXML(XMLableReader xmLableReader) { + + if (xmLableReader.isChildNode()) { + String tagName = xmLableReader.getTagName(); + if (XML_TAG_PIE.equals(tagName)) { + NameJavaScriptGroup obj = new NameJavaScriptGroup(); + xmLableReader.readXMLObject(obj); + this.linkMap.put(CHART_TYPE_PIE, obj); + } else if (XML_TAG_LINE.equals(tagName)) { + NameJavaScriptGroup obj = new NameJavaScriptGroup(); + xmLableReader.readXMLObject(obj); + this.linkMap.put(CHART_TYPE_LINE, obj); + } + } + } + + public void writeXML(XMLPrintWriter xmlWriter) { + if (null != this.linkMap && !this.linkMap.isEmpty()) { + NameJavaScriptGroup pieObj = this.linkMap.get(CHART_TYPE_PIE); + if (null != pieObj) { + xmlWriter.startTAG(XML_TAG_PIE); + pieObj.writeXML(xmlWriter); + xmlWriter.end(); + } + + NameJavaScriptGroup lineObj = this.linkMap.get(CHART_TYPE_LINE); + if (null != lineObj) { + xmlWriter.startTAG(XML_TAG_LINE); + lineObj.writeXML(xmlWriter); + xmlWriter.end(); + } + } + } + + + @Override + public Object clone() throws CloneNotSupportedException { + HyperLinkObject obj = (HyperLinkObject)super.clone(); + Map newLinkMap = new HashMap<>(); + if (null != this.linkMap && !this.linkMap.isEmpty()) { + Iterator it = this.linkMap.keySet().iterator(); + while(it.hasNext()) { + String name = it.next(); + newLinkMap.put(name, (NameJavaScriptGroup)this.linkMap.get(name).clone()); + } + obj.linkMap = newLinkMap; + } + return obj; + } + + @Override + public boolean equals(Object srcObj) { + if (!(srcObj instanceof HyperLinkObject)) { + return false; + } else { + HyperLinkObject srcHyperLink = (HyperLinkObject)srcObj; + if (this.linkMap.size() != srcHyperLink.linkMap.size()) { + return false; + } else { + if ((null != this.linkMap.get(CHART_TYPE_PIE) && null == srcHyperLink.linkMap.get(CHART_TYPE_PIE)) || + (null == this.linkMap.get(CHART_TYPE_PIE) && null != srcHyperLink.linkMap.get(CHART_TYPE_PIE))) { + return false; + } + if (null != this.linkMap.get(CHART_TYPE_PIE) + && null != srcHyperLink.linkMap.get(CHART_TYPE_PIE) + && !this.linkMap.get(CHART_TYPE_PIE).equals(srcHyperLink.linkMap.get(CHART_TYPE_PIE))) { + return false; + } + + if ((null != this.linkMap.get(CHART_TYPE_LINE) && null == srcHyperLink.linkMap.get(CHART_TYPE_LINE)) || + (null == this.linkMap.get(CHART_TYPE_LINE) && null != srcHyperLink.linkMap.get(CHART_TYPE_LINE))) { + return false; + } + if (null != this.linkMap.get(CHART_TYPE_LINE) + && null != srcHyperLink.linkMap.get(CHART_TYPE_LINE) + && !this.linkMap.get(CHART_TYPE_LINE).equals(srcHyperLink.linkMap.get(CHART_TYPE_LINE))) { + return false; + } + } + return true; + } + } +} diff --git a/src/com/fr/plugin/pielinecomb/vo/ItemColorJson.java b/src/com/fr/plugin/pielinecomb/vo/ItemColorJson.java new file mode 100644 index 0000000..c258240 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/ItemColorJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.pielinecomb.vo; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:35 + * @description: + */ +public class ItemColorJson extends CustomJsonObject { + private String tilte = ITEM_COLOR; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/pielinecomb/vo/ItemLabelJson.java b/src/com/fr/plugin/pielinecomb/vo/ItemLabelJson.java new file mode 100644 index 0000000..2e3d19f --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/ItemLabelJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.pielinecomb.vo; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:35 + * @description: + */ +public class ItemLabelJson extends CustomJsonObject { + private String tilte = ITEM_LABEL; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/pielinecomb/vo/ItemTipsJson.java b/src/com/fr/plugin/pielinecomb/vo/ItemTipsJson.java new file mode 100644 index 0000000..cb1661a --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/ItemTipsJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.pielinecomb.vo; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:35 + * @description: + */ +public class ItemTipsJson extends CustomJsonObject { + private String tilte = ITEM_TIPS; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/pielinecomb/vo/SeriesAxisRelaJson.java b/src/com/fr/plugin/pielinecomb/vo/SeriesAxisRelaJson.java new file mode 100644 index 0000000..926ed05 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/vo/SeriesAxisRelaJson.java @@ -0,0 +1,14 @@ +package com.fr.plugin.pielinecomb.vo; + +/** + * @author :duan.jingliang + * @date :2022/10/22 18:35 + * @description: + */ +public class SeriesAxisRelaJson extends CustomJsonObject { + private String tilte = SERIES_AXIS; + + public String getTilte() { + return tilte; + } +} diff --git a/src/com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js b/src/com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js new file mode 100644 index 0000000..9121ee9 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/web/PieLineCombChartWrapper.js @@ -0,0 +1,1142 @@ +PieLineCombChartWrapper = ExtendedChart.extend({ + + _init: function (dom, option) { + console.log('init'); + var self = this; + self.chartBaseOption = option; + + this.width = option.width || $(dom).width();// 补充从dom获取. + this.height = option.height || $(dom).height(); + + this.chartData = option.data; + this.titleConf = option.titleConf; + this.seriesConf = option.seriesConf; + this.axisConf = option.axisConf; + this.bgConf = option.bgConf; + this.labelConf = option.labelConf; + this.tipsConf = option.tipsConf; + this.legendConf = option.legendConf; + this.styleCond = option.styleCond; + this.hyperLinkPie = option.pie; + this.hyperLinkLine = option.line; + this.isLoadAnimal = option.isLoadAnimal; + + if (window.FR != undefined) { + FR.$defaultImport("/com/fr/plugin/pielinecomb/web/echarts.min.js", "js", false, false); + } + + var chart = pielinecombecharts.init(dom); + self.basechart = chart; + + window.testChart = chart; + window.PieLineCombChartInst = this; + + this.initChart(); + + return chart; + }, + initChart: function() { + var self = this; + var myChart = self.basechart; + + /*if (self.titleConf.titlevisiable) { + self.chartConf.margintop += 30; + } + if (self.legendConf.showlegend && self.legendConf.legendposition == "1") { + self.chartConf.margintop += 20; + } + if (self.titleConf.titlevisiable && self.legendConf.legendposition == "1") { + self.legendConf.legendtop += 20; + }*/ + + var option = this.getSrcOption(); + option.animation = this.isLoadAnimal || true; + myChart.setOption(option); + + this.addBgRegion(); + + this.initEvent(); + }, + getChartImage: function() { + var self = this; + var imgstr = self.basechart.getDataURL({ + "type": "png", + "excludeComponents": ['toolbox','tooltip'] + }); + if (imgstr && imgstr.length > 0) { + imgstr = imgstr.substr(imgstr.indexOf(',')+1); + } + return imgstr; + }, + getSrcOption: function() { + var self = this; + + this.chartTop = 50; + this.chartLeft = 60; + this.chartButtom = 30; + this.chartRight = 120; + + var axisYPosLeftNum = 0; + var axisYPosRightNum = 0; + self.axisConf.axisY.forEach(function(e){ + if (e.position == 'right') { + if (axisYPosRightNum > 0) { + e.offset = axisYPosRightNum * 60; + } + axisYPosRightNum++; + } else { + if (axisYPosLeftNum > 0) { + e.offset = axisYPosLeftNum * 60; + } + axisYPosLeftNum++; + } + }); + this.chartLeft = axisYPosLeftNum * 60; + this.chartRight = axisYPosRightNum * 60; + + // 标签 + var pieLabelOpt = { + show: self.labelConf.showPieLabel, + position: self.labelConf.piePosition, + rotate: self.labelConf.pieDirection, + color: self.labelConf.pielabelcolor, + fontFamily: self.labelConf.pielabelfamily, + fontSize: self.labelConf.pielabelsize, + fontStyle: this.getFontStyle(self.labelConf.pielabelstyle), + fontWeight: this.getFontWeight(self.labelConf.pielabelstyle), + formatter: function (params) { + if (!params.value[1] || params.value[1] == 0 || params.value[1] == '') { + return ''; + } + if (self.labelConf.pieValueType == "1") { + var valueStr = ''; + if (self.labelConf.showPieSeries) { + valueStr += '|' + params.seriesName; + } + if (self.labelConf.showPieCategory) { + valueStr += '|' + params.value[0]; + } + if (self.labelConf.showPieValue) { + valueStr += '|' + params.value[1]; + } + return valueStr.length > 0 ? valueStr.substring(1) : ''; + } else { + return new Function(self.labelConf.pieJsPane).call({series: params.seriesName, data: params.value}); + } + } + }; + + var lineLabelOpt = { + show: self.labelConf.showLineLabel, + position: self.labelConf.linePosition, + rotate: self.labelConf.lineDirection, + color: self.labelConf.linelabelcolor, + fontFamily: self.labelConf.linelabelfamily, + fontSize: self.labelConf.linelabelsize, + fontStyle: this.getFontStyle(self.labelConf.linelabelstyle), + fontWeight: this.getFontWeight(self.labelConf.linelabelstyle), + formatter: function (params) { + if (!params.value[1] || params.value[1] == 0 || params.value[1] == '') { + return ''; + } + if (self.labelConf.lineValueType == "1") { + var valueStr = ''; + if (self.labelConf.showLineSeries) { + valueStr += '|' + params.seriesName; + } + if (self.labelConf.showLineCategory) { + valueStr += '|' + params.value[0]; + } + if (self.labelConf.showLineValue) { + valueStr += '|' + params.value[1]; + } + return valueStr.length > 0 ? valueStr.substring(1) : ''; + } else { + return new Function(self.labelConf.lineJsPane).call({series: params.seriesName, data: params.value}); + } + } + }; + + // 系列 + var seriesNameArr = []; + var axisXdata = []; + var axisXLabeldata = []; + var axisOpt = []; + if (this.chartData.pie && this.chartData.pie.xAxisData && this.chartData.pie.xAxisData.length > 0) { + axisXdata = this.chartData.pie.xAxisData; + axisXLabeldata = this.chartData.pie.xAxisLabelData; + + for (var k in this.chartData.pie.seriesData) { + var seriesToYAxisName = 'Y轴'; + if (self.styleCond.pieSeriesAxis && self.styleCond.pieSeriesAxis.length > 0) { + var tmpPieAxisCond = null; + for (var m = 0; m < self.styleCond.pieSeriesAxis.length; m++) { + var cond = self.styleCond.pieSeriesAxis[m].condition; + if (cond) { + cond = cond.replace(/\{系列名称\}/g, k); + cond = cond.replace(/\{系列序号\}/g, this.chartData.pie.seriesIndex[k]); + if (eval(cond)) { + tmpPieAxisCond = self.styleCond.pieSeriesAxis[m]; + break; + } + } else { + tmpPieAxisCond = self.styleCond.pieSeriesAxis[m]; + break; + } + } + if (tmpPieAxisCond) { + seriesToYAxisName = tmpPieAxisCond.axisYName; + } + } + + var seriesToYAxis = 0; + for (var m = 0; m < self.axisConf.axisY.length; m++) { + if (self.axisConf.axisY[m].axisName == seriesToYAxisName) { + seriesToYAxis = m; + break; + } + } + + // 条件属性 + var tmpSeriesData = self.chartData.pie.seriesData[k]; + for (var m = 0; m < tmpSeriesData.length; m++) { + var categoryTmp = tmpSeriesData[m][0]; + var valueTmp = tmpSeriesData[m][1]; + tmpSeriesData[m] = { + value: tmpSeriesData[m] + }; + // 配色 + var condConf = self.getStyleCond('pie', 'color', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].itemStyle = { + color: condConf.itemcolor + }; + } + + // 标签 + condConf = self.getStyleCond('pie', 'label', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].label = { + show: condConf.showPieLabel, + position: condConf.piePosition, + rotate: condConf.pieDirection, + color: condConf.pielabelcolor, + fontFamily: condConf.pielabelfamily, + fontSize: condConf.pielabelsize, + fontStyle: this.getFontStyle(condConf.pielabelstyle), + fontWeight: this.getFontWeight(condConf.pielabelstyle), + formatter: (function(obj){ + var thisObj = $.extend(true, {}, obj); + thisObj.series = k; + thisObj.data = [categoryTmp, valueTmp]; + return function(params){ + if (thisObj.pieValueType == "1") { + var valueStr = ''; + if (thisObj.showPieSeries) { + valueStr += '|' + params.seriesName; + } + if (thisObj.showPieCategory) { + valueStr += '|' + thisObj.data[0]; + } + if (thisObj.showPieValue) { + valueStr += '|' + thisObj.data[1]; + } + return valueStr.length > 0 ? valueStr.substring(1) : ''; + } else { + return new Function(thisObj.pieJsPane).call({series: thisObj.series, data: thisObj.data}); + } + }; + })(condConf) + }; + } + + // 提示 + condConf = self.getStyleCond('pie', 'tips', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].tooltip = { + show: condConf.showTip, + backgroundColor: self.hexToRgba(condConf.bgColor, condConf.bgOpacity).rgba, + textStyle: { + color: condConf.tipcolor, + fontSize: condConf.tipsize, + fontFamily: condConf.tipfamily, + fontStyle: self.getFontStyle(condConf.tipstyle), + fontWeight: self.getFontWeight(condConf.tipstyle) + }, + formatter: (function(obj){ + var thisObj = $.extend(true, {}, obj); + thisObj.series = k; + thisObj.data = [categoryTmp, valueTmp]; + return function(params){ + if (thisObj.valueType == 1) { + + var itemColor = self.seriesConf.seriesColorList.split("|")[params.seriesIndex]; + var vHtml = '
'; + if (thisObj.showCategory) { + vHtml += '
' + params.value[0] + '
'; + } + if (thisObj.showSeries || thisObj.showValue) { + vHtml += '
'; + vHtml += ''; + } + if (thisObj.showSeries) { + vHtml += '' + params.seriesName + ''; + } + + if (thisObj.showValue) { + vHtml += '' + params.value[1] + ''; + } + if (thisObj.showSeries || thisObj.showValue) { + vHtml += '
'; + } + vHtml += '
'; + return vHtml; + + /*var valueStr = ''; + if (thisObj.showSeries) { + valueStr += '系列:' + params.seriesName + '
'; + } + if (thisObj.showCategory) { + valueStr += '分类:' + thisObj.data[0] + '
'; + } + if (thisObj.showValue) { + valueStr += '数值:' + thisObj.data[1] + '
'; + } + return valueStr;*/ + } else { + return new Function(thisObj.jsPane).call({series: params.seriesName, seriesIndex:params.seriesIndex, data: thisObj.data}); + } + }; + })(condConf) + }; + } + } + + axisOpt.push({ + name: k, + type: 'bar', + yAxisIndex: seriesToYAxis, + label: pieLabelOpt, + data: tmpSeriesData + }); + seriesNameArr.push(k); + if (self.seriesConf.pieWidthType == 1) { + axisOpt[axisOpt.length - 1].barGap = self.seriesConf.pieSeriesGapWidth + '%'; + } else { + axisOpt[axisOpt.length - 1].barWidth = self.seriesConf.pieFixWidth; + } + + var pieTipsConf = self.tipsConf.pie; + if (pieTipsConf.showTip) { + axisOpt[axisOpt.length - 1].tooltip = { + show: true, + backgroundColor: self.hexToRgba(pieTipsConf.bgColor, pieTipsConf.bgOpacity).rgba, + textStyle: { + color: pieTipsConf.tipcolor, + fontSize: pieTipsConf.tipsize, + fontFamily: pieTipsConf.tipfamily, + fontStyle: self.getFontStyle(pieTipsConf.tipstyle), + fontWeight: self.getFontWeight(pieTipsConf.tipstyle) + }, + formatter: function (params) { + var pieTipsConf = self.tipsConf.pie; + if (pieTipsConf.valueType == 1) { + var itemColor = self.seriesConf.seriesColorList.split("|")[params.seriesIndex]; + var vHtml = '
'; + if (pieTipsConf.showCategory) { + vHtml += '
' + params.value[0] + '
'; + } + if (pieTipsConf.showSeries || pieTipsConf.showValue) { + vHtml += '
'; + vHtml += ''; + } + if (pieTipsConf.showSeries) { + vHtml += '' + params.seriesName + ''; + } + + if (pieTipsConf.showValue) { + vHtml += '' + params.value[1] + ''; + } + if (pieTipsConf.showSeries || pieTipsConf.showValue) { + vHtml += '
'; + } + vHtml += '
'; + return vHtml; + } else { + return new Function(pieTipsConf.jsPane).call({series: params.seriesName, data: params.value}); + } + } + } + } + } + } + if (this.chartData.line && this.chartData.line.xAxisData && this.chartData.line.xAxisData.length > 0) { + for (var i = 0; i < this.chartData.line.xAxisData.length; i++) { + if (axisXdata.indexOf(this.chartData.line.xAxisData[i]) < 0) { + axisXdata.push(this.chartData.line.xAxisData[i]); + axisXLabeldata.push(this.chartData.line.xAxisLabelData[i]); + } + } + for (var k in self.chartData.line.seriesData) { + var seriesToYAxisName = 'Y轴'; + if (self.styleCond.lineSeriesAxis && self.styleCond.lineSeriesAxis.length > 0) { + + var tmpPieAxisCond = null; + for (var m = 0; m < self.styleCond.lineSeriesAxis.length; m++) { + + var cond = self.styleCond.lineSeriesAxis[m].condition; + if (cond) { + cond = cond.replace(/\{系列名称\}/g, k); + cond = cond.replace(/\{系列序号\}/g, this.chartData.line.seriesIndex[k]); + if (eval(cond)) { + tmpPieAxisCond = self.styleCond.lineSeriesAxis[m]; + break; + } + } else { + tmpPieAxisCond = self.styleCond.lineSeriesAxis[m]; + break; + } + } + + if (tmpPieAxisCond) { + seriesToYAxisName = tmpPieAxisCond.axisYName; + } + } + + var seriesToYAxis = 0; + for (var m = 0; m < self.axisConf.axisY.length; m++) { + if (self.axisConf.axisY[m].axisName == seriesToYAxisName) { + seriesToYAxis = m; + break; + } + } + + // 条件属性 + var tmpSeriesData = self.chartData.line.seriesData[k]; + for (var m = 0; m < tmpSeriesData.length; m++) { + var categoryTmp = tmpSeriesData[m][0]; + var valueTmp = tmpSeriesData[m][1]; + tmpSeriesData[m] = { + value: tmpSeriesData[m] + }; + if (!valueTmp || valueTmp == 0 || valueTmp == '') { + tmpSeriesData[m].symbolSize = 0; + } + // 配色 + var condConf = self.getStyleCond('line', 'color', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].itemStyle = { + color: condConf.itemcolor + }; + } + + // 标签 + condConf = self.getStyleCond('line', 'label', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].label = { + show: condConf.showLineLabel, + position: condConf.linePosition, + rotate: condConf.lineDirection, + color: condConf.linelabelcolor, + fontFamily: condConf.linelabelfamily, + fontSize: condConf.linelabelsize, + fontStyle: this.getFontStyle(condConf.linelabelstyle), + fontWeight: this.getFontWeight(condConf.linelabelstyle), + formatter: (function(obj){ + var thisObj = $.extend(true, {}, obj); + thisObj.series = k; + thisObj.data = [categoryTmp, valueTmp]; + return function(params){ + if (thisObj.lineValueType == "1") { + var valueStr = ''; + if (thisObj.showLineSeries) { + valueStr += '|' + params.seriesName; + } + if (thisObj.showLineCategory) { + valueStr += '|' + thisObj.data[0]; + } + if (thisObj.showLineValue) { + valueStr += '|' + thisObj.data[1]; + } + return valueStr.length > 0 ? valueStr.substring(1) : ''; + } else { + return new Function(thisObj.lineJsPane).call({series: thisObj.series, data: thisObj.data}); + } + }; + })(condConf) + }; + } + + // 提示 + condConf = self.getStyleCond('line', 'tips', k, categoryTmp, valueTmp); + if (condConf) { + tmpSeriesData[m].tooltip = { + show: condConf.showTip, + backgroundColor: self.hexToRgba(condConf.bgColor, condConf.bgOpacity).rgba, + textStyle: { + color: condConf.tipcolor, + fontSize: condConf.tipsize, + fontFamily: condConf.tipfamily, + fontStyle: self.getFontStyle(condConf.tipstyle), + fontWeight: self.getFontWeight(condConf.tipstyle) + }, + formatter: (function(obj){ + var thisObj = $.extend(true, {}, obj); + thisObj.series = k; + thisObj.data = [categoryTmp, valueTmp]; + return function(params){ + if (thisObj.valueType == 1) { + var itemColor = self.seriesConf.seriesColorList.split("|")[params.seriesIndex]; + var vHtml = '
'; + if (thisObj.showCategory) { + vHtml += '
' + params.value[0] + '
'; + } + if (thisObj.showSeries || thisObj.showValue) { + vHtml += '
'; + vHtml += ''; + } + if (thisObj.showSeries) { + vHtml += '' + params.seriesName + ''; + } + + if (thisObj.showValue) { + vHtml += '' + params.value[1] + ''; + } + if (thisObj.showSeries || thisObj.showValue) { + vHtml += '
'; + } + vHtml += '
'; + return vHtml; + /*var valueStr = ''; + if (thisObj.showSeries) { + valueStr += '系列:' + params.seriesName + '
'; + } + if (thisObj.showCategory) { + valueStr += '分类:' + thisObj.data[0] + '
'; + } + if (thisObj.showValue) { + valueStr += '数值:' + thisObj.data[1] + '
'; + } + return valueStr;*/ + } else { + return new Function(thisObj.jsPane).call({series: params.seriesName, data: thisObj.data}); + } + }; + })(condConf) + }; + } + } + + + axisOpt.push({ + name: k, + type: 'line', + yAxisIndex: seriesToYAxis, + label: lineLabelOpt, + data: this.chartData.line.seriesData[k] + }) + seriesNameArr.push(k); + + axisOpt[axisOpt.length - 1].lineStyle = { + width: self.seriesConf.lineWidth, + type: self.seriesConf.lineType + } + axisOpt[axisOpt.length - 1].symbolSize = self.seriesConf.lineCornerRadius; + if (self.seriesConf.lineCornerShape == '圆形') { + axisOpt[axisOpt.length - 1].symbol = 'circle'; + } else if (self.seriesConf.lineCornerShape == '三角行') { + axisOpt[axisOpt.length - 1].symbol = 'triangle'; + } else if (self.seriesConf.lineCornerShape == '正方形') { + axisOpt[axisOpt.length - 1].symbol = 'rect'; + } else if (self.seriesConf.lineCornerShape == '菱形') { + axisOpt[axisOpt.length - 1].symbol = 'diamond'; + } + if (self.seriesConf.lineCornerType == 1) { + axisOpt[axisOpt.length - 1].smooth = true; + } + if (self.seriesConf.lineCornerColorType != '系列色') { + axisOpt[axisOpt.length - 1].itemStyle = { + color: self.seriesConf.lineCornerColor + }; + } + + var lineTipsConf = self.tipsConf.line; + if (lineTipsConf.showTip) { + axisOpt[axisOpt.length - 1].tooltip = { + show: true, + backgroundColor: self.hexToRgba(lineTipsConf.bgColor, lineTipsConf.bgOpacity).rgba, + textStyle: { + color: lineTipsConf.tipcolor, + fontSize: lineTipsConf.tipsize, + fontFamily: lineTipsConf.tipfamily, + fontStyle: self.getFontStyle(lineTipsConf.tipstyle), + fontWeight: self.getFontWeight(lineTipsConf.tipstyle) + }, + formatter: function (params) { + var lineTipsConf = self.tipsConf.line; + if (lineTipsConf.valueType == 1) { + var itemColor = self.seriesConf.seriesColorList.split("|")[params.seriesIndex]; + var vHtml = '
'; + if (lineTipsConf.showCategory) { + vHtml += '
' + params.value[0] + '
'; + } + if (lineTipsConf.showSeries || lineTipsConf.showValue) { + vHtml += '
'; + vHtml += ''; + } + if (lineTipsConf.showSeries) { + vHtml += '' + params.seriesName + ''; + } + + if (lineTipsConf.showValue) { + vHtml += '' + params.value[1] + ''; + } + if (lineTipsConf.showSeries || lineTipsConf.showValue) { + vHtml += '
'; + } + vHtml += '
'; + return vHtml; + + } else { + return new Function(lineTipsConf.jsPane).call({series: params.seriesName, data: params.value}); + } + } + } + } + } + } + + self.axisXdata = axisXdata; + self.axisXLabeldata = axisXLabeldata; + + // X坐标轴 + var axisXConf = this.axisConf.axisX; + var axisXOpt = { + type: 'category', + name: axisXConf.isTitleVisiable ? axisXConf.titleName : '', + nameLocation: this.getLocation(axisXConf.titleAlignment) || 'end', + boundaryGap: true, + nameRotate: axisXConf.titleRotation || 0, + nameTextStyle: { + color: axisXConf.titlecolor, + fontFamily: axisXConf.titlefamily, + fontSize: axisXConf.titlesize, + fontStyle: this.getFontStyle(axisXConf.titlestyle), + fontWeight: this.getFontWeight(axisXConf.titlestyle), + padding: [8,0,0,0], + verticalAlign: 'top' + }, + scale: true, + axisLine: { + show: true + }, + axisTick: { + alignWithLabel: true + }, + axisLabel: { + show: axisXConf.isLabelVisiable, + color: axisXConf.labelcolor, + fontFamily: axisXConf.labelfamily, + fontSize: axisXConf.labelsize, + fontStyle: this.getFontStyle(axisXConf.labelstyle), + fontWeight: this.getFontWeight(axisXConf.labelstyle), + rotate: axisXConf.labelRotation, + formatter: function (value, index) { + if (self.axisConf.axisX.labelFormatType == 1) { + return axisXLabeldata[index]; + } else { + return new Function(self.axisConf.axisX.labelJsPane).call({value: value}); + } + } + }, + data: axisXdata + }; + //option.xAxis[0] = axisXOpt; + + // Y坐标轴 + var axisYConfArr = this.axisConf.axisY; + var axisYOpt = []; + for (var i = 0; i < axisYConfArr.length; i++) { + var axisYConf = axisYConfArr[i]; + axisYOpt.push({ + type: 'value', + name: axisYConf.isTitleVisiable ? axisYConf.titleName : '', + position: i == 0 ? 'left' : 'right', + offset: axisYConf.offset, + nameRotate: axisYConf.titleRotation || 0, + nameTextStyle: { + color: axisYConf.titlecolor, + fontFamily: axisYConf.titlefamily, + fontSize: axisYConf.titlesize, + fontStyle: this.getFontStyle(axisYConf.titlestyle), + fontWeight: this.getFontWeight(axisYConf.titlestyle) + }, + alignTicks: true, + axisLabel: { + show: axisYConf.isLabelVisiable, + color: axisYConf.labelcolor, + fontFamily: axisYConf.labelfamily, + fontSize: axisYConf.labelsize, + fontStyle: this.getFontStyle(axisYConf.labelstyle), + fontWeight: this.getFontWeight(axisYConf.labelstyle), + rotate: axisYConf.labelRotation, + formatter: (function(obj){ + var thisObj = $.extend(true, {}, obj); + return function(value, index){ + if (thisObj.labelFormatType == 1) { + return value; + } else { + return new Function(thisObj.labelJsPane).call({value: value}); + } + }; + })(axisYConf) + /*formatter: function (value, index) { + console.log(this); + if (axisYConf.labelFormatType == 1) { + return value; + } else { + return new Function(axisYConf.labelJsPane).call({value: value}); + } + }*/ + }, + axisLine: { + show: true + }, + splitLine: { + show: false + } + }); + + if (axisYConf.showMinValue) { + axisYOpt[axisYOpt.length - 1].min = axisYConf.minValue; + } + if (axisYConf.showMaxValue) { + axisYOpt[axisYOpt.length - 1].max = axisYConf.maxValue; + } + if (axisYConf.showInterval) { + axisYOpt[axisYOpt.length - 1].interval = axisYConf.intervalValue; + } + } + + // 图例 + var legendOpt = { + type: 'scroll', + show: self.legendConf.showlegend, + textStyle: { + color: self.legendConf.legendcolor, + fontSize: self.legendConf.legendsize, + fontStyle: self.getFontStyle(self.legendConf.legendstyle), + fontFamily: self.legendConf.legendfamily, + fontWeight: self.getFontWeight(self.legendConf.legendstyle) + } + }; + if (self.legendConf.legendposition == "1") { + legendOpt.orient = 'horizontal'; + legendOpt.top = self.legendConf.legendmargin; + legendOpt.left = 'center'; + } else if (self.legendConf.legendposition == "2") { + legendOpt.orient = 'vertical'; + legendOpt.left = self.legendConf.legendmargin; + legendOpt.top = 'middle'; + } else if (self.legendConf.legendposition == "3") { + legendOpt.orient = 'horizontal'; + legendOpt.bottom = self.legendConf.legendmargin; + legendOpt.left = 'center'; + } else if (self.legendConf.legendposition == "4") { + legendOpt.orient = 'vertical'; + legendOpt.right = self.legendConf.legendmargin; + legendOpt.top = 'middle'; + } + + if (self.legendConf.legendalignment == "2") { + if (self.legendConf.legendposition == "1" || self.legendConf.legendposition == "3") { + legendOpt.left = 'left'; + } else { + legendOpt.top = 'top'; + } + } else if (self.legendConf.legendalignment == "4") { + if (self.legendConf.legendposition == "1" || self.legendConf.legendposition == "3") { + legendOpt.left = 'right'; + } else { + legendOpt.top = 'bottom'; + } + } + + if (self.legendConf.legendposition == "2") { + self.chartLeft += (self.calTextWidth(self.getArrayMaxLengthItem(seriesNameArr))[0] || 20) + 30; + } else if (self.legendConf.legendposition == "3") { + self.chartButtom += 20; + } else if(self.legendConf.legendposition == "4") { + self.chartRight += (self.calTextWidth(self.getArrayMaxLengthItem(seriesNameArr))[0] || 20) + 30; + } + + if (self.legendConf.showlegend && self.legendConf.legendposition == "1") { + self.chartTop += 30; + } + + var dataZoomOpt = [{ + type: 'inside', + xAxisIndex: [0], + start: 0, + end: 100 + }]; + if (self.bgConf.isShowZoomTool) { + dataZoomOpt.push({ + type: 'slider', + xAxisIndex: [0], + start: 0, + end: 100 + }); + } + + + + var option = { + color: self.seriesConf.seriesColorList.split("|"), + backgroundColor: self.hexToRgba(self.bgConf.bgColor, self.bgConf.bgOpacity).rgba, + title: { + show: self.titleConf.titlevisiable || false, + text: self.titleConf.titlename, + left: self.getAlign(self.titleConf.titleposition), + backgroundColor: self.hexToRgba(self.titleConf.titlebgcolor, self.titleConf.titleBgOpacity).rgba, + textStyle: { + color: self.titleConf.titlecolor, + fontSize: self.titleConf.titlesize, + fontStyle: self.getFontStyle(self.titleConf.titlestyle), + fontFamily: self.titleConf.titlefamily, + fontWeight: self.getFontWeight(self.titleConf.titlestyle) + } + }, + grid: { + top: self.chartTop, + left : self.chartLeft, + buttom: self.chartButtom, + right: self.chartRight + }, + legend: legendOpt, + dataZoom: dataZoomOpt, + tooltip: { + show: true, + trigger: 'item', + axisPointer: { + type: 'none' + } + }, + xAxis: [axisXOpt], + yAxis: axisYOpt, + series: axisOpt + }; + return option; + }, + addBgRegion: function() { + var self = this; + var myChart = this.basechart; + var axisXdata = this.axisXdata; + var pos0 = myChart.convertToPixel({seriesIndex: 0}, [axisXdata[0], 0]); + var pos1 = myChart.convertToPixel({seriesIndex: 0}, [axisXdata[1], 0]); + var dividerXWidth = pos1[0] - pos0[0]; + + this.dataRegionWidth = myChart.getModel().getComponent('xAxis').axis._extent[1]; + this.dataRegionHeight = myChart.getModel().getComponent('yAxis').axis._extent[1]; + + var regionColorArr = this.chartData.pie.regionColor; + if (self.bgConf.chartType == 2) { + regionColorArr = this.chartData.line.regionColor; + } + var regionColorConf = []; + + var startIdx = 0; + for (var i = 0; i < axisXdata.length; i++) { + var tmpPos = myChart.convertToPixel({seriesIndex: 0}, [axisXdata[i], 0]); + if (tmpPos[0] > this.dataRegionWidth + this.chartLeft) { + break; + } + if (tmpPos[0] < 0 + this.chartLeft) { + continue; + } else { + startIdx++; + } + if (parseInt(regionColorArr[axisXdata[i]]) >= 0) { + if (regionColorConf.length == 0 || regionColorConf[regionColorConf.length - 1].end !== undefined) { + regionColorConf.push({ + start: startIdx - 1, + colorIdx: regionColorArr[axisXdata[i]] + }); + } else if (regionColorConf[regionColorConf.length - 1].colorIdx != regionColorArr[axisXdata[i]]){ + regionColorConf[regionColorConf.length - 1].end = startIdx - 1; + regionColorConf.push({ + start: startIdx - 1, + colorIdx: regionColorArr[axisXdata[i]] + }); + } + } else if (regionColorConf.length > 0 && regionColorConf[regionColorConf.length - 1].end == undefined) { + regionColorConf[regionColorConf.length - 1].end = startIdx - 1; + } + } + if (regionColorConf.length > 0 && regionColorConf[regionColorConf.length - 1].end == undefined) { + regionColorConf[regionColorConf.length - 1].end = startIdx; + } + + var graphicRectBgColorArr = self.bgConf.gridXColorList.split("|"); + var graphicRectArr = []; + for (var i = 0; i < regionColorConf.length; i++) { + graphicRectArr.push({ + type: 'rect', + x: 0, + y: 0, + draggable: false, + shape: { + x: self.chartLeft + (regionColorConf[i].start * dividerXWidth), + y: self.chartTop, + width: (regionColorConf[i].end - regionColorConf[i].start) * dividerXWidth, + height: self.dataRegionHeight + }, + style: { + fill: self.hexToRgba(graphicRectBgColorArr[regionColorConf[i].colorIdx], 50).rgba + } + }); + } + + var gridLineArr = this.chartData.pie.gridLine; + if (self.bgConf.chartType == 2) { + gridLineArr = this.chartData.line.gridLine; + } + + var gridLineConf = []; + for (var i = 0; i < axisXdata.length; i++) { + if (gridLineArr.indexOf(axisXdata[i]) >= 0) { + var tmpPos = myChart.convertToPixel({seriesIndex: 0}, [axisXdata[i], 0]); + if (tmpPos[0] > this.dataRegionWidth + this.chartLeft) { + break; + } + if (tmpPos[0] < 0 + this.chartLeft) { + continue; + } + gridLineConf.push(tmpPos[0]); + } + } + for (var i = 0; i < gridLineConf.length; i++) { + graphicRectArr.push({ + type: 'line', + position: [gridLineConf[i], self.chartTop], + draggable: false, + shape: { + x1: 0, + y1: 0, + x2: 0, + y2: self.dataRegionHeight + }, + style: { + stroke: self.bgConf.gridXColor, + lineWidth: 1, + shadowBlur: 0 + } + }); + } + + // Y轴网格 + var axisY = myChart.getModel().getComponent('yAxis').axis; + var valueYRange = axisY.scale._extent[1] - axisY.scale._extent[0]; + var pixYRange = axisY._extent[1] - axisY._extent[0]; + + if (self.bgConf.fixHeight > 0) { + var valueIdx = self.bgConf.fixHeight; + while (valueIdx < valueYRange) { + var lineYPos = valueIdx * pixYRange / valueYRange; + graphicRectArr.push({ + type: 'line', + position: [self.chartLeft, self.chartTop + pixYRange - lineYPos], + draggable: false, + shape: { + x1: 0, + y1: 0, + x2: self.dataRegionWidth, + y2: 0 + }, + style: { + stroke: self.bgConf.gridYColor, + lineWidth: 1, + shadowBlur: 0 + } + }); + valueIdx += self.bgConf.fixHeight; + } + } + + if (self.styleCond.grid && self.styleCond.grid.length > 0) { + for (var i = 0; i < self.styleCond.grid.length; i++) { + var valueIdx = self.styleCond.grid[i].valueY; + var lineYPos = valueIdx * pixYRange / valueYRange; + graphicRectArr.push({ + type: 'line', + position: [self.chartLeft, self.chartTop + pixYRange - lineYPos], + draggable: false, + shape: { + x1: 0, + y1: 0, + x2: self.dataRegionWidth, + y2: 0 + }, + style: { + stroke: self.styleCond.grid[i].lineColor, + lineWidth: 1, + shadowBlur: 0 + } + }); + } + } + + //console.log(graphicRectArr); + var _opt = myChart.getOption(); //self.getSrcOption(); + _opt.graphic = graphicRectArr; + myChart.setOption(_opt, true); + }, + + getStyleCond: function(chart, ele, series, category, value) { + if (chart == 'pie') { + var pieStyleCondArr = this.styleCond.pie; + if (!pieStyleCondArr || pieStyleCondArr.length <= 0) { + return null; + } + for (var i = 0; i < pieStyleCondArr.length; i++) { + if (pieStyleCondArr[i].title == ele) { + var cond = pieStyleCondArr[i].condition; + cond = cond.replace(/\{分类名\}/g, category); + cond = cond.replace(/\{系列名\}/g, series); + cond = cond.replace(/\{数值\}/g, value); + if (eval(cond)) { + return pieStyleCondArr[i]; + } + } + } + } else if (chart == 'line') { + var pieStyleCondArr = this.styleCond.line; + if (!pieStyleCondArr || pieStyleCondArr.length <= 0) { + return null; + } + for (var i = 0; i < pieStyleCondArr.length; i++) { + if (pieStyleCondArr[i].title == ele) { + var cond = pieStyleCondArr[i].condition; + cond = cond.replace(/\{分类名\}/g, category); + cond = cond.replace(/\{系列名\}/g, series); + cond = cond.replace(/\{数值\}/g, value); + if (eval(cond)) { + return pieStyleCondArr[i]; + } + } + } + } + }, + + getArrayMaxLengthItem: function(arr) { + var item = arr[0]; + for (var i = 1; i < arr.length; i++) { + if (arr[i].length > item.length) { + item = arr[i]; + } + } + return item; + }, + + initEvent: function() { + var self = this; + self.basechart.on('dataZoom', function (params) { + self.addBgRegion(); + }); + + self.basechart.on('click', 'series', function (params) { + //console.log(params); + var linkParams = { + series: params.seriesName, + category: params.value[0], + value: params.value[1], + linkKey: params.componentSubType == 'bar' ? 'pie' : 'line' + }; + self._customDoLink(linkParams); + }); + }, + + _customDoLink: function (params) { + params.linkKey = params.linkKey || 'pie'; + var hyperLink = this.hyperLinkLine; + if (params && hyperLink && hyperLink.parasMap) { + params.chartIndex = this.chartIndex || 0; + this._doLinkWithFilter(params, hyperLink); + } + }, + + hexToRgba: function(hex, al) { + var hexColor = /^#/.test(hex) ? hex.slice(1) : hex, + alp = hex === 'transparent' ? 0 : Math.ceil(al), + r, g, b; + hexColor = /^[0-9a-f]{3}|[0-9a-f]{6}$/i.test(hexColor) ? hexColor : 'fffff'; + if (hexColor.length === 3) { + hexColor = hexColor.replace(/(\w)(\w)(\w)/gi, '$1$1$2$2$3$3'); + } + r = hexColor.slice(0, 2); + g = hexColor.slice(2, 4); + b = hexColor.slice(4, 6); + r = parseInt(r, 16); + g = parseInt(g, 16); + b = parseInt(b, 16); + return { + hex: '#' + hexColor, + alpha: alp, + rgba: 'rgba(' + r + ', ' + g + ', ' + b + ', ' + (alp / 100).toFixed(2) + ')' + }; + }, + getAlign: function (align) { + if ("2" == align) { + return "left"; + } else if ("0" == align) { + return "center"; + } else if ("4" == align) { + return "right"; + } + }, + getLocation: function (align) { + if ("2" == align) { + return "start"; + } else if ("0" == align) { + return "middle"; + } else if ("4" == align) { + return "end"; + } + }, + getFontStyle: function (style) { + if ("2" == style || "3" == style) { + return "italic"; + } else { + return "normal"; + } + }, + getFontWeight: function(style){ + if ("1" == style || "3" == style) { + return "bold"; + } else { + return "normal"; + } + }, + calTextWidth: function(str, fontSize) { + var fontSize = fontSize || 12; + var strHtml = $('') + .attr("id", "temp_cal_text_font_size") + .css({ + "display": "none", + "font-size": fontSize + "px", + "font-family": "Microsoft YaHei" + }).html(str); + $(document.body).append(strHtml); + var width = $('#temp_cal_text_font_size').width(); + var height = $('#temp_cal_text_font_size').height(); + $('#temp_cal_text_font_size').remove(); + return [width, height]; + }, + + _emptyData: function (options) { + options = options || {}; + options.data = options.data || []; + + return options.data.length === 0; + } +}); \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/web/echarts.min.js b/src/com/fr/plugin/pielinecomb/web/echarts.min.js new file mode 100644 index 0000000..c1e1c26 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/web/echarts.min.js @@ -0,0 +1,19 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.pielinecombecharts={})}(this,function(t){"use strict";function e(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Sx(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function n(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}function i(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;ni;i++)e[i]=s(t[i])}}else if(Bx[n]){if(!X(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(var i=0,r=t.length;r>i;i++)e[i]=t[i]}}}else if(!zx[n]&&!X(t)&&!O(t)){e={};for(var a in t)t.hasOwnProperty(a)&&a!==Xx&&(e[a]=s(t[a]))}return e}function l(t,e,n){if(!D(e)||!D(t))return n?s(e):t;for(var i in e)if(e.hasOwnProperty(i)&&i!==Xx){var r=t[i],o=e[i];!D(o)||!D(r)||M(o)||M(r)||O(o)||O(r)||A(o)||A(r)||X(o)||X(r)?!n&&i in t||(t[i]=s(e[i])):l(r,o,n)}return t}function u(t,e){for(var n=t[0],i=1,r=t.length;r>i;i++)n=l(n,t[i],e);return n}function h(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==Xx&&(t[n]=e[n]);return t}function c(t,e,n){for(var i=w(e),r=0;rn;n++)if(t[n]===e)return n}return-1}function d(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e}function f(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ri;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function y(t,e,n){if(!t)return[];if(!e)return V(t);if(t.map&&t.map===Wx)return t.map(e,n);for(var i=[],r=0,o=t.length;o>r;r++)i.push(e.call(n,t[r],r,t));return i}function m(t,e,n,i){if(t&&e){for(var r=0,o=t.length;o>r;r++)n=e.call(i,n,t[r],r,t);return n}}function _(t,e,n){if(!t)return[];if(!e)return V(t);if(t.filter&&t.filter===Vx)return t.filter(e,n);for(var i=[],r=0,o=t.length;o>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function x(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function w(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function b(t,e){for(var n=[],i=2;in;n++)if(null!=t[n])return t[n]}function N(t,e){return null!=t?t:e}function F(t,e,n){return null!=t?t:null!=e?e:n}function V(t){for(var e=[],n=1;np;p++){var f=1<a;a++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*_e(n,7,0===a?1:0,1<o;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}function Me(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;4>u;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,d=h.top;a.push(p,d),l=l&&o&&p===o[c]&&d===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?xe(s,a):xe(a,s))}function Te(t){return"CANVAS"===t.nodeName.toUpperCase()}function Ce(t){return null==t?"":(t+"").replace(hw,function(t,e){return cw[e]})}function Ie(t,e,n,i){return n=n||{},i?ke(t,e,n):fw&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ke(t,e,n),n}function ke(t,e,n){if(Cx.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Te(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(be(dw,t,i,r))return n.zrX=dw[0],void(n.zrY=dw[1])}n.zrX=n.zrY=0}function De(t){return t||window.event}function Ae(t,e,n){if(e=De(e),null!=e.zrX)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var o="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];o&&Ie(t,o,e,n)}else{Ie(t,e,e,n);var a=Pe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&pw.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function Pe(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;var r=Math.abs(0!==i?i:n),o=i>0?-1:0>i?1:n>0?-1:1;return 3*r*o}function Oe(t,e,n,i){t.addEventListener(e,n,i)}function Le(t,e,n,i){t.removeEventListener(e,n,i)}function Re(t){return 2===t.which||3===t.which}function ze(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function Be(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ee(){return[1,0,0,1,0,0]}function Ne(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Fe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ve(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function He(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function We(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Ge(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Ze(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Xe(t){var e=Ee();return Fe(e,t),e}function Ye(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ue}}function Ue(){gw(this.event)}function je(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s?s:i.parent}return r?Dw:!0}return!1}function qe(t,e,n,i,r){for(var o=t.length-1;o>=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=je(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Dw)){e.target=a;break}}}function Ke(t,e,n){var i=t.painter;return 0>e||e>i.getWidth()||0>n||n>i.getHeight()}function $e(t){for(var e=0;t>=Bw;)e|=1&t,t>>=1;return t+e}function Qe(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;Je(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function Je(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function tn(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var o,a=t[i],s=e,l=i;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function en(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;s>l&&o(t,e[n+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[n+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function nn(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;s>l&&o(t,e[n+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;s>l&&o(t,e[n+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function rn(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]=r?a(i,r,o,h):s(i,r,o,h)))}function a(n,i,r,o){var a=0;for(a=0;i>a;a++)p[a]=t[n+a];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--o){if(1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];return void(t[u+o]=p[s])}for(var c,d,f,g=h;;){c=0,d=0,f=!1;do if(e(t[l],p[s])<0){if(t[u++]=t[l++],d++,c=0,0===--o){f=!0;break}}else if(t[u++]=p[s++],c++,d=0,1===--i){f=!0;break}while(g>(c|d));if(f)break;do{if(c=nn(t[l],p,s,i,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=p[s+a];if(u+=c,s+=c,i-=c,1>=i){f=!0;break}}if(t[u++]=t[l++],0===--o){f=!0;break}if(d=en(p[s],t,l,o,0,e),0!==d){for(a=0;d>a;a++)t[u+a]=t[l+a];if(u+=d,l+=d,o-=d,0===o){f=!0;break}}if(t[u++]=p[s++],1===--i){f=!0;break}g--}while(c>=Ew||d>=Ew);if(f)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=p[s]}else{if(0===i)throw new Error;for(a=0;i>a;a++)t[u+a]=p[s+a]}}else for(a=0;i>a;a++)t[u+a]=p[s+a]}function s(n,i,r,o){var a=0;for(a=0;o>a;a++)p[a]=t[r+a];var s=n+i-1,l=o-1,u=r+o-1,c=0,d=0;if(t[u--]=t[s--],0!==--i){if(1===o){for(u-=i,s-=i,d=u+1,c=s+1,a=i-1;a>=0;a--)t[d+a]=t[c+a];return void(t[u]=p[l])}for(var f=h;;){var g=0,v=0,y=!1;do if(e(p[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){y=!0;break}}else if(t[u--]=p[l--],v++,g=0,1===--o){y=!0;break}while(f>(g|v));if(y)break;do{if(g=i-nn(p[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,d=u+1,c=s+1,a=g-1;a>=0;a--)t[d+a]=t[c+a];if(0===i){y=!0;break}}if(t[u--]=p[l--],1===--o){y=!0;break}if(v=o-en(t[s],p,0,o,o-1,e),0!==v){for(u-=v,l-=v,o-=v,d=u+1,c=l+1,a=0;v>a;a++)t[d+a]=p[c+a];if(1>=o){y=!0;break}}if(t[u--]=t[s--],0===--i){y=!0;break}f--}while(g>=Ew||v>=Ew);if(y)break;0>f&&(f=0),f+=2}if(h=f,1>h&&(h=1),1===o){for(u-=i,s-=i,d=u+1,c=s+1,a=i-1;a>=0;a--)t[d+a]=t[c+a];t[u]=p[l]}else{if(0===o)throw new Error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=p[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=p[a]}var l,u,h=Ew,c=0,p=[];return l=[],u=[],{mergeRuns:i,forceMergeRuns:r,pushRun:n}}function on(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var o=0;if(Bw>r)return o=Qe(t,n,i,e),void tn(t,n,i,n+o,e);var a=rn(t,e),s=$e(r);do{if(o=Qe(t,n,i,e),s>o){var l=r;l>s&&(l=s),tn(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}function an(){Hw||(Hw=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function sn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ln(t){return t>-Uw&&Uw>t}function un(t){return t>Uw||-Uw>t}function hn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function cn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function pn(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(ln(h)&&ln(c))if(ln(s))o[0]=0;else{var f=-l/s;f>=0&&1>=f&&(o[d++]=f)}else{var g=c*c-4*h*p;if(ln(g)){var v=c/h,f=-s/a+v,y=-v/2;f>=0&&1>=f&&(o[d++]=f),y>=0&&1>=y&&(o[d++]=y)}else if(g>0){var m=Yw(g),_=h*s+1.5*a*(-c+m),x=h*s+1.5*a*(-c-m);_=0>_?-Xw(-_,Kw):Xw(_,Kw),x=0>x?-Xw(-x,Kw):Xw(x,Kw);var f=(-s-(_+x))/(3*a);f>=0&&1>=f&&(o[d++]=f)}else{var w=(2*h*s-3*a*c)/(2*Yw(h*h*h)),b=Math.acos(w)/3,S=Yw(h),M=Math.cos(b),f=(-s-2*S*M)/(3*a),y=(-s+S*(M+qw*Math.sin(b)))/(3*a),T=(-s+S*(M-qw*Math.sin(b)))/(3*a);f>=0&&1>=f&&(o[d++]=f),y>=0&&1>=y&&(o[d++]=y),T>=0&&1>=T&&(o[d++]=T)}}return d}function dn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(ln(a)){if(un(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(ln(h))r[0]=-o/(2*a);else if(h>0){var c=Yw(h),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),p>=0&&1>=p&&(r[l++]=p)}}return l}function fn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function gn(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,v=.005,y=1/0;$w[0]=l,$w[1]=u;for(var m=0;1>m;m+=.05)Qw[0]=hn(t,n,r,a,m),Qw[1]=hn(e,i,o,s,m),f=nw($w,Qw),y>f&&(c=m,y=f);y=1/0;for(var _=0;32>_&&!(jw>v);_++)p=c-v,d=c+v,Qw[0]=hn(t,n,r,a,p),Qw[1]=hn(e,i,o,s,p),f=nw(Qw,$w),p>=0&&y>f?(c=p,y=f):(Jw[0]=hn(t,n,r,a,d),Jw[1]=hn(e,i,o,s,d),g=nw(Jw,$w),1>=d&&y>g?(c=d,y=g):v*=.5);return h&&(h[0]=hn(t,n,r,a,c),h[1]=hn(e,i,o,s,c)),Yw(y)}function vn(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;l>=d;d++){var f=d*p,g=hn(t,n,r,a,f),v=hn(e,i,o,s,f),y=g-u,m=v-h;c+=Math.sqrt(y*y+m*m),u=g,h=v}return c}function yn(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function mn(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function _n(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(ln(o)){if(un(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(ln(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=Yw(h),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),p>=0&&1>=p&&(r[l++]=p)}}return l}function xn(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function wn(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function bn(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;$w[0]=a,$w[1]=s;for(var p=0;1>p;p+=.05){Qw[0]=yn(t,n,r,p),Qw[1]=yn(e,i,o,p);var d=nw($w,Qw);c>d&&(u=p,c=d)}c=1/0;for(var f=0;32>f&&!(jw>h);f++){var g=u-h,v=u+h;Qw[0]=yn(t,n,r,g),Qw[1]=yn(e,i,o,g);var d=nw(Qw,$w);if(g>=0&&c>d)u=g,c=d;else{Jw[0]=yn(t,n,r,v),Jw[1]=yn(e,i,o,v);var y=nw(Jw,$w);1>=v&&c>y?(u=v,c=y):h*=.5}}return l&&(l[0]=yn(t,n,r,u),l[1]=yn(e,i,o,u)),Yw(c)}function Sn(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;a>=c;c++){var p=c*h,d=yn(t,n,r,p),f=yn(e,i,o,p),g=d-s,v=f-l;u+=Math.sqrt(g*g+v*v),s=d,l=f}return u}function Mn(t){var e=t&&tb.exec(t);if(e){var n=e[1].split(","),i=+G(n[0]),r=+G(n[1]),o=+G(n[2]),a=+G(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return 0>=t?0:t>=1?1:pn(0,i,o,1,t,s)&&hn(0,r,a,1,s[0])}}}function Tn(t){return t=Math.round(t),0>t?0:t>255?255:t}function Cn(t){return t=Math.round(t),0>t?0:t>360?360:t}function In(t){return 0>t?0:t>1?1:t}function kn(t){var e=t;return Tn(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100*255:parseInt(e,10))}function Dn(t){var e=t;return In(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100:parseFloat(e))}function An(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function Pn(t,e,n){return t+(e-t)*n}function On(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Ln(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Rn(t,e){sb&&Ln(sb,e),sb=ab.put(t,sb||e.slice())}function zn(t,e){if(t){e=e||[];var n=ab.get(t);if(n)return Ln(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in ob)return Ln(e,ob[i]),Rn(t,e),e;var r=i.length;if("#"!==i.charAt(0)){var o=i.indexOf("("),a=i.indexOf(")");if(-1!==o&&a+1===r){var s=i.substr(0,o),l=i.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return 3===l.length?On(e,+l[0],+l[1],+l[2],1):On(e,0,0,0,1);u=Dn(l.pop());case"rgb":return l.length>=3?(On(e,kn(l[0]),kn(l[1]),kn(l[2]),3===l.length?u:Dn(l[3])),Rn(t,e),e):void On(e,0,0,0,1);case"hsla":return 4!==l.length?void On(e,0,0,0,1):(l[3]=Dn(l[3]),Bn(l,e),Rn(t,e),e);case"hsl":return 3!==l.length?void On(e,0,0,0,1):(Bn(l,e),Rn(t,e),e);default:return}}On(e,0,0,0,1)}else{if(4===r||5===r){var h=parseInt(i.slice(1,4),16);return h>=0&&4095>=h?(On(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,5===r?parseInt(i.slice(4),16)/15:1),Rn(t,e),e):void On(e,0,0,0,1)}if(7===r||9===r){var h=parseInt(i.slice(1,7),16);return h>=0&&16777215>=h?(On(e,(16711680&h)>>16,(65280&h)>>8,255&h,9===r?parseInt(i.slice(7),16)/255:1),Rn(t,e),e):void On(e,0,0,0,1)}}}}function Bn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Dn(t[1]),r=Dn(t[2]),o=.5>=r?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],On(e,Tn(255*An(a,o,n+1/3)),Tn(255*An(a,o,n)),Tn(255*An(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function En(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}function Nn(t,e){var n=zn(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return Zn(n,4===n.length?"rgba":"rgb")}}function Fn(t){var e=zn(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Vn(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Tn(Pn(a[0],s[0],l)),n[1]=Tn(Pn(a[1],s[1],l)),n[2]=Tn(Pn(a[2],s[2],l)),n[3]=In(Pn(a[3],s[3],l)),n}}function Hn(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=zn(e[r]),s=zn(e[o]),l=i-r,u=Zn([Tn(Pn(a[0],s[0],l)),Tn(Pn(a[1],s[1],l)),Tn(Pn(a[2],s[2],l)),In(Pn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function Wn(t,e,n,i){var r=zn(t);return t?(r=En(r),null!=e&&(r[0]=Cn(e)),null!=n&&(r[1]=Dn(n)),null!=i&&(r[2]=Dn(i)),Zn(Bn(r),"rgba")):void 0}function Gn(t,e){var n=zn(t);return n&&null!=e?(n[3]=In(e),Zn(n,"rgba")):void 0}function Zn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function Xn(t,e){var n=zn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function Yn(){return Zn([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}function Un(t){return"linear"===t.type}function jn(t){return"radial"===t.type}function qn(t,e,n){return(e-t)*n+t}function Kn(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=qn(e[o],n[o],i);return t}function $n(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=qn(e[a][s],n[a][s],i)}return t}function Qn(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=e[o]+n[o]*i;return t}function Jn(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function ti(t,e){for(var n=t.length,i=e.length,r=n>i?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa;if(s)i.length=a;else for(var l=o;a>l;l++)i.push(1===n?r[l]:cb.call(r[l]))}for(var u=i[0]&&i[0].length,l=0;lh;h++)isNaN(i[l][h])&&(i[l][h]=r[l][h])}}function ni(t){if(g(t)){var e=t.length;if(g(t[0])){for(var n=[],i=0;e>i;i++)n.push(cb.call(t[i]));return n}return cb.call(t)}return t}function ii(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function ri(t){return g(t&&t[0])?2:1}function oi(t){return t===vb||t===yb}function ai(t){return t===db||t===fb}function si(){return(new Date).getTime()}function li(t){var e=t.pointerType;return"pen"===e||"touch"===e}function ui(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function hi(t){t&&(t.zrByTouch=!0)}function ci(t,e){return Ae(t.dom,new kb(t,e),!0)}function pi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}function di(t,e){var n=e.domHandlers;Cx.pointerEventsSupported?v(Tb.pointer,function(i){gi(e,i,function(e){n[i].call(t,e)})}):(Cx.touchEventsSupported&&v(Tb.touch,function(i){gi(e,i,function(r){n[i].call(t,r),ui(e)})}),v(Tb.mouse,function(i){gi(e,i,function(r){r=De(r),e.touching||n[i].call(t,r)})}))}function fi(t,e){function n(n){function i(i){i=De(i),pi(t,i.target)||(i=ci(t,i),e.domHandlers[n].call(t,i))}gi(e,n,i,{capture:!0})}Cx.pointerEventsSupported?v(Cb.pointer,n):Cx.touchEventsSupported||v(Cb.mouse,n)}function gi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Oe(t.domTarget,e,n,i)}function vi(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&Le(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}function yi(t){return t>Vb||-Vb>t}function mi(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Ci(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Ti(i[0],n.width),u+=Ti(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return t=t||{},t.x=l,t.y=u,t.align=h,t.verticalAlign=c,t}function Ii(t,e,n,i,r){n=n||{};var o=[];Li(t,"",t,e,n,i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,a--,0>=a&&(s?l&&l():u&&u())},c=function(){a--,0>=a&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var p=0;pi;i++)t[i]=e[i]}function Di(t){return g(t[0])}function Ai(t,e,n){if(g(e[n]))if(g(t[n])||(t[n]=[]),P(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),ki(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(Di(r))for(var s=r[0].length,l=0;a>l;l++)o[l]?ki(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else ki(o,r,a);o.length=r.length}else t[n]=e[n]}function Pi(t,e){return t===e||g(t)&&g(e)&&Oi(t,e)}function Oi(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;n>i;i++)if(t[i]!==e[i])return!1;return!0}function Li(t,e,n,i,r,o,a,s){for(var l=w(i),u=r.duration,h=r.delay,c=r.additive,d=r.setToFinal,f=!D(o),v=t.animators,y=[],m=0;m0||r.force&&!a.length){var k=void 0,A=void 0,P=void 0;if(s){A={},d&&(k={});for(var M=0;S>M;M++){var x=y[M];A[x]=n[x],d?k[x]=i[x]:n[x]=i[x]}}else if(d){P={};for(var M=0;S>M;M++){var x=y[M];P[x]=ni(n[x]),Ai(n,i,x)}}var T=new wb(n,!1,!1,c?_(v,function(t){return t.targetName===e}):null);T.targetName=e,r.scope&&(T.scope=r.scope),d&&k&&T.whenWithKeys(0,k,y),P&&T.whenWithKeys(0,P,y),T.whenWithKeys(null==u?500:u,s?A:i,y).delay(h||0),t.addAnimator(T,e),a.push(T)}}function Ri(t){delete nS[t]}function zi(t){if(!t)return!1;if("string"==typeof t)return Xn(t,1)r;r++)n+=Xn(e[r].color,1);return n/=i,zb>n}return!1}function Bi(t,e){var n=new iS(o(),t,e);return nS[n.id]=n,n}function Ei(t){t.dispose()}function Ni(){for(var t in nS)nS.hasOwnProperty(t)&&nS[t].dispose();nS={}}function Fi(t){return nS[t]}function Vi(t,e){eS[t]=e}function Hi(t){return t.replace(/^\s+|\s+$/g,"")}function Wi(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(r>=t)return a;if(t>=o)return s}else{if(t>=r)return a;if(o>=t)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function Gi(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return C(t)?Hi(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Zi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),sS),t=(+t).toFixed(e),n?t:+t}function Xi(t){return t.sort(function(t,e){return t-e}),t}function Yi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;15>n;n++,e*=10)if(Math.round(t*e)/e===t)return n;return Ui(t)}function Ui(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=0>o?0:r-1-o;return Math.max(0,a-i)}function ji(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function qi(t,e,n){if(!t[e])return 0;var i=Ki(t,n);return i[e]||0}function Ki(t,e){var n=m(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return[];for(var i=Math.pow(10,e),r=y(t,function(t){return(isNaN(t)?0:t)/n*i*100}),o=100*i,a=y(r,function(t){return Math.floor(t)}),s=m(a,function(t,e){return t+e},0),l=y(r,function(t,e){return t-a[e]});o>s;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,p=l.length;p>c;++c)l[c]>u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return y(a,function(t){return t/i})}function $i(t,e){var n=Math.max(Yi(t),Yi(e)),i=t+e;return n>sS?i:Zi(i,n)}function Qi(t){var e=2*Math.PI;return(t%e+e)%e}function Ji(t){return t>-aS&&aS>t}function tr(t){if(t instanceof Date)return t;if(C(t)){var e=uS.exec(t); +if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return new Date(null==t?0/0:Math.round(t))}function er(t){return Math.pow(10,nr(t))}function nr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function ir(t,e){var n,i=nr(t),r=Math.pow(10,i),o=t/r;return n=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function rr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function or(t){function e(t,n,i){return t.interval[i]s;s++)o[s]<=n&&(o[s]=n,a[s]=s?1:1-i),n=o[s],i=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function ar(t){var e=parseFloat(t);return e==t&&(0!==e||!C(t)||t.indexOf("x")<=0)?e:0/0}function sr(t){return!isNaN(ar(t))}function lr(){return Math.round(9*Math.random())}function ur(t,e){return 0===e?t:ur(e,t%e)}function hr(t,e){return null==t?e:null==e?t:t*e/ur(t,e)}function cr(t){throw new Error(t)}function pr(t,e,n){return(e-t)*n+t}function dr(t){return t instanceof Array?t:null==t?[]:[t]}function fr(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function gr(t){return!D(t)||M(t)||t instanceof Date?t:t.value}function vr(t){return D(t)&&!(t instanceof Array)}function yr(t,e,n){var i="normalMerge"===n,r="replaceMerge"===n,o="replaceAll"===n;t=t||[],e=(e||[]).slice();var a=Y();v(e,function(t,n){return D(t)?void 0:void(e[n]=null)});var s=mr(t,a,n);return(i||r)&&_r(s,t,a,e),i&&xr(s,e),i||r?wr(s,e,r):o&&br(s,e),Sr(s),s}function mr(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;rr?n:i;for(var s=[],l=n,u=i,h=Math.max(l?l.length:0,u.length),c=0;h>c;++c){var p=t.getDimensionInfo(c);if(p&&"ordinal"===p.type)s[c]=(1>r&&l?l:u)[c];else{var d=l&&l[c]?l[c]:0,f=u[c],a=pr(d,f,r);s[c]=Zi(a,o?Math.max(Yi(d),Yi(f)):e)}}return s}function Hr(t){var e={main:"",sub:""};if(t){var n=t.split(vS);e.main=n[0]||"",e.sub=n[1]||""}return e}function Wr(t){W(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Gr(t){return!(!t||!t[mS])}function Zr(t){t.$constructor=t,t.extend=function(t){var n,i=this;return Xr(i)?n=function(t){function n(){return t.apply(this,arguments)||this}return e(n,t),n}(i):(n=function(){(t.$constructor||i).apply(this,arguments)},d(n,this)),h(n.prototype,t),n[mS]=!0,n.extend=this.extend,n.superCall=jr,n.superApply=qr,n.superClass=i,n}}function Xr(t){return T(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function Yr(t,e){t.extend=e.extend}function Ur(t){var e=["__\x00is_clz",_S++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function jr(t,e){for(var n=[],i=2;i=0||r&&p(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}function Qr(t){if("string"==typeof t){var e=SS.get(t);return e&&e.image}return t}function Jr(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=SS.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?(e=o.image,!eo(e)&&o.pending.push(a)):(e=Rx.loadImage(t,to,to),e.__zrImageSrc=t,SS.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function to(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;ea;a++)o[a]=ro(o[a],r);return o.join("\n")}function io(t,e,n,i){i=i||{};var r=h({},i);r.font=e,n=N(n,"..."),r.maxIterations=N(i.maxIterations,2);var o=r.minChar=N(i.minChar,0);r.cnCharWidth=_i("国",e);var a=r.ascCharWidth=_i("a",e);r.placeholder=N(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;o>l&&s>=a;l++)s-=a;var u=_i(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function ro(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=_i(t,i);if(n>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?oo(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=_i(t,i)}return""===t&&(t=e.placeholder),t}function oo(t,e,n,i){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?n:i}return o}function ao(t,e){null!=t&&(t+="");var n,i=e.overflow,r=e.padding,o=e.font,a="truncate"===i,s=Mi(o),l=N(e.lineHeight,s),u=!!e.backgroundColor,h="truncate"===e.lineOverflow,c=e.width;n=null==c||"break"!==i&&"breakAll"!==i?t?t.split("\n"):[]:t?co(t,e.font,c,"breakAll"===i,0).lines:[];var p=n.length*l,d=N(e.height,p);if(p>d&&h){var f=Math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=io(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;vu&&lo(i,t.substring(u,h),e,l),lo(i,r[2],e,l,r[1]),u=MS.lastIndex}ua){w>0?(m.tokens=m.tokens.slice(0,w),n(m,x,_),i.lines=i.lines.slice(0,y+1)):i.lines=i.lines.slice(0,y);break t}var k=S.width,D=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charAt(k.length-1))b.percentWidth=k,c.push(b),b.contentWidth=_i(b.text,C);else{if(D){var A=S.backgroundColor,P=A&&A.image;P&&(P=Qr(P),eo(P)&&(b.width=Math.max(b.width,P.width*I/P.height)))}var O=g&&null!=o?o-x:null;null!=O&&OO?(b.text="",b.width=b.contentWidth=0):(b.text=no(b.text,O-T,C,e.ellipsis,{minChar:e.truncateMinChar}),b.width=b.contentWidth=_i(b.text,C)):b.contentWidth=_i(b.text,C)}b.width+=T,x+=b.width,S&&(_=Math.max(_,b.lineHeight))}n(m,x,_)}i.outerWidth=i.width=N(o,d),i.outerHeight=i.height=N(a,p),i.contentHeight=p,i.contentWidth=d,f&&(i.outerWidth+=f[1]+f[3],i.outerHeight+=f[0]+f[2]);for(var y=0;y0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=co(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var v=0;v=33&&383>=e}function ho(t){return uo(t)?kS[t]?!0:!1:!0}function co(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",u=0,h=u),o.push(s),a.push(h-u),l+=p,u+=d,s="",h=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}function po(t,e,n){return zS.copy(t.getBoundingRect()),t.transform&&zS.applyTransform(t.transform),BS.width=e,BS.height=n,!zS.intersect(BS)}function fo(t,e,n,i,r,o){r[0]=ES(t,n),r[1]=ES(e,i),o[0]=NS(t,n),o[1]=NS(e,i)}function go(t,e,n,i,r,o,a,s,l,u){var h=dn,c=hn,p=h(t,n,r,a,XS);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;p>d;d++){var f=c(t,n,r,a,XS[d]);l[0]=ES(f,l[0]),u[0]=NS(f,u[0])}p=h(e,i,o,s,YS);for(var d=0;p>d;d++){var g=c(e,i,o,s,YS[d]);l[1]=ES(g,l[1]),u[1]=NS(g,u[1])}l[0]=ES(t,l[0]),u[0]=NS(t,u[0]),l[0]=ES(a,l[0]),u[0]=NS(a,u[0]),l[1]=ES(e,l[1]),u[1]=NS(e,u[1]),l[1]=ES(s,l[1]),u[1]=NS(s,u[1])}function vo(t,e,n,i,r,o,a,s){var l=xn,u=yn,h=NS(ES(l(t,n,r),1),0),c=NS(ES(l(e,i,o),1),0),p=u(t,n,r,h),d=u(e,i,o,c);a[0]=ES(t,r,p),a[1]=ES(e,o,d),s[0]=NS(t,r,p),s[1]=NS(e,o,d)}function yo(t,e,n,i,r,o,a,s,l){var u=ye,h=me,c=Math.abs(r-o);if(1e-4>c%HS&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(WS[0]=VS(r)*n+t,WS[1]=FS(r)*i+e,GS[0]=VS(o)*n+t,GS[1]=FS(o)*i+e,u(s,WS,GS),h(l,WS,GS),r%=HS,0>r&&(r+=HS),o%=HS,0>o&&(o+=HS),r>o&&!a?o+=HS:o>r&&a&&(r+=HS),a){var p=o;o=r,r=p}for(var d=0;o>d;d+=Math.PI/2)d>r&&(ZS[0]=VS(d)*n+t,ZS[1]=FS(d)*i+e,u(s,ZS,s),h(l,ZS,l))}function mo(t){var e=Math.round(t/oM*1e8)/1e8;return e%2*oM}function _o(t,e){var n=mo(t[0]);0>n&&(n+=aM);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=aM?r=n+aM:e&&n-r>=aM?r=n-aM:!e&&n>r?r=n+(aM-mo(n-r)):e&&r>n&&(r=n-(aM-mo(r-n))),t[0]=n,t[1]=r}function xo(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||e-s>a&&i-s>a||o>t+s&&o>n+s||t-s>o&&n-s>o)return!1;if(t===n)return Math.abs(o-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function wo(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>o+c&&h>s+c||e-c>h&&i-c>h&&o-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>a+c||t-c>u&&n-c>u&&r-c>u&&a-c>u)return!1;var p=gn(t,e,n,i,r,o,a,s,u,h,null);return c/2>=p}function bo(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||e-u>l&&i-u>l&&o-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=bn(t,e,n,i,r,o,s,l,null);return u/2>=h}function So(t){return t%=hM,0>t&&(t+=hM),t}function Mo(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(Math.abs(i-r)%cM<1e-4)return!0;if(o){var c=i;i=So(r),r=So(c)}else i=So(i),r=So(r);i>r&&(r+=cM);var p=Math.atan2(l,s);return 0>p&&(p+=cM),p>=i&&r>=p||p+cM>=i&&r>=p+cM}function To(t,e,n,i,r,o){if(o>e&&o>i||e>o&&i>o)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=e>i?1:-1;(1===a||0===a)&&(s=e>i?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}function Co(t,e){return Math.abs(t-e)e&&u>i&&u>o&&u>s||e>u&&i>u&&o>u&&s>u)return 0;var h=pn(e,i,o,s,u,gM);if(0===h)return 0;for(var c=0,p=-1,d=void 0,f=void 0,g=0;h>g;g++){var v=gM[g],y=0===v||1===v?.5:1,m=hn(t,n,r,a,v);l>m||(0>p&&(p=dn(e,i,o,s,vM),vM[1]1&&Io(),d=hn(e,i,o,s,vM[0]),p>1&&(f=hn(e,i,o,s,vM[1]))),c+=2===p?vd?y:-y:vf?y:-y:f>s?y:-y:vd?y:-y:d>s?y:-y)}return c}function Do(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||e>s&&i>s&&o>s)return 0;var l=_n(e,i,o,s,gM);if(0===l)return 0;var u=xn(e,i,o);if(u>=0&&1>=u){for(var h=0,c=yn(e,i,o,u),p=0;l>p;p++){var d=0===gM[p]||1===gM[p]?.5:1,f=yn(t,n,r,gM[p]);a>f||(h+=gM[p]c?d:-d:c>o?d:-d)}return h}var d=0===gM[0]||1===gM[0]?.5:1,f=yn(t,n,r,gM[0]);return a>f?0:e>o?d:-d}function Ao(t,e,n,i,r,o,a,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);gM[0]=-l,gM[1]=l;var u=Math.abs(i-r);if(1e-4>u)return 0;if(u>=dM-1e-4){i=0,r=dM;var h=o?1:-1;return a>=gM[0]+t&&a<=gM[1]+t?h:0}if(i>r){var c=i;i=r,r=c}0>i&&(i+=dM,r+=dM);for(var p=0,d=0;2>d;d++){var f=gM[d];if(f+t>a){var g=Math.atan2(s,f),h=o?1:-1;0>g&&(g=dM+g),(g>=i&&r>=g||g+dM>=i&&r>=g+dM)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Po(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,h=0,c=0,p=0,d=0,f=0;l>f;){var g=s[f++],v=1===f;switch(g===pM.M&&f>1&&(n||(u+=To(h,c,p,d,i,r))),v&&(h=s[f],c=s[f+1],p=h,d=c),g){case pM.M:p=s[f++],d=s[f++],h=p,c=d;break;case pM.L:if(n){if(xo(h,c,s[f],s[f+1],e,i,r))return!0}else u+=To(h,c,s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case pM.C:if(n){if(wo(h,c,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],e,i,r))return!0}else u+=ko(h,c,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case pM.Q:if(n){if(bo(h,c,s[f++],s[f++],s[f],s[f+1],e,i,r))return!0}else u+=Do(h,c,s[f++],s[f++],s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case pM.A:var y=s[f++],m=s[f++],_=s[f++],x=s[f++],w=s[f++],b=s[f++];f+=1;var S=!!(1-s[f++]);o=Math.cos(w)*_+y,a=Math.sin(w)*x+m,v?(p=o,d=a):u+=To(h,c,o,a,i,r);var M=(i-y)*x/_+y;if(n){if(Mo(y,m,x,w,w+b,S,e,M,r))return!0}else u+=Ao(y,m,x,w,w+b,S,M,r);h=Math.cos(w+b)*_+y,c=Math.sin(w+b)*x+m;break;case pM.R:p=h=s[f++],d=c=s[f++];var T=s[f++],C=s[f++];if(o=p+T,a=d+C,n){if(xo(p,d,o,d,e,i,r)||xo(o,d,o,a,e,i,r)||xo(o,a,p,a,e,i,r)||xo(p,a,p,d,e,i,r))return!0}else u+=To(o,d,o,a,i,r),u+=To(p,a,p,d,i,r);break;case pM.Z:if(n){if(xo(h,c,p,d,e,i,r))return!0}else u+=To(h,c,p,d,i,r);h=p,c=d}}return n||Co(c,d)||(u+=To(h,c,p,d,i,r)||0),0!==u}function Oo(t,e,n){return Po(t,0,!1,e,n)}function Lo(t,e,n,i){return Po(t,e,!0,n,i)}function Ro(t){return!!(t&&"string"!=typeof t&&t.width&&t.height)}function zo(t,e){var n,i,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+o>u&&(c=n+o,n*=u/c,o*=u/c),t.moveTo(a+n,s),t.lineTo(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-Math.PI/2,0),t.lineTo(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(a,s+n),0!==n&&t.arc(a+n,s+n,n,Math.PI,1.5*Math.PI)}function Bo(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(CM(2*i)===CM(2*r)&&(t.x1=t.x2=No(i,s,!0)),CM(2*o)===CM(2*a)&&(t.y1=t.y2=No(o,s,!0)),t):t}}function Eo(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=No(i,s,!0),t.y=No(r,s,!0),t.width=Math.max(No(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(No(r+a,s,!1)-t.y,0===a?0:1),t):t}}function No(t,e,n){if(!e)return t;var i=CM(2*t);return(i+CM(e))%2===0?i/2:(i+(n?1:-1))/2}function Fo(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?Ix+"px":t+"px":t}function Vo(t,e){for(var n=0;n=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xo(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yo(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Uo(t){var e=t.text;return null!=e&&(e+=""),e}function jo(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}function qo(t){return null!=t&&"none"!==t}function Ko(t){if(C(t)){var e=eT.get(t);return e||(e=Nn(t,-.1),eT.put(t,e)),e}if(L(t)){var n=h({},t);return n.colorStops=y(t.colorStops,function(t){return{offset:t.offset,color:Nn(t.color,-.1)}}),n}return t}function $o(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Qo(t){$o(t,"emphasis",XM)}function Jo(t){t.hoverState===XM&&$o(t,"normal",GM)}function ta(t){$o(t,"blur",ZM)}function ea(t){t.hoverState===ZM&&$o(t,"normal",GM)}function na(t){t.selected=!0}function ia(t){t.selected=!1}function ra(t,e,n){e(t,n)}function oa(t,e,n){ra(t,e,n),t.isGroup&&t.traverse(function(t){ra(t,e,n)})}function aa(t,e){switch(e){case"emphasis":t.hoverState=XM;break;case"normal":t.hoverState=GM;break;case"blur":t.hoverState=ZM;break;case"select":t.selected=!0}}function sa(t,e,n,i){for(var r=t.style,o={},a=0;a=0,o=!1;if(t instanceof xM){var a=HM(t),s=r?a.selectFill||a.normalFill:a.normalFill,l=r?a.selectStroke||a.normalStroke:a.normalStroke;if(qo(s)||qo(l)){i=i||{};var u=i.style||{};"inherit"===u.fill?(o=!0,i=h({},i),u=h({},u),u.fill=s):!qo(u.fill)&&qo(s)?(o=!0,i=h({},i),u=h({},u),u.fill=Ko(s)):!qo(u.stroke)&&qo(l)&&(o||(i=h({},i),u=h({},u)),u.stroke=Ko(l)),i.style=u}}if(i&&null==i.z2){o||(i=h({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:jM)}return i}function ua(t,e,n){if(n&&null==n.z2){n=h({},n);var i=t.z2SelectLift;n.z2=t.z2+(null!=i?i:qM)}return n}function ha(t,e,n){var i=p(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:sa(t,["opacity"],e,{opacity:1});n=n||{};var a=n.style||{};return null==a.opacity&&(n=h({},n),a=h({opacity:i?r:.1*o.opacity},a),n.style=a),n}function ca(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return la(this,t,e,n);if("blur"===t)return ha(this,t,n);if("select"===t)return ua(this,t,n)}return n}function pa(t){t.stateProxy=ca;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=ca),n&&(n.stateProxy=ca)}function da(t,e){!wa(t,e)&&!t.__highByOuter&&oa(t,Qo)}function fa(t,e){!wa(t,e)&&!t.__highByOuter&&oa(t,Jo)}function ga(t,e){t.__highByOuter|=1<<(e||0),oa(t,Qo)}function va(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&oa(t,Jo)}function ya(t){oa(t,ta)}function ma(t){oa(t,ea)}function _a(t){oa(t,na)}function xa(t){oa(t,ia)}function wa(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function ba(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(e,r){var o=WM(r),a="series"===e,s=a?t.getViewOfSeriesModel(r):t.getViewOfComponentModel(r);!a&&i.push(s),o.isBlured&&(s.group.traverse(function(t){ea(t)}),a&&n.push(r)),o.isBlured=!1}),v(i,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function Sa(t,e,n,i){function r(t,e){for(var n=0;nl;)a=r.getItemGraphicEl(l++);if(a){var u=EM(a);Sa(i,u.focus,u.blurScope,n)}else{var h=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);null!=h&&Sa(i,h,c,n)}}}function Ca(t,e,n,i){var r={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return r;var o=i.getModel().getComponent(t,e);if(!o)return r;var a=i.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return r;for(var s,l=a.findHighDownDispatchers(n),u=0;u0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}})}),e}function Oa(t,e,n){Ea(t,!0),oa(t,pa),za(t,e,n)}function La(t){Ea(t,!1)}function Ra(t,e,n,i){i?La(t):Oa(t,e,n)}function za(t,e,n){var i=EM(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}function Ba(t,e,n,i){n=n||"itemStyle";for(var r=0;r=FM&&(e=VM[t]=FM++),e}function Va(t){var e=t.type;return e===QM||e===JM||e===tT}function Ha(t){var e=t.type;return e===KM||e===$M}function Wa(t){var e=HM(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}function Ga(t,e){if(e){var n,i,r,o,a,s,l=t.data,u=t.len(),h=rT.M,c=rT.C,p=rT.L,d=rT.R,f=rT.A,g=rT.Q;for(r=0,o=0;u>r;){switch(n=l[r++],o=r,i=0,n){case h:i=1;break;case p:i=1;break;case c:i=3;break;case g:i=2;break;case f:var v=e[4],y=e[5],m=aT(e[0]*e[0]+e[1]*e[1]),_=aT(e[2]*e[2]+e[3]*e[3]),x=sT(-e[1]/_,e[0]/m);l[r]*=m,l[r++]+=v,l[r]*=_,l[r++]+=y,l[r++]*=m,l[r++]*=_,l[r++]+=x,l[r++]+=x,r+=2,o=r;break;case d:s[0]=l[r++],s[1]=l[r++],ve(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ve(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;i>a;a++){var w=oT[a];w[0]=l[r++],w[1]=l[r++],ve(w,w,e),l[o++]=w[0],l[o++]=w[1]}}t.increaseVersion()}}function Za(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Xa(t,e){return(t[0]*e[0]+t[1]*e[1])/(Za(t)*Za(e))}function Ya(t,e){return(t[0]*e[1]1&&(a*=lT(f),s*=lT(f));var g=(r===o?-1:1)*lT((a*a*s*s-a*a*d*d-s*s*p*p)/(a*a*d*d+s*s*p*p))||0,v=g*a*d/s,y=g*-s*p/a,m=(t+n)/2+hT(c)*v-uT(c)*y,_=(e+i)/2+uT(c)*v+hT(c)*y,x=Ya([1,0],[(p-v)/a,(d-y)/s]),w=[(p-v)/a,(d-y)/s],b=[(-1*p-v)/a,(-1*d-y)/s],S=Ya(w,b);if(Xa(w,b)<=-1&&(S=cT),Xa(w,b)>=1&&(S=0),0>S){var M=Math.round(S/cT*1e6)/1e6;S=2*cT+M%2*cT}h.addData(u,m,_,a,s,x,S,c,o)}function ja(t){var e=new uM;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=uM.CMD,l=t.match(pT);if(!l)return e;for(var u=0;ug;g++)d[g]=parseFloat(d[g]);for(var v=0;f>v;){var y=void 0,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0,S=void 0,M=i,T=r,C=void 0,I=void 0;switch(c){case"l":i+=d[v++],r+=d[v++],p=s.L,e.addData(p,i,r);break;case"L":i=d[v++],r=d[v++],p=s.L,e.addData(p,i,r);break;case"m":i+=d[v++],r+=d[v++],p=s.M,e.addData(p,i,r),o=i,a=r,c="l";break;case"M":i=d[v++],r=d[v++],p=s.M,e.addData(p,i,r),o=i,a=r,c="L";break;case"h":i+=d[v++],p=s.L,e.addData(p,i,r);break;case"H":i=d[v++],p=s.L,e.addData(p,i,r);break;case"v":r+=d[v++],p=s.L,e.addData(p,i,r);break;case"V":r=d[v++],p=s.L,e.addData(p,i,r);break;case"C":p=s.C,e.addData(p,d[v++],d[v++],d[v++],d[v++],d[v++],d[v++]),i=d[v-2],r=d[v-1];break;case"c":p=s.C,e.addData(p,d[v++]+i,d[v++]+r,d[v++]+i,d[v++]+r,d[v++]+i,d[v++]+r),i+=d[v-2],r+=d[v-1];break;case"S":y=i,m=r,C=e.len(),I=e.data,n===s.C&&(y+=i-I[C-4],m+=r-I[C-3]),p=s.C,M=d[v++],T=d[v++],i=d[v++],r=d[v++],e.addData(p,y,m,M,T,i,r);break;case"s":y=i,m=r,C=e.len(),I=e.data,n===s.C&&(y+=i-I[C-4],m+=r-I[C-3]),p=s.C,M=i+d[v++],T=r+d[v++],i+=d[v++],r+=d[v++],e.addData(p,y,m,M,T,i,r);break;case"Q":M=d[v++],T=d[v++],i=d[v++],r=d[v++],p=s.Q,e.addData(p,M,T,i,r);break;case"q":M=d[v++]+i,T=d[v++]+r,i+=d[v++],r+=d[v++],p=s.Q,e.addData(p,M,T,i,r);break;case"T":y=i,m=r,C=e.len(),I=e.data,n===s.Q&&(y+=i-I[C-4],m+=r-I[C-3]),i=d[v++],r=d[v++],p=s.Q,e.addData(p,y,m,i,r);break;case"t":y=i,m=r,C=e.len(),I=e.data,n===s.Q&&(y+=i-I[C-4],m+=r-I[C-3]),i+=d[v++],r+=d[v++],p=s.Q,e.addData(p,y,m,i,r);break;case"A":_=d[v++],x=d[v++],w=d[v++],b=d[v++],S=d[v++],M=i,T=r,i=d[v++],r=d[v++],p=s.A,Ua(M,T,i,r,b,S,_,x,w,p,e);break;case"a":_=d[v++],x=d[v++],w=d[v++],b=d[v++],S=d[v++],M=i,T=r,i+=d[v++],r+=d[v++],p=s.A,Ua(M,T,i,r,b,S,_,x,w,p,e)}}("z"===c||"Z"===c)&&(p=s.Z,e.addData(p),i=o,r=a),n=p}return e.toStatic(),e}function qa(t){return null!=t.setData}function Ka(t,e){var n=ja(t),i=h({},e);return i.buildPath=function(t){if(qa(t)){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e,1)}else{var e=t;n.rebuildPath(e,1)}},i.applyTransform=function(t){Ga(n,t),this.dirtyShape()},i}function $a(t,e){return new fT(Ka(t,e))}function Qa(t,n){var i=Ka(t,n),r=function(t){function n(e){var n=t.call(this,e)||this;return n.applyTransform=i.applyTransform,n.buildPath=i.buildPath,n}return e(n,t),n}(fT);return r}function Ja(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var o=t[r];n.push(o.getUpdatedPathProxy(!0))}var a=new xM(e);return a.createPathProxy(),a.buildPath=function(t){if(qa(t)){t.appendPath(n); +var e=t.getContext();e&&t.rebuildPath(e,1)}},a}function ts(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,h=a-r,c=s-o,p=c*l-h*u;return DT>p*p?void 0:(p=(h*(e-o)-c*(t-r))/p,[t+p*l,e+p*u])}function es(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/CT(s*s+l*l),h=u*l,c=-u*s,p=t+h,d=e+c,f=n+h,g=i+c,v=(p+f)/2,y=(d+g)/2,m=f-p,_=g-d,x=m*m+_*_,w=r-o,b=p*g-f*d,S=(0>_?-1:1)*CT(IT(0,w*w*x-b*b)),M=(b*_-m*S)/x,T=(-b*m-_*S)/x,C=(b*_+m*S)/x,I=(-b*m+_*S)/x,k=M-v,D=T-y,A=C-v,P=I-y;return k*k+D*D>A*A+P*P&&(M=C,T=I),{cx:M,cy:T,x0:-h,y0:-c,x1:M*(r/w-1),y1:T*(r/w-1)}}function ns(t){var e;if(M(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}function is(t,e){var n,i=IT(e.r,0),r=IT(e.r0||0,0),o=i>0,a=r>0;if(o||a){if(o||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,u=e.endAngle;if(!isNaN(l)&&!isNaN(u)){var h=e.cx,c=e.cy,p=!!e.clockwise,d=TT(u-l),f=d>xT&&d%xT;if(f>DT&&(d=f),i>DT)if(d>xT-DT)t.moveTo(h+i*bT(l),c+i*wT(l)),t.arc(h,c,i,l,u,!p),r>DT&&(t.moveTo(h+r*bT(u),c+r*wT(u)),t.arc(h,c,r,u,l,p));else{var g=void 0,v=void 0,y=void 0,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0,S=void 0,M=void 0,T=void 0,C=void 0,I=void 0,k=void 0,D=void 0,A=void 0,P=i*bT(l),O=i*wT(l),L=r*bT(u),R=r*wT(u),z=d>DT;if(z){var B=e.cornerRadius;B&&(n=ns(B),g=n[0],v=n[1],y=n[2],m=n[3]);var E=TT(i-r)/2;if(_=kT(E,y),x=kT(E,m),w=kT(E,g),b=kT(E,v),T=S=IT(_,x),C=M=IT(w,b),(S>DT||M>DT)&&(I=i*bT(u),k=i*wT(u),D=r*bT(l),A=r*wT(l),_T>d)){var N=ts(P,O,D,A,I,k,L,R);if(N){var F=P-N[0],V=O-N[1],H=I-N[0],W=k-N[1],G=1/wT(ST((F*H+V*W)/(CT(F*F+V*V)*CT(H*H+W*W)))/2),Z=CT(N[0]*N[0]+N[1]*N[1]);T=kT(S,(i-Z)/(G+1)),C=kT(M,(r-Z)/(G-1))}}}if(z)if(T>DT){var X=kT(y,T),Y=kT(m,T),U=es(D,A,P,O,i,X,p),j=es(I,k,L,R,i,Y,p);t.moveTo(h+U.cx+U.x0,c+U.cy+U.y0),S>T&&X===Y?t.arc(h+U.cx,c+U.cy,T,MT(U.y0,U.x0),MT(j.y0,j.x0),!p):(X>0&&t.arc(h+U.cx,c+U.cy,X,MT(U.y0,U.x0),MT(U.y1,U.x1),!p),t.arc(h,c,i,MT(U.cy+U.y1,U.cx+U.x1),MT(j.cy+j.y1,j.cx+j.x1),!p),Y>0&&t.arc(h+j.cx,c+j.cy,Y,MT(j.y1,j.x1),MT(j.y0,j.x0),!p))}else t.moveTo(h+P,c+O),t.arc(h,c,i,l,u,!p);else t.moveTo(h+P,c+O);if(r>DT&&z)if(C>DT){var X=kT(g,C),Y=kT(v,C),U=es(L,R,I,k,r,-Y,p),j=es(P,O,D,A,r,-X,p);t.lineTo(h+U.cx+U.x0,c+U.cy+U.y0),M>C&&X===Y?t.arc(h+U.cx,c+U.cy,C,MT(U.y0,U.x0),MT(j.y0,j.x0),!p):(Y>0&&t.arc(h+U.cx,c+U.cy,Y,MT(U.y0,U.x0),MT(U.y1,U.x1),!p),t.arc(h,c,r,MT(U.cy+U.y1,U.cx+U.x1),MT(j.cy+j.y1,j.cx+j.x1),p),X>0&&t.arc(h+j.cx,c+j.cy,X,MT(j.y1,j.x1),MT(j.y0,j.x0),!p))}else t.lineTo(h+L,c+R),t.arc(h,c,r,u,l,p);else t.lineTo(h+L,c+R)}else t.moveTo(h,c);t.closePath()}}}function rs(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;d>p;p++)ye(a,a,t[p]),me(s,s,t[p]);ye(a,a,i[0]),me(s,s,i[1])}for(var p=0,d=t.length;d>p;p++){var f=t[p];if(n)r=t[p?p-1:d-1],o=t[(p+1)%d];else{if(0===p||p===d-1){l.push(te(t[p]));continue}r=t[p-1],o=t[p+1]}re(u,o,r),he(u,u,e);var g=pe(f,r),v=pe(f,o),y=g+v;0!==y&&(g/=y,v/=y),he(h,u,-g),he(c,u,v);var m=ne([],f,h),_=ne([],f,c);i&&(me(m,m,a),ye(m,m,s),me(_,_,a),ye(_,_,s)),l.push(m),l.push(_)}return n&&l.push(l.shift()),l}function os(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=rs(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;(n?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=r[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;c>s;s++)t.lineTo(r[s][0],r[s][1])}n&&t.closePath()}}function as(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?cn:hn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?cn:hn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?mn:yn)(t.x1,t.cpx1,t.x2,e),(n?mn:yn)(t.y1,t.cpy1,t.y2,e)]}function ss(t,e,n,i,r){var o;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();o=a&&a.animation}var s=e&&e.isAnimationEnabled(),l="update"===t;if(s){var u=void 0,h=void 0,c=void 0;i?(u=N(i.duration,200),h=N(i.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(h=o.easing),null!=o.delay&&(c=o.delay)),T(c)&&(c=c(n,r)),T(u)&&(u=u(n));var p={duration:u||0,delay:c,easing:h};return p}return null}function ls(t,e,n,i,r,o,a){var s,l=!1;T(r)?(a=o,o=r,r=null):D(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u="leave"===t;u||e.stopAnimation("leave");var h=ss(t,i,r,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null);if(h&&h.duration>0){var c=h.duration,p=h.delay,d=h.easing,f={duration:c,delay:p||0,easing:d,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,f):e.animateTo(n,f)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function us(t,e,n,i,r,o){ls("update",t,e,n,i,r,o)}function hs(t,e,n,i,r,o){ls("enter",t,e,n,i,r,o)}function cs(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Ds(t){return!t.isGroup}function As(t){return null!=t.shape}function Ps(t,e,n){function i(t){var e={};return t.traverse(function(t){Ds(t)&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return As(t)&&(e.shape=h({},t.shape)),e}if(t&&e){var o=i(t);e.traverse(function(t){if(Ds(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),us(t,i,n,EM(t).dataIndex)}}})}}function Os(t,e){return y(t,function(t){var n=t[0];n=rC(n,e.x),n=oC(n,e.x+e.width);var i=t[1];return i=rC(i,e.y),i=oC(i,e.y+e.height),[n,i]})}function Ls(t,e){var n=rC(t.x,e.x),i=oC(t.x+t.width,e.x+e.width),r=rC(t.y,e.y),o=oC(t.y+t.height,e.y+e.height);return i>=n&&o>=r?{x:n,y:r,width:i-n,height:o-r}:void 0}function Rs(t,e,n){var i=h({rectHover:!0},e),r=i.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(r.image=t.slice(8),c(r,n),new TM(i)):xs(t.replace("path://",""),i,n,"center"):void 0}function zs(t,e,n,i,r){for(var o=0,a=r[r.length-1];og||g>1)return!1;var v=Es(d,f,h,c)/p;return 0>v||v>1?!1:!0}function Es(t,e,n,i){return t*i-n*e}function Ns(t){return 1e-6>=t&&t>=-1e-6}function Fs(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=C(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&v(w(l),function(t){K(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=EM(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:c({content:i,formatterParams:s},r)}}function Vs(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Hs(t,e){if(t)if(M(t))for(var n=0;n=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=n(e),l=s.graph,u=s.noEntryList,h={};for(v(t,function(t){h[t]=!0});u.length;){var c=u.pop(),p=l[c],d=!!h[c];d&&(i.call(r,c,p.originalDeps.slice()),delete h[c]),v(p.successor,d?a:o)}v(h,function(){var t="";throw new Error(t)})}}}function il(t,e){return l(l({},t,!0),e,!0)}function rl(t,e){t=t.toUpperCase(),RC[t]=new CC(e),LC[t]=e}function ol(t){if(C(t)){var e=LC[t.toUpperCase()]||{};return t===AC||t===PC?s(e):l(s(e),s(LC[OC]),!1)}return l(s(t),s(LC[OC]),!1)}function al(t){return RC[t]}function sl(){return RC[OC]}function ll(t,e){return t+="","0000".substr(0,e-t.length)+t}function ul(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function hl(t){return t===ul(t)}function cl(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function pl(t,e,n,i){var r=tr(t),o=r[vl(n)](),a=r[yl(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[ml(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[_l(n)](),c=(h-1)%12+1,p=r[xl(n)](),d=r[wl(n)](),f=r[bl(n)](),g=i instanceof CC?i:al(i||zC)||sl(),v=g.getModel("time"),y=v.get("month"),m=v.get("monthAbbr"),_=v.get("dayOfWeek"),x=v.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,ll(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,ll(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ll(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,ll(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,ll(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,ll(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,ll(f,3)).replace(/{S}/g,f+"")}function dl(t,e,n,i,r){var o=null;if(C(n))o=n;else if(T(n))o=n(t.value,e,{level:t.level});else{var a=h({},HC);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(M(o)){var d=null==t.level?0:t.level>=0?t.level:o.length+t.level;d=Math.min(d,o.length-1),o=o[d]}}return pl(new Date(t.value),o,r,i)}function fl(t,e){var n=tr(t),i=n[yl(e)]()+1,r=n[ml(e)](),o=n[_l(e)](),a=n[xl(e)](),s=n[wl(e)](),l=n[bl(e)](),u=0===l,h=u&&0===s,c=h&&0===a,p=c&&0===o,d=p&&1===r,f=d&&1===i;return f?"year":d?"month":p?"day":c?"hour":h?"minute":u?"second":"millisecond"}function gl(t,e,n){var i=k(t)?tr(t):t;switch(e=e||fl(t,n)){case"year":return i[vl(n)]();case"half-year":return i[yl(n)]()>=6?1:0;case"quarter":return Math.floor((i[yl(n)]()+1)/4);case"month":return i[yl(n)]();case"day":return i[ml(n)]();case"half-day":return i[_l(n)]()/24;case"hour":return i[_l(n)]();case"minute":return i[xl(n)]();case"second":return i[wl(n)]();case"millisecond":return i[bl(n)]()}}function vl(t){return t?"getUTCFullYear":"getFullYear"}function yl(t){return t?"getUTCMonth":"getMonth"}function ml(t){return t?"getUTCDate":"getDate"}function _l(t){return t?"getUTCHours":"getHours"}function xl(t){return t?"getUTCMinutes":"getMinutes"}function wl(t){return t?"getUTCSeconds":"getSeconds"}function bl(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Sl(t){return t?"setUTCFullYear":"setFullYear"}function Ml(t){return t?"setUTCMonth":"setMonth"}function Tl(t){return t?"setUTCDate":"setDate"}function Cl(t){return t?"setUTCHours":"setHours"}function Il(t){return t?"setUTCMinutes":"setMinutes"}function kl(t){return t?"setUTCSeconds":"setSeconds"}function Dl(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Al(t,e,n,i,r,o,a,s){var l=new LM({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Pl(t){if(!sr(t))return C(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Ol(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Ll(t,e,n){function i(t){return t&&G(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",a="time"===e,s=t instanceof Date;if(a||s){var l=a?tr(t):t;if(!isNaN(+l))return pl(l,o,n);if(s)return"-"}if("ordinal"===e)return I(t)?i(t):k(t)&&r(t)?t+"":"-";var u=ar(t);return r(u)?Pl(u):I(t)?i(t):"boolean"==typeof t?t+"":"-"}function Rl(t,e,n){M(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'';var a=n.markerId||"markerX";return{renderMode:o,content:"{"+a+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Bl(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=tr(e),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),h=i[r+"Seconds"](),c=i[r+"Milliseconds"]();return t=t.replace("MM",ll(a,2)).replace("M",a).replace("yyyy",o).replace("yy",ll(o%100+"",2)).replace("dd",ll(s,2)).replace("d",s).replace("hh",ll(l,2)).replace("h",l).replace("mm",ll(u,2)).replace("m",u).replace("ss",ll(h,2)).replace("s",h).replace("SSS",ll(c,3))}function El(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Nl(t,e){return e=e||"transparent",C(t)?t:D(t)?t.colorStops&&(t.colorStops[0]||{}).color||e:e}function Fl(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}function Vl(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);h=o+g,h>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(f?-f.y+p.y:0);c=a+v,c>r||l.newline?(o+=s+n,a=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)})}function Hl(t,e,n){n=YC(n||0);var i=e.width,r=e.height,o=Gi(t.left,i),a=Gi(t.top,r),s=Gi(t.right,i),l=Gi(t.bottom,r),u=Gi(t.width,i),h=Gi(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new kw(o+n[3],a+n[0],u,h);return f.margin=n,f}function Wl(t,e,n,i,r,o){var a=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o=o||t,o.x=t.x,o.y=t.y,!a&&!s)return!1;var u;if("raw"===l)u="group"===t.type?new kw(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}var p=Hl(c({width:u.width,height:u.height},e),n,i),d=a?p.x-u.x:0,f=s?p.y-u.y:0;return"raw"===l?(o.x=d,o.y=f):(o.x+=d,o.y+=f),o===t&&t.markRedraw(),!0}function Gl(t){var e=t.layoutMode||t.constructor.layoutMode;return D(e)?e:e?{type:e}:null}function Zl(t,e,n){function i(n,i){var a={},l=0,u={},h=0,c=2;if(qC(n,function(e){u[e]=t[e]}),qC(n,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[i])return o(e,n[1])?u[n[2]]=null:o(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return a;for(var p=0;pi;i++)t.push(e+i)}function r(t){var e=t.dimsDef;return e?e.length:1}var o={},a=Kl(e);if(!a||!t)return o;var s,l,u=[],h=[],c=e.ecModel,p=vI(c).datasetMap,d=a.uid+"_"+n.seriesLayoutBy;t=t.slice(),v(t,function(e,n){var i=D(e)?e:t[n]={name:e};"ordinal"===i.type&&null==s&&(s=n,l=r(i)),o[i.name]=[]});var f=p.get(d)||p.set(d,{categoryWayDim:l,valueWayDim:0});return v(t,function(t,e){var n=t.name,a=r(t);if(null==s){var l=f.valueWayDim;i(o[n],l,a),i(h,l,a),f.valueWayDim+=a}else if(s===e)i(o[n],0,a),i(u,0,a);else{var l=f.categoryWayDim;i(o[n],l,a),i(h,l,a),f.categoryWayDim+=a}}),u.length&&(o.itemName=u),h.length&&(o.seriesName=h),o}function Kl(t){var e=t.get("data",!0);return e?void 0:Br(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},fS).models[0]}function $l(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?Br(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},fS).models:[]}function Ql(t,e){return Jl(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Jl(t,e,n,i,r,o){function a(t){var e=C(t);return null!=t&&isFinite(t)&&""!==t?e?gI.Might:gI.Not:e&&"-"!==t?gI.Must:void 0}var s,l=5;if(P(t))return gI.Not;var u,h;if(i){var c=i[o];D(c)?(u=c.name,h=c.type):C(c)&&(u=c)}if(null!=h)return"ordinal"===h?gI.Must:gI.Not;if(e===lI){var p=t;if(n===fI){for(var d=p[o],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=a(d[r+f])))return s}else for(var f=0;ff;f++){var g=p[r+f];if(g&&null!=(s=a(g[o])))return s}}else if(e===uI){var v=t;if(!u)return gI.Not;for(var f=0;ff;f++){var y=v[f];if(y&&null!=(s=a(y[u])))return s}}else if(e===hI){var m=t;if(!u)return gI.Not;var d=m[u];if(!d||P(d))return gI.Not;for(var f=0;ff;f++)if(null!=(s=a(d[f])))return s}else if(e===sI)for(var _=t,f=0;f<_.length&&l>f;f++){var y=_[f],x=gr(y);if(!M(x))return gI.Not;if(null!=(s=a(x[o])))return s}return gI.Not}function tu(t,e){W(null==yI.get(t)&&e),yI.set(t,e)}function eu(t,e,n){var i=yI.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}function nu(t,e){for(var n=t.length,i=0;n>i;i++)if(t[i].length>e)return t[i];return t[n-1]}function iu(t,e,n,i,r,o,a){o=o||t;var s=e(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var h=null!=a&&i?nu(i,a):n;if(h=h||n,h&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}function ru(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}function ou(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function au(t,e){var n=t.color&&!t.colorLayer;v(e,function(e,i){"colorLayer"===i&&n||tI.hasClass(i)||("object"==typeof e?t[i]=t[i]?l(t[i],e,!1):s(e):null==t[i]&&(t[i]=e))})}function su(t,e,n){if(M(e)){var i=Y();return v(e,function(t){if(null!=t){var e=Cr(t,null);null!=e&&i.set(t,!0)}}),_(n,function(e){return e&&i.get(e[t])})}var r=Cr(e,null);return _(n,function(e){return e&&null!=r&&e[t]===r})}function lu(t,e){return e.hasOwnProperty("subType")?_(t,function(t){return t&&t.subType===e.subType}):t}function uu(t){var e=Y();return t&&v(dr(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}function hu(t,e,n){function i(t){v(e,function(e){e(t,n)})}var r,o,a=[],s=t.baseOption,l=t.timeline,u=t.options,h=t.media,c=!!t.media,p=!!(u||l||s&&s.timeline);return s?(o=s,o.timeline||(o.timeline=l)):((p||c)&&(t.options=t.media=null),o=t),c&&M(h)&&v(h,function(t){t&&t.option&&(t.query?a.push(t):r||(r=t))}),i(o),v(u,function(t){return i(t)}),v(a,function(t){return i(t.option)}),{baseOption:o,timelineOptions:u||[],mediaDefault:r,mediaList:a}}function cu(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return v(t,function(t,e){var n=e.match(LI);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();pu(i[a],t,o)||(r=!1)}}),r}function pu(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function du(t,e){return t.join(",")===e.join(",")}function fu(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=EI.length;i>n;n++){var r=EI[n],o=e.normal,a=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?l(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),a&&a[r]&&(t[r]=t[r]||{},t[r].emphasis?l(t[r].emphasis,a[r]):t[r].emphasis=a[r],a[r]=null)}}function gu(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,c(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope))}}function vu(t){gu(t,"itemStyle"),gu(t,"lineStyle"),gu(t,"areaStyle"),gu(t,"label"),gu(t,"labelLine"),gu(t,"upperLabel"),gu(t,"edgeLabel")}function yu(t,e){var n=BI(t)&&t[e],i=BI(n)&&n.textStyle;if(i)for(var r=0,o=pS.length;o>r;r++){var a=pS[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}function mu(t){t&&(vu(t),yu(t,"label"),t.emphasis&&yu(t.emphasis,"label"))}function _u(t){if(BI(t)){fu(t),vu(t),yu(t,"label"),yu(t,"upperLabel"),yu(t,"edgeLabel"),t.emphasis&&(yu(t.emphasis,"label"),yu(t.emphasis,"upperLabel"),yu(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(fu(e),mu(e));var n=t.markLine;n&&(fu(n),mu(n));var i=t.markArea;i&&mu(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!P(o))for(var a=0;a=0;g--){var v=t[g];if(s||(d=v.data.rawIndexOf(v.stackedByDimension,p)),d>=0){var y=v.data.getByRawIndex(v.stackResultDimension,d);if("all"===l||"positive"===l&&y>0||"negative"===l&&0>y||"samesign"===l&&c>=0&&y>0||"samesign"===l&&0>=c&&0>y){c=$i(c,y),f=y;break}}}return i[0]=c,i[1]=f,i})})}function Ru(t){return t instanceof HI}function zu(t,e,n){n=n||Nu(t);var i=e.seriesLayoutBy,r=Fu(t,n,i,e.sourceHeader,e.dimensions),o=new HI({data:t,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:s(e)});return o}function Bu(t){return new HI({data:t,sourceFormat:P(t)?cI:sI})}function Eu(t){return new HI({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:s(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function Nu(t){var e=pI;if(P(t))e=cI;else if(M(t)){0===t.length&&(e=lI);for(var n=0,i=t.length;i>n;n++){var r=t[n];if(null!=r){if(M(r)){e=lI;break}if(D(r)){e=uI;break}}}}else if(D(t))for(var o in t)if(K(t,o)&&g(t[o])){e=hI;break}return e}function Fu(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:Hu(r),startIndex:a,dimensionsDetectedCount:o};if(e===lI){var s=t;"auto"===i||null==i?Wu(function(t){null!=t&&"-"!==t&&(C(t)?null==a&&(a=1):a=0)},n,s,10):a=k(i)?i:i?1:0,r||1!==a||(r=[],Wu(function(t,e){r[e]=null!=t?t+"":""},n,s,1/0)),o=r?r.length:n===fI?s.length:s[0]?s[0].length:null}else if(e===uI)r||(r=Vu(t));else if(e===hI)r||(r=[],v(t,function(t,e){r.push(e)}));else if(e===sI){var l=gr(t[0]);o=M(l)&&l.length||1}return{startIndex:a,dimensionsDefine:Hu(r),dimensionsDetectedCount:o}}function Vu(t){for(var e,n=0;nr;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;rr;r++)t(o[r],r)}function Gu(t){var e=t.sourceFormat;return e===uI||e===hI}function Zu(t,e){var n=ZI[Uu(t,e)];return n}function Xu(t,e){var n=YI[Uu(t,e)];return n}function Yu(t){var e=jI[t];return e}function Uu(t,e){return t===lI?t+"_"+e:t}function ju(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r=t.getStore(),o=r.getSource().sourceFormat;if(null!=n){var a=t.getDimensionIndex(n),s=r.getDimensionProperty(a);return Yu(o)(i,a,s)}var l=i;return o===sI&&(l=gr(i)),l}}}function qu(t){var e,n;return D(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Ku(t){return new $I(t)}function $u(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||k(t)||null==t||"-"===t||(t=+tr(t)),null==t||""===t?0/0:+t)}function Qu(t,e){var n=new ek,i=t.data,r=n.sourceFormat=t.sourceFormat,o=t.startIndex,a="";t.seriesLayoutBy!==dI&&cr(a);var s=[],l={},u=t.dimensionsDefine;if(u)v(u,function(t,e){var n=t.name,i={index:e,name:n,displayName:t.displayName};if(s.push(i),null!=n){var r="";K(l,n)&&cr(r),l[n]=i}});else for(var h=0;ho;o++)r.push(n[o].slice());return r}if(e===uI){for(var r=[],o=0,a=n.length;a>o;o++)r.push(h({},n[o]));return r}}function eh(t,e,n){return null!=n?k(n)||!isNaN(n)&&!K(e,n)?t[n]:K(e,n)?e[n]:void 0:void 0}function nh(t){return s(t)}function ih(t){t=s(t);var e=t.type,n="";e||cr(n);var i=e.split(":");2!==i.length&&cr(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,nk.set(e,t)}function rh(t,e,n){var i=dr(t),r=i.length,o="";r||cr(o);for(var a=0,s=r;s>a;a++){var l=i[a];e=oh(l,e,n,1===r?null:a),a!==s-1&&(e.length=Math.max(e.length,1))}return e}function oh(t,e){var n="";e.length||cr(n),D(t)||cr(n);var i=t.type,r=nk.get(i);r||cr(n);var o=y(e,function(t){return Qu(t,r)}),a=dr(r.transform({upstream:o[0],upstreamList:o,config:s(t.config)}));return y(a,function(t,n){var i="";D(t)||cr(i),t.data||cr(i);var r=Nu(t.data);ah(r)||cr(i);var o,a=e[0];if(a&&0===n&&!t.dimensions){var s=a.startIndex;s&&(t.data=a.data.slice(0,s).concat(t.data)),o={seriesLayoutBy:dI,sourceHeader:s,dimensions:a.metaRawOption.dimensions}}else o={seriesLayoutBy:dI,sourceHeader:0,dimensions:t.dimensions};return zu(t.data,o,null)})}function ah(t){return t===lI||t===uI}function sh(t){return t>65535?rk:ok}function lh(){return[1/0,-1/0]}function uh(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function hh(t,e,n,i,r){var o=lk[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;s>u;u++)l[u]=a[u];t[e]=l}}else t[e]=new o(i)}function ch(t){var e=t.option.transform;e&&Z(t.option.transform)}function ph(t){return"series"===t.mainType}function dh(t){throw new Error(t)}function fh(t,e){var n=t.color||"#6e7079",i=t.fontSize||12,r=t.fontWeight||"400",o=t.color||"#464646",a=t.fontSize||14,s=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+Ce(i+"")+"px;color:"+Ce(n)+";font-weight:"+Ce(r+""),valueStyle:"font-size:"+Ce(a+"")+"px;color:"+Ce(o)+";font-weight:"+Ce(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}function gh(t,e){return e.type=t,e}function vh(t){return"section"===t.type}function yh(t){return vh(t)?_h:xh}function mh(t){if(vh(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return v(t.blocks,function(t){var n=mh(t);n>=e&&(e=n+ +(i&&(!n||vh(t)&&!t.noHeader)))}),e}return 0}function _h(t,e,n,i){var r=e.noHeader,o=bh(mh(e)),a=[],s=e.blocks||[];W(!s||M(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(K(u,l)){var c=new tk(u[l],null);s.sort(function(t,e){return c.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===l&&s.reverse()}v(s,function(n,r){var s=e.valueFormatter,l=yh(n)(s?h(h({},t),{valueFormatter:s}):t,n,r>0?o.html:0,i);null!=l&&a.push(l)});var p="richText"===t.renderMode?a.join(o.richText):Sh(a.join(""),r?n:o.html);if(r)return p;var d=Ll(e.header,"ordinal",t.useUTC),f=fh(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Ch(t,d,f)+o.richText+p:Sh('
'+Ce(d)+"
"+p,n)}function xh(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return t=M(t)?t:[t],y(t,function(t,e){return Ll(t,M(d)?d[e]:d,u)})};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":Ll(l,"ordinal",u),d=e.valueType,f=a?[]:h(e.value),g=!s||!o,v=!s&&o,m=fh(i,r),_=m.nameStyle,x=m.valueStyle;return"richText"===r?(s?"":c)+(o?"":Ch(t,p,_))+(a?"":Ih(t,f,g,v,x)):Sh((s?"":c)+(o?"":Mh(p,!s,_))+(a?"":Th(f,g,v,x)),n)}}function wh(t,e,n,i,r,o){if(t){var a=yh(t),s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter};return a(s,t,0,o)}}function bh(t){return{html:pk[t],richText:dk[t]}}function Sh(t,e){var n='
',i="margin: "+e+"px 0 0";return'
'+t+n+"
"}function Mh(t,e,n){var i=e?"margin-left:2px":"";return''+Ce(t)+""}function Th(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=M(t)?t:[t],''+y(t,function(t){return Ce(t)}).join("  ")+""}function Ch(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Ih(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(M(e)?e.join(" "):e,o)}function kh(t,e){var n=t.getData().getItemVisual(e,"style"),i=n[t.visualDrawType];return Nl(i)}function Dh(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}function Ah(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=M(c),d=kh(o,a);if(h>1||p&&!h){var f=Ph(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=ju(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var v=Ir(o),y=v&&o.name||"",m=l.getName(a),_=s?y:m;return gh("section",{header:y,noHeader:s||!v,sortParam:r,blocks:[gh("nameValue",{markerType:"item",markerColor:d,name:_,noName:!G(_),value:e,valueType:n})].concat(i||[])})}function Ph(t,e,n,i,r){function o(t,e){var n=a.getDimensionInfo(e);n&&n.otherDims.tooltip!==!1&&(s?h.push(gh("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(l.push(t),u.push(n.type)))}var a=e.getData(),s=m(t,function(t,e,n){var i=a.getDimensionInfo(n);return t=t||i&&i.tooltip!==!1&&null!=i.displayName},!1),l=[],u=[],h=[];return i.length?v(i,function(t){o(ju(a,n,t),t)}):v(t,o),{inlineValues:l,inlineValueTypes:u,blocks:h}}function Oh(t,e){return t.getName(e)||t.getId(e)}function Lh(t){var e=t.name;Ir(t)||(t.name=Rh(t)||e)}function Rh(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return v(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function zh(t){return t.model.getRawData().count()}function Bh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Eh}function Eh(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Nh(t,e){v(U(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,S(Fh,e))})}function Fh(t,e){var n=Vh(t);return n&&n.setOutputEnd((e||this).count()),e}function Vh(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function Hh(){var t=Lr();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}function Wh(t,e,n){t&&Na(t)&&("emphasis"===e?ga:va)(t,n)}function Gh(t,e,n){var i=Or(t,e),r=e&&null!=e.highlightKey?Fa(e.highlightKey):null;null!=i?v(dr(i),function(e){Wh(t.getItemGraphicEl(e),n,r)}):t.eachItemGraphicEl(function(t){Wh(t,n,r)})}function Zh(t){return xk(t.model)}function Xh(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&_k(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Sk[l]}function Yh(t,e,n){function i(){h=(new Date).getTime(),c=null,t.apply(a,s||[])}var r,o,a,s,l,u=0,h=0,c=null;e=e||0;var p=function(){for(var t=[],p=0;p=0?i():c=setTimeout(i,-o),u=r};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(t){l=t},p}function Uh(t,e,n,i){var r=t[e];if(r){var o=r[Mk]||r,a=r[Ck],s=r[Tk];if(s!==n||a!==i){if(null==n||!i)return t[e]=o;r=t[e]=Yh(o,n,"debounce"===i),r[Mk]=o,r[Ck]=i,r[Tk]=n}return r}}function jh(t,e){var n=t[e];n&&n[Mk]&&(n.clear&&n.clear(),t[e]=n[Mk])}function qh(t,e){var n=t.visualStyleMapper||kk[e];return n?n:(console.warn("Unkown style type '"+e+"'."),kk.itemStyle)}function Kh(t,e){var n=t.visualDrawType||Dk[e];return n?n:(console.warn("Unkown style type '"+e+"'."),"fill")}function $h(t,e){e=e||{},c(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new tS,i=new DM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r=new LM({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new DM({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});n.add(o);var a;return e.showSpinner&&(a=new XT({shape:{startAngle:-Rk/2,endAngle:-Rk/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),a.animateShape(!0).when(1e3,{endAngle:3*Rk/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Rk/2}).delay(300).start("circularInOut"),n.add(a)),n.resize=function(){var n=r.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&a.setShape({cx:l,cy:u}),o.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}function Qh(t){t.overallReset(t.ecModel,t.api,t.payload)}function Jh(t){return t.overallProgress&&tc}function tc(){this.agent.dirty(),this.getDownstream().dirty()}function ec(){this.agent&&this.agent.dirty()}function nc(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function ic(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=dr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?y(e,function(t,e){return rc(e)}):Bk}function rc(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o=0&&yc(l)?l:.5;var u=t.createRadialGradient(a,s,0,a,s,l);return u}function xc(t,e,n){for(var i="radial"===e.type?_c(t,e,n):mc(t,e,n),r=e.colorStops,o=0;o0?"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:k(t)?[t]:M(t)?t:null:null}function Tc(t){var e=t.style,n=e.lineDash&&e.lineWidth>0&&Mc(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(n){var r=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;r&&1!==r&&(n=y(n,function(t){return t/r}),i/=r)}return[n,i]}function Cc(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Ic(t){return"string"==typeof t&&"none"!==t}function kc(t){var e=t.fill;return null!=e&&"none"!==e}function Dc(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Ac(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Pc(t,e,n){var i=Jr(e.image,e.__image,n);if(eo(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*$x),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}function Oc(t,e,n,i){var r,o=Cc(n),a=kc(n),s=n.strokePercent,l=1>s,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var h=e.path||lD,c=e.__dirty;if(!i){var p=n.fill,d=n.stroke,f=a&&!!p.colorStops,g=o&&!!d.colorStops,v=a&&!!p.image,y=o&&!!d.image,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0;(f||g)&&(b=e.getBoundingRect()),f&&(m=c?xc(t,p,b):e.__canvasFillGradient,e.__canvasFillGradient=m),g&&(_=c?xc(t,d,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),v&&(x=c||!e.__canvasFillPattern?Pc(t,p,e):e.__canvasFillPattern,e.__canvasFillPattern=x),y&&(w=c||!e.__canvasStrokePattern?Pc(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),f?t.fillStyle=m:v&&(x?t.fillStyle=x:a=!1),g?t.strokeStyle=_:y&&(w?t.strokeStyle=w:o=!1)}var S=e.getGlobalScale();h.setScale(S[0],S[1],e.segmentIgnoreThreshold);var M,T;t.setLineDash&&n.lineDash&&(r=Tc(e),M=r[0],T=r[1]);var C=!0;(u||c&Vw)&&(h.setDPR(t.dpr),l?h.setContext(null):(h.setContext(t),C=!1),h.reset(),e.buildPath(h,e.shape,i),h.toStatic(),e.pathUpdated()),C&&h.rebuildPath(t,l?s:1),M&&(t.setLineDash(M),t.lineDashOffset=T),i||(n.strokeFirst?(o&&Ac(t,n),a&&Dc(t,n)):(a&&Dc(t,n),o&&Ac(t,n))),M&&t.setLineDash([])}function Lc(t,e,n){var i=e.__image=Jr(n.image,e.__image,e,e.onload);if(i&&eo(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,h=n.sy||0;t.drawImage(i,u,h,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var u=n.sx,h=n.sy,c=a-u,p=s-h;t.drawImage(i,u,h,c,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}function Rc(t,e,n){var i,r=n.text;if(null!=r&&(r+=""),r){t.font=n.font||Dx,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var o=void 0,a=void 0;t.setLineDash&&n.lineDash&&(i=Tc(e),o=i[0],a=i[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),n.strokeFirst?(Cc(n)&&t.strokeText(r,n.x,n.y),kc(n)&&t.fillText(r,n.x,n.y)):(kc(n)&&t.fillText(r,n.x,n.y),Cc(n)&&t.strokeText(r,n.x,n.y)),o&&t.setLineDash([])}}function zc(t,e,n,i,r){var o=!1;if(!i&&(n=n||{},e===n))return!1;if(i||e.opacity!==n.opacity){Wc(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?AS.opacity:a}(i||e.blend!==n.blend)&&(o||(Wc(t,r),o=!0),t.globalCompositeOperation=e.blend||AS.blend);for(var s=0;so;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Xc(t,l,s,o===a-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var u=0,h=r.length;h>u;u++){var l=r[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Xc(t,l,s,u===h-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}function Uc(t,e){function n(t){function e(){for(var t=1,e=0,n=y.length;n>e;++e)t=hr(t,y[e]);for(var i=1,e=0,n=v.length;n>e;++e)i=hr(i,v[e].length);t*=i;var r=m*y.length*v.length;return{width:Math.max(1,Math.min(t,s.maxTileWidth)),height:Math.max(1,Math.min(r,s.maxTileHeight))}}function n(){function t(t,e,n,a,l){var u=o?1:i,h=fc(l,t*u,e*u,n*u,a*u,s.color,s.symbolKeepAspect);if(o){var c=r.painter.renderOneToVNode(h);c&&x.children.push(c)}else Zc(d,h)}d&&(d.clearRect(0,0,_.width,_.height),s.backgroundColor&&(d.fillStyle=s.backgroundColor,d.fillRect(0,0,_.width,_.height)));for(var e=0,n=0;n=e))for(var a=-m,l=0,u=0,h=0;a=S)break;if(y%2===0){var M=.5*(1-s.symbolSize),T=p+f[h][y]*M,C=a+g[l]*M,I=f[h][y]*s.symbolSize,k=g[l]*s.symbolSize,D=b/2%v[c].length;t(T,C,I,k,v[c][D])}p+=f[h][y],++b,++y,y===f[h].length&&(y=0)}++h,h===f.length&&(h=0)}a+=g[l],++u,++l,l===g.length&&(l=0)}}for(var a=[i],l=!0,u=0;u=0)){AA.push(n);var o=zk.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Sp(t,e){SA[t]=e}function Mp(t){r({createCanvas:t})}function Tp(t,e,n){var i=ep("registerMap");i&&i(t,e,n)}function Cp(t){var e=ep("getMap");return e&&e(t)}function Ip(t){return null==t?0:t.length||1}function kp(t){return t}function Dp(t,e){var n={},i=n.encode={},r=Y(),o=[],a=[],s={};v(t.dimensions,function(e){var n=t.getDimensionInfo(e),l=n.coordDim;if(l){var u=n.coordDimIndex;Ap(i,l)[u]=e,n.isExtraCoord||(r.set(l,1),Op(n.type)&&(o[0]=e),Ap(s,l)[u]=t.getDimensionIndex(n.name)),n.defaultTooltip&&a.push(e)}aI.each(function(t,e){var r=Ap(i,e),o=n.otherDims[e];null!=o&&o!==!1&&(r[o]=n.name)})});var l=[],u={};r.each(function(t,e){var n=i[e];u[e]=n[0],l=l.concat(n)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=y(l,function(e){return t.getDimensionInfo(e).storeDimIndex}),n.encodeFirstDimNotExtra=u;var h=i.label;h&&h.length&&(o=h.slice());var c=i.tooltip;return c&&c.length?a=c.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,n.userOutput=new HA(s,e),n}function Ap(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Pp(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Op(t){return!("ordinal"===t||"time"===t)}function Lp(t){return t instanceof XA}function Rp(t){for(var e=Y(),n=0;n<(t||[]).length;n++){var i=t[n],r=D(i)?i.name:i;null!=r&&null==e.get(r)&&e.set(r,n)}return e}function zp(t){var e=GA(t);return e.dimNameMap||(e.dimNameMap=Rp(t.dimensionsDefine))}function Bp(t){return t>30}function Ep(t,e){return Np(t,e).dimensions}function Np(t,e){function n(t){var e=m[t];if(0>e){var n=a[t],i=D(n)?n:{name:n},r=new WA,o=i.name;null!=o&&null!=f.get(o)&&(r.name=r.displayName=o),null!=i.type&&(r.type=i.type),null!=i.displayName&&(r.displayName=i.displayName);var s=l.length;return m[t]=s,r.storeDimIndex=t,l.push(r),r}return l[e]}function i(t,e,n){null!=aI.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,s.set(e,!0))}function r(t){null==t.name&&(t.name=t.coordDim)}Ru(t)||(t=Bu(t)),e=e||{};var o=e.coordDimensions||[],a=e.dimensionsDefine||t.dimensionsDefine||[],s=Y(),l=[],u=Vp(t,o,a,e.dimensionsCount),p=e.canOmitUnusedDimensions&&Bp(u),d=a===t.dimensionsDefine,f=d?zp(t):Rp(a),g=e.encodeDefine;!g&&e.encodeDefaulter&&(g=e.encodeDefaulter(t,u));for(var y=Y(g),m=new ak(u),_=0;__;_++)n(_);y.each(function(t,e){var r=dr(t).slice();if(1===r.length&&!C(r[0])&&r[0]<0)return void y.set(e,!1);var o=y.set(e,[]);v(r,function(t,r){var a=C(t)?f.get(t):t;null!=a&&u>a&&(o[r]=a,i(n(a),e,r)) +})});var x=0;v(o,function(t){var e,r,o,a;if(C(t))e=t,a={};else{a=t,e=a.name;var s=a.ordinalMeta;a.ordinalMeta=null,a=h({},a),a.ordinalMeta=s,r=a.dimsDef,o=a.otherDims,a.name=a.coordDim=a.coordDimIndex=a.dimsDef=a.otherDims=null}var l=y.get(e);if(l!==!1){if(l=dr(l),!l.length)for(var p=0;p<(r&&r.length||1);p++){for(;u>x&&null!=n(x).coordDim;)x++;u>x&&l.push(x++)}v(l,function(t,s){var l=n(t);if(d&&null!=a.type&&(l.type=a.type),i(c(l,a),e,s),null==l.name&&r){var u=r[s];!D(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}o&&c(l.otherDims,o)})}});var w=e.generateCoord,b=e.generateCoordCount,S=null!=b;b=w?b||1:0;var M=w||"value";if(p)v(l,function(t){r(t)}),l.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var T=0;u>T;T++){var I=n(T),k=I.coordDim;null==k&&(I.coordDim=Hp(M,s,S),I.coordDimIndex=0,(!w||0>=b)&&(I.isExtraCoord=!0),b--),r(I),null!=I.type||Ql(t,T)!==gI.Must&&(!I.isExtraCoord||null==I.otherDims.itemName&&null==I.otherDims.seriesName)||(I.type="ordinal")}return Fp(l),new XA({source:t,dimensions:l,fullDimensionCount:u,dimensionOmitted:p})}function Fp(t){for(var e=Y(),n=0;n0&&(i.name=r+(o-1)),o++,e.set(r,o)}}function Vp(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return v(e,function(t){var e;D(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))}),r}function Hp(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}function Wp(t){var e=t.get("coordinateSystem"),n=new tP(e),i=eP[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function Gp(t){return"category"===t.get("type")}function Zp(t,e,n){n=n||{};var i,r,o,a=n.byIndex,s=n.stackedCoordDimension;Xp(e)?i=e:(r=e.schema,i=r.dimensions,o=e.store);var l,u,h,c,p=!(!t||!t.get("stack"));if(v(i,function(t,e){C(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))}),!u||a||l||(a=!0),u){h="__\x00ecstackresult_"+t.id,c="__\x00ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;v(i,function(t){t.coordDim===d&&g++});var y={name:h,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(c,f),m.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(m)):(i.push(y),i.push(m))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function Xp(t){return!Lp(t.schema)}function Yp(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Up(t,e){return Yp(t,e)?t.getCalculationInfo("stackResultDimension"):e}function jp(t,e){var n,i=t.get("coordinateSystem"),r=OI.get(i);return e&&e.coordSysDims&&(n=y(e.coordSysDims,function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=Pp(r)}return n})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function qp(t,e,n){var i,r;return n&&v(t,function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)}),r||null==i||(t[i].otherDims.itemName=0),i}function Kp(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=Bu(t)):(i=r.getSource(),o=i.sourceFormat===sI);var a=Wp(e),s=jp(e,a),l=n.useEncodeDefaulter,u=T(l)?l:l?S(ql,s,e):null,h={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},c=Np(i,h),p=qp(c.dimensions,n.createInvertedIndices,a),d=o?null:r.getSharedDataStore(c),f=Zp(e,{schema:c,store:d}),g=new JA(c,e);g.setCalculationInfo(f);var v=null!=p&&$p(i)?function(t,e,n,i){return i===p?n:this.defaultDimValueGetter(t,e,n,i)}:null;return g.hasItemOption=!1,g.initData(o?i:d,null,v),g}function $p(t){if(t.sourceFormat===sI){var e=Qp(t.data||[]);return!M(gr(e))}}function Qp(t){for(var e=0;ea&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=id(a),l=r.niceTickExtent=[Zi(Math.ceil(t[0]/a)*a,s),Zi(Math.floor(t[1]/a)*a,s)];return od(l,t),r}function nd(t){var e=Math.pow(10,nr(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Zi(n*e)}function id(t){return Yi(t)+2}function rd(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function od(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),rd(t,0,e),rd(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ad(t,e){return t>=e[0]&&t<=e[1]}function sd(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function ld(t,e){return t*(e[1]-e[0])+e[0]}function ud(t){return M(t)?lP?new Float32Array(t):t:new uP(t)}function hd(t){return t.get("stack")||hP+t.seriesIndex}function cd(t){return t.dim+t.index}function pd(t,e){var n=[];return e.eachSeriesByType(t,function(t){_d(t)&&n.push(t)}),n}function dd(t){var e={};v(t,function(t){var n=t.coordinateSystem,i=n.getBaseAxis();if("time"===i.type||"value"===i.type)for(var r=t.getData(),o=i.dim+"_"+i.index,a=r.getDimensionIndex(r.mapDimension(i.dim)),s=r.getStore(),l=0,u=s.count();u>l;++l){var h=s.get(a,l);e[o]?e[o].push(h):e[o]=[h]}});var n={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort(function(t,e){return t-e});for(var o=null,a=1;a0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}function fd(t){var e=dd(t),n=[];return v(t,function(t){var i,r=t.coordinateSystem,o=r.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(a[1]-a[0]),h=o.scale.getExtent(),c=Math.abs(h[1]-h[0]);i=l?u/c*l:u}else{var p=t.getData();i=Math.abs(a[1]-a[0])/p.count()}var d=Gi(t.get("barWidth"),i),f=Gi(t.get("barMaxWidth"),i),g=Gi(t.get("barMinWidth")||(xd(t)?.5:1),i),v=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:g,barGap:v,barCategoryGap:y,axisKey:cd(o),stackId:hd(t)})}),gd(n)}function gd(t){var e={};v(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=r.stacks;e[n]=r;var a=t.stackId;o[a]||r.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[a].width&&(o[a].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(o[a].maxWidth=l);var u=t.barMinWidth;u&&(o[a].minWidth=u);var h=t.barGap;null!=h&&(r.gap=h);var c=t.barCategoryGap;null!=c&&(r.categoryGap=c)});var n={};return v(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=w(i).length;o=Math.max(35-4*a,15)+"%"}var s=Gi(o,r),l=Gi(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),v(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){var i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&i>e&&(i=Math.min(e,u)),n&&n>i&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}}),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;v(i,function(t){t.width||(t.width=c),p=t,d+=t.width*(1+l)}),p&&(d-=p.width*l);var f=-d/2;v(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)})}),n}function vd(t,e,n){if(t&&e){var i=t[cd(e)];return null!=i&&null!=n?i[hd(n)]:i}}function yd(t,e){var n=pd(t,e),i=fd(n);v(n,function(t){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),o=hd(t),a=i[cd(r)][o],s=a.offset,l=a.width;e.setLayout({bandWidth:a.bandWidth,offset:s,size:l})})}function md(t){return{seriesType:t,plan:Hh(),reset:function(t){if(_d(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),h=Yp(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=r.isHorizontal(),p=wd(i,r),d=xd(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),v=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=d&&ud(3*r),u=d&&s&&ud(3*r),m=d&&ud(r),_=n.master.getRect(),x=c?_.width:_.height,w=e.getStore(),b=0;null!=(i=t.next());){var S=w.get(h?g:o,i),M=w.get(a,i),T=p,C=void 0;h&&(C=+S-w.get(o,i));var I=void 0,k=void 0,D=void 0,A=void 0;if(c){var P=n.dataToPoint([S,M]);if(h){var O=n.dataToPoint([C,M]);T=O[0]}I=T,k=P[1]+y,D=P[0]-T,A=v,Math.abs(D)D?-1:1)*f)}else{var P=n.dataToPoint([M,S]);if(h){var O=n.dataToPoint([M,C]);T=O[1]}I=P[0]+y,k=T,D=v,A=P[1]-T,Math.abs(A)=A?-1:1)*f)}d?(l[b]=I,l[b+1]=k,l[b+2]=c?D:A,u&&(u[b]=c?_.x:I,u[b+1]=c?k:_.y,u[b+2]=x),m[i]=i):e.setItemLayout(i,{x:I,y:k,width:D,height:A}),b+=3}d&&e.setLayout({largePoints:l,largeDataIndices:m,largeBackgroundPoints:u,valueAxisHorizontal:c})}}}}}}function _d(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function xd(t){return t.pipelineContext&&t.pipelineContext.large}function wd(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function bd(t,e,n,i){var r=tr(e),o=tr(n),a=function(t){return gl(r,t,i)===gl(o,t,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},h=function(){return u()&&a("hour")},c=function(){return h()&&a("minute")},p=function(){return c()&&a("second")},d=function(){return p()&&a("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return p();case"millisecond":return d()}}function Sd(t){return t/=FC,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Md(t){var e=30*FC;return t/=e,t>6?6:t>3?3:t>2?2:1}function Td(t){return t/=NC,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function Cd(t,e){return t/=e?EC:BC,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Id(t){return ir(t,!0)}function kd(t,e,n){var i=new Date(t);switch(ul(e)){case"year":case"month":i[Ml(n)](0);case"day":i[Tl(n)](1);case"hour":i[Cl(n)](0);case"minute":i[Il(n)](0);case"second":i[kl(n)](0),i[Dl(n)](0)}return i.getTime()}function Dd(t,e,n,i){function r(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();n>u&&u<=i[1];)s.push({value:u}),h+=t,l[o](h),u=l.getTime();s.push({value:u,notAdd:!0})}function o(t,o,a){var s=[],l=!o.length;if(!bd(ul(t),i[0],i[1],n)){l&&(o=[{value:kd(new Date(i[0]),t,n)},{value:i[1]}]);for(var u=0;u1&&0===u&&a.unshift({value:a[0].value-p})}}for(var u=0;u=i[0]&&x<=i[1]&&c++)}var w=(i[1]-i[0])/e;if(c>1.5*w&&p>w/1.5)break;if(u.push(v),c>w||t===s[d])break}h=[]}}}for(var b=_(y(u,function(t){return _(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd})}),function(t){return t.length>0}),S=[],M=b.length-1,d=0;d0&&i>0||0>n&&0>i)}function Nd(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?function(e){return function(n,i){return t.scale.getFormattedLabel(n,i,e)}}(e):C(e)?function(e){return function(n){var i=t.scale.getLabel(n),r=e.replace("{value}",null!=i?i:"");return r}}(e):T(e)?function(e){return function(i,r){return null!=n&&(r=i.value-n),e(Fd(t,i),r,null!=i.level?{level:i.level}:null)}}(e):function(e){return t.scale.getLabel(e)}}function Fd(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Vd(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();n instanceof oP?r=n.count():(i=n.getTicks(),r=i.length);var a,s=t.getLabelModel(),l=Nd(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;r>h;h+=u){var c=i?i[h]:{value:o[0]+h},p=l(c,h),d=s.getTextRect(p),f=Hd(d,s.get("rotate")||0);a?a.union(f):a=f}return a}}function Hd(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n)),s=new kw(t.x,t.y,o,a);return s}function Wd(t){var e=t.get("interval");return null==e?"auto":e}function Gd(t){return"category"===t.type&&0===Wd(t.getLabelModel())}function Zd(t,e){var n={};return v(t.mapDimensionsAll(e),function(e){n[Up(t,e)]=!0}),w(n)}function Xd(t,e,n){e&&v(Zd(e,n),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function Yd(t){return Kp(null,t)}function Ud(t,e){var n=e;e instanceof CC||(n=new CC(e));var i=Bd(n);return i.setExtent(t[0],t[1]),zd(i,n),i}function jd(t){f(t,CP)}function qd(t,e){return e=e||{},Ys(t,null,null,"normal"!==e.state)}function Kd(t){return M(t)?void v(t,function(t){Kd(t)}):void(p(DP,t)>=0||(DP.push(t),T(t)&&(t={install:t}),t.install(AP)))}function $d(t,e){return Math.abs(t-e)s;s++){var l=t[s][0],u=t[s][1],h=o*u-l*a;e+=h,n+=(o+l)*h,i+=(a+u)*h,o=l,a=u}return e?[n/e/3,i/e/3,e]:[t[0][0]||0,t[0][1]||0]}function nf(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var i=e.features;return v(i,function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=of(r,i,n);break;case"Polygon":rf(r,i,n);break;case"MultiLineString":rf(r,i,n);break;case"MultiPolygon":v(r,function(t,e){return rf(t,i[e],n)})}}),e.UTF8Encoding=!1,e}function rf(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}function af(t,e){return t=nf(t),y(_(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new RP(o[0],o.slice(1)));break;case"MultiPolygon":v(i.coordinates,function(t){t[0]&&r.push(new RP(t[0],t.slice(1)))});break;case"LineString":r.push(new zP([i.coordinates]));break;case"MultiLineString":r.push(new zP(i.coordinates))}var a=new BP(n[e||"name"],r,n.cp);return a.properties=n,a})}function sf(t){return"category"===t.type?uf(t):pf(t)}function lf(t,e){return"category"===t.type?cf(t,e):{ticks:y(t.scale.getTicks(),function(t){return t.value})}}function uf(t){var e=t.getLabelModel(),n=hf(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function hf(t,e){var n=df(t,"labels"),i=Wd(e),r=ff(n,i);if(r)return r;var o,a;return T(i)?o=xf(t,i):(a="auto"===i?vf(t):i,o=_f(t,a)),gf(n,i,{labels:o,labelCategoryInterval:a})}function cf(t,e){var n=df(t,"ticks"),i=Wd(e),r=ff(n,i);if(r)return r;var o,a;if((!e.get("show")||t.scale.isBlank())&&(o=[]),T(i))o=xf(t,i,!0);else if("auto"===i){var s=hf(t,t.getLabelModel());a=s.labelCategoryInterval,o=y(s.labels,function(t){return t.tickValue})}else a=i,o=_f(t,a,!0);return gf(n,i,{ticks:o,tickCategoryInterval:a})}function pf(t){var e=t.scale.getTicks(),n=Nd(t);return{labels:y(e,function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}})}}function df(t,e){return WP(t)[e]||(WP(t)[e]=[])}function ff(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f=0,g=0,v=wi(n({value:l}),e.font,"center","top");f=1.3*v.width,g=1.3*v.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var y=p/h,m=d/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),x=WP(t.model),w=t.getExtent(),b=x.lastAutoInterval,S=x.lastTickCount;return null!=b&&null!=S&&Math.abs(b-_)<=1&&Math.abs(S-a)<=1&&b>_&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?_=b:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=w[0],x.axisExtent1=w[1]),_}function mf(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function _f(t,e,n){function i(t){var e={value:t};l.push(n?t:{formattedLabel:r(e),rawLabel:o.getLabel(e),tickValue:t})}var r=Nd(t),o=t.scale,a=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var p=Gd(t),d=s.get("showMinLabel")||p,f=s.get("showMaxLabel")||p;d&&h!==a[0]&&i(a[0]);for(var g=h;g<=a[1];g+=u)i(g);return f&&g-u!==a[1]&&i(a[1]),l}function xf(t,e,n){var i=t.scale,r=Nd(t),o=[];return v(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})}),o}function wf(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function bf(t,e,n,i){function r(t,e){return t=Zi(t),e=Zi(e),p?t>e:e>t}var o=e.length;if(t.onBand&&!n&&o){var a,s,l=t.getExtent();if(1===o)e[0].coord=l[0],a=e[1]={coord:l[0]};else{var u=e[o-1].tickValue-e[0].tickValue,h=(e[o-1].coord-e[0].coord)/u;v(e,function(t){t.coord-=h/2});var c=t.scale.getExtent();s=1+c[1]-e[o-1].tickValue,a={coord:e[o-1].coord+h*s},e.push(a)}var p=l[0]>l[1];r(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&r(l[0],e[0].coord)&&e.unshift({coord:l[0]}),r(l[1],a.coord)&&(i?a.coord=l[1]:e.pop()),i&&r(a.coord,l[1])&&e.push({coord:l[1]})}}function Sf(t){var e=tI.extend(t);return tI.registerClass(e),e}function Mf(t){var e=mk.extend(t);return mk.registerClass(e),e}function Tf(t){var e=yk.extend(t);return yk.registerClass(e),e}function Cf(t){var e=wk.extend(t);return wk.registerClass(e),e}function If(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function kf(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s);a/=u,s/=u;var h=a*n+t,c=s*n+e;if(Math.abs(i-r)%XP<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=So(r),r=So(p)}else i=So(i),r=So(r);i>r&&(r+=XP);var d=Math.atan2(s,a);if(0>d&&(d+=XP),d>=i&&r>=d||d+XP>=i&&r>=d+XP)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,v=n*Math.cos(r)+t,y=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(v-a)*(v-a)+(y-s)*(y-s);return _>m?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=v,l[1]=y,Math.sqrt(_))}function Df(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c);h/=p,c/=p;var d=l*h+u*c,f=d/p;s&&(f=Math.min(Math.max(f,0),1)),f*=p;var g=a[0]=t+f*h,v=a[1]=e+f*c;return Math.sqrt((g-r)*(g-r)+(v-o)*(v-o))}function Af(t,e,n,i,r,o,a){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),h=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}function Pf(t,e,n){var i=Af(e.x,e.y,e.width,e.height,t.x,t.y,jP);return n.set(jP[0],jP[1]),i}function Of(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d=d&&(s=i,l=r);var S=(c-v)*_/m+v;g=kf(v,y,_,x,x+w,b,S,p,jP),o=Math.cos(x+w)*m+v,a=Math.sin(x+w)*_+y;break;case YP.R:s=o=h[d++],l=a=h[d++];var M=h[d++],T=h[d++];g=Af(s,l,M,T,c,p,jP);break;case YP.Z:g=Df(o,a,s,l,c,p,jP,!0),o=s,a=l}u>g&&(u=g,n.set(jP[0],jP[1]))}return u}function Lf(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var r=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||UP,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,h=t.getComputedTransform(),c=h&&Ze([],h),p=e.get("length2")||0;u&&$P.copy(u);for(var d=0;dv&&(l=v,KP.transform(h),$P.transform(h),$P.toArray(o[0]),KP.toArray(o[1]),qP.toArray(o[2]))}Rf(o,e.get("minTurnAngle")),n.setShape({points:o})}}}function Rf(t,e){if(180>=e&&e>0){e=e/180*Math.PI,qP.fromArray(t[0]),KP.fromArray(t[1]),$P.fromArray(t[2]),_w.sub(QP,qP,KP),_w.sub(JP,$P,KP);var n=QP.len(),i=JP.len();if(!(.001>n||.001>i)){QP.scale(1/n),JP.scale(1/i);var r=QP.dot(JP),o=Math.cos(e);if(r>o){var a=Df(KP.x,KP.y,$P.x,$P.y,qP.x,qP.y,tO,!1);eO.fromArray(tO),eO.scaleAndAdd(JP,a/Math.tan(Math.PI-e));var s=$P.x!==KP.x?(eO.x-KP.x)/($P.x-KP.x):(eO.y-KP.y)/($P.y-KP.y);if(isNaN(s))return;0>s?_w.copy(eO,KP):s>1&&_w.copy(eO,$P),eO.toArray(t[1])}}}}function zf(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Bf(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=ew(i[0],i[1]),o=ew(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=ge([],i[1],i[0],a/r),l=ge([],i[1],i[2],a/o),u=ge([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;ht){var i=Math.min(e,-t);if(i>0){l(i*n,0,c);var r=i+t;0>r&&u(-r*n,1)}else u(-t*n,1)}}function l(n,i,r){0!==n&&(f=!0);for(var o=i;r>o;o++){var a=t[o],s=a.rect;s[e]+=n,a.label[e]+=n}}function u(i,r){for(var o=[],a=0,s=1;c>s;s++){var u=t[s-1].rect,h=Math.max(t[s].rect[e]-u[e]-u[n],0);o.push(h),a+=h}if(a){var p=Math.min(Math.abs(i)/a,r);if(i>0)for(var s=0;c-1>s;s++){var d=o[s]*p;l(d,0,s+1)}else for(var s=c-1;s>0;s--){var d=o[s-1]*p;l(-d,s,c)}}}function h(t){var e=0>t?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(c-1)),i=0;c-1>i;i++)if(e>0?l(n,0,i+1):l(-n,c-i-1,c),t-=n,0>=t)return}var c=t.length;if(!(2>c)){t.sort(function(t,n){return t.rect[e]-n.rect[e]});for(var p,d=0,f=!1,g=[],v=0,y=0;c>y;y++){var m=t[y],_=m.rect;p=_[e]-d,0>p&&(_[e]-=p,m.label[e]-=p,f=!0);var x=Math.max(-p,0);g.push(x),v+=x,d=_[e]+_[n]}v>0&&o&&l(-v/c,0,c);var w,b,S=t[0],M=t[c-1];return a(),0>w&&u(-w,.8),0>b&&u(b,.8),a(),s(w,b,1),s(b,w,-1),a(),0>w&&h(-w),0>b&&h(b),f}}function Hf(t,e,n,i){return Vf(t,"x","width",e,n,i)}function Wf(t,e,n,i){return Vf(t,"y","height",e,n,i)}function Gf(t){function e(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}var n=[];t.sort(function(t,e){return e.priority-t.priority});for(var i=new kw(0,0,0,0),r=0;r10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;C(r)?d=yO[r]:T(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,mO))}}}}}function tg(t,e,n,i,r){var o=t.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,h=n.get(["lineStyle","width"])||2;a-=h/2,s-=h/2,l+=h,u+=h,a=Math.floor(a),l=Math.round(l);var c=new DM({shape:{x:a,y:s,width:l,height:u}});if(e){var p=t.getBaseAxis(),d=p.isHorizontal(),f=p.inverse;d?(f&&(c.shape.x+=l),c.shape.width=0):(f||(c.shape.y+=u),c.shape.height=0);var g=T(r)?function(t){r(t,c)}:null;hs(c,{shape:{width:l,height:u,x:a,y:s}},n,null,i,g)}return c}function eg(t,e,n){var i=t.getArea(),r=Zi(i.r0,1),o=Zi(i.r,1),a=new PT({shape:{cx:Zi(t.cx,1),cy:Zi(t.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(e){var s="angle"===t.getBaseAxis().dim;s?a.shape.endAngle=i.startAngle:a.shape.r=r,hs(a,{shape:{endAngle:i.endAngle,r:o}},n)}return a}function ng(t,e,n,i,r){return t?"polar"===t.type?eg(t,e,n):"cartesian2d"===t.type?tg(t,e,n,i,r):null:null}function ig(t,e){return t.type===e}function rg(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=ju(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}function ag(t,e){e=e||{};var n=e.isRoundCap;return function(e,i,r){var o=i.position;if(!o||o instanceof Array)return Ci(e,i,r);var a=t(o),s=null!=i.distance?i.distance:5,l=this.shape,u=l.cx,h=l.cy,c=l.r,p=l.r0,d=(c+p)/2,f=l.startAngle,g=l.endAngle,v=(f+g)/2,y=n?Math.abs(c-p)/2:0,m=Math.cos,_=Math.sin,x=u+c*m(f),w=h+c*_(f),b="left",S="top";switch(a){case"startArc":x=u+(p-s)*m(v),w=h+(p-s)*_(v),b="center",S="top";break;case"insideStartArc":x=u+(p+s)*m(v),w=h+(p+s)*_(v),b="center",S="bottom";break;case"startAngle":x=u+d*m(f)+lg(f,s+y,!1),w=h+d*_(f)+ug(f,s+y,!1),b="right",S="middle"; +break;case"insideStartAngle":x=u+d*m(f)+lg(f,-s+y,!1),w=h+d*_(f)+ug(f,-s+y,!1),b="left",S="middle";break;case"middle":x=u+d*m(v),w=h+d*_(v),b="center",S="middle";break;case"endArc":x=u+(c+s)*m(v),w=h+(c+s)*_(v),b="center",S="bottom";break;case"insideEndArc":x=u+(c-s)*m(v),w=h+(c-s)*_(v),b="center",S="top";break;case"endAngle":x=u+d*m(g)+lg(g,s+y,!0),w=h+d*_(g)+ug(g,s+y,!0),b="left",S="middle";break;case"insideEndAngle":x=u+d*m(g)+lg(g,-s+y,!0),w=h+d*_(g)+ug(g,-s+y,!0),b="right",S="middle";break;default:return Ci(e,i,r)}return e=e||{},e.x=x,e.y=w,e.align=b,e.verticalAlign=S,e}}function sg(t,e,n,i){if(k(i))return void t.setTextConfig({rotation:i});if(M(e))return void t.setTextConfig({rotation:0});var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}function lg(t,e,n){return e*Math.sin(t)*(n?-1:1)}function ug(t,e,n){return e*Math.cos(t)*(n?1:-1)}function hg(t,e){var n=t.getArea&&t.getArea();if(ig(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}function cg(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();return n&&"category"===i.type&&"cartesian2d"===e.type?{baseAxis:i,otherAxis:e.getOtherAxis(i)}:void 0}function pg(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?us:hs)(n,{shape:l},e,r,null);var h=e?t.baseAxis.model:null;(a?us:hs)(n,{shape:u},h,r)}function dg(t,e){for(var n=0;n=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=Xs(i);Zs(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:rg(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=t.getTextContent();if(s&&p){var d=i.get(["label","position"]);t.textConfig.inside="middle"===d?!0:null,sg(t,"outside"===d?h:d,gg(a),i.get(["label","rotate"]))}Qs(p,c,o.getRawValue(n),function(t){return og(e,t)});var f=i.getModel(["emphasis"]);Ra(t,f.get("focus"),f.get("blurScope"),f.get("disabled")),Ba(t,i),fg(r)&&(t.style.fill="none",t.style.stroke="none",v(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}function yg(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=t.get(["itemStyle","borderWidth"])||0,r=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,r,o)}function mg(t,e,n,i){var r=t.getData(),o=r.getLayout("valueAxisHorizontal")?1:0,a=r.getLayout("largeDataIndices"),s=r.getLayout("size"),l=t.getModel("backgroundStyle"),u=r.getLayout("largeBackgroundPoints");if(u){var h=new LO({shape:{points:u},incremental:!!i,silent:!0,z2:0});h.baseDimIdx=o,h.largeDataIndices=a,h.barWidth=s,h.useStyle(l.getItemStyle()),e.add(h),n&&n.push(h)}var c=new LO({shape:{points:r.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,e.add(c),c.useStyle(r.getVisual("style")),EM(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",RO),c.on("mousemove",RO)),n&&n.push(c)}function _g(t,e,n){for(var i=t.baseDimIdx,r=1-i,o=t.shape.points,a=t.largeDataIndices,s=[],l=[],u=t.barWidth,h=0,c=o.length/3;c>h;h++){var p=3*h;if(l[i]=u,l[r]=o[p+2],s[i]=o[p+i],s[r]=o[p+r],l[r]<0&&(s[r]+=l[r],l[r]=-l[r]),e>=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}function xg(t,e,n){if(ig(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var r=n.getArea(),o=e;return{cx:r.cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}function wg(t,e,n){var i="polar"===t.type?PT:DM;return new i({shape:xg(e,n,t),silent:!0,z2:0})}function bg(t){t.registerChartView(TO),t.registerSeriesModel(xO),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,S(yd,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,md("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Jf("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)})})}function Sg(t,e){this.parent.drift(t,e)}function Mg(t,e,n,i){return!(!e||isNaN(e[0])||isNaN(e[1])||i.isIgnore&&i.isIgnore(n)||i.clipShape&&!i.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(n,"symbol"))}function Tg(t){return null==t||D(t)||(t={isIgnore:t}),t||{}}function Cg(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Xs(e),cursorStyle:e.get("cursor")}}function Ig(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=kg(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=y(t.dimensions,function(t){return e.mapDimension(t)}),p=!1,d=e.getCalculationInfo("stackResultDimension");return Yp(e,c[0])&&(p=!0,c[0]=d),Yp(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function kg(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:k(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function Dg(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}function Ag(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function Pg(t,e,n,i,r,o,a){for(var s=Ag(t,e),l=[],u=[],h=[],c=[],p=[],d=[],f=[],g=Ig(r,e,a),v=t.getLayout("points")||[],y=e.getLayout("points")||[],m=0;mv;v++){var y=e[2*g],m=e[2*g+1];if(g>=r||0>g)break;if(Og(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),c=y,p=m;else{var _=y-u,x=m-h;if(.5>_*_+x*x){g+=o;continue}if(a>0){for(var w=g+o,b=e[2*w],S=e[2*w+1];b===y&&S===m&&i>v;)v++,w+=o,g+=o,b=e[2*w],S=e[2*w+1],y=e[2*g],m=e[2*g+1],_=y-u,x=m-h;var M=v+1;if(l)for(;Og(b,S)&&i>M;)M++,w+=o,b=e[2*w],S=e[2*w+1];var T=.5,C=0,I=0,k=void 0,D=void 0;if(M>=i||Og(b,S))d=y,f=m;else{C=b-u,I=S-h;var A=y-u,P=b-y,O=m-h,L=S-m,R=void 0,z=void 0;if("x"===s){R=Math.abs(A),z=Math.abs(P);var B=C>0?1:-1;d=y-B*R*a,f=m,k=y+B*z*a,D=m}else if("y"===s){R=Math.abs(O),z=Math.abs(L);var E=I>0?1:-1;d=y,f=m-E*R*a,k=y,D=m+E*z*a}else R=Math.sqrt(A*A+O*O),z=Math.sqrt(P*P+L*L),T=z/(z+R),d=y-C*a*(1-T),f=m-I*a*(1-T),k=y+C*a*T,D=m+I*a*T,k=NO(k,FO(b,y)),D=NO(D,FO(S,m)),k=FO(k,NO(b,y)),D=FO(D,NO(S,m)),C=k-y,I=D-m,d=y-C*R/z,f=m-I*R/z,d=NO(d,FO(u,y)),f=NO(f,FO(h,m)),d=FO(d,NO(u,y)),f=FO(f,NO(h,m)),C=y-d,I=m-f,k=y+C*z/R,D=m+I*z/R}t.bezierCurveTo(c,p,d,f,y,m),c=k,p=D}else t.lineTo(y,m)}u=y,h=m,g+=o}return v}function Rg(t,e){if(t.length===e.length){for(var n=0;no;o++){var a=Dg(n,t,e,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}function Fg(t,e,n,i){var r=e.getBaseAxis(),o="x"===r.dim||"radius"===r.dim?0:1,a=[],s=0,l=[],u=[],h=[],c=[];if(i){for(s=0;ss;s++){var l=t[s],u=l.coord;if(0>u)i=l;else{if(u>e){r?o.push(n(r,l,e)):i&&o.push(n(i,l,0),n(i,l,e));break}i&&(o.push(n(i,l,0)),i=null),o.push(l),r=l}}return o}function Hg(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var r,o,a=i.length-1;a>=0;a--){var s=t.getDimensionInfo(i[a].dimension);if(r=s&&s.coordDim,"x"===r||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=y(o.stops,function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}}),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=Vg(u,"x"===r?n.getWidth():n.getHeight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=10,g=p[0].coord-f,m=p[d-1].coord+f,_=m-g;if(.001>_)return"transparent";v(p,function(t){t.offset=(t.coord-g)/_}),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var x=new jT(0,0,0,0,p,!0);return x[r]=g,x[r+"2"]=m,x}}}function Wg(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!Gg(o,e))){var a=e.mapDimension(o.dim),s={};return v(o.getViewLabels(),function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Gg(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;r>a;a+=o)if(1.5*BO.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}function Zg(t,e){return isNaN(t)||isNaN(e)}function Xg(t){for(var e=t.length/2;e>0&&Zg(t[2*e-2],t[2*e-1]);e--);return e-1}function Yg(t,e){return[t[2*e],t[2*e+1]]}function Ug(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;o>u;u++)if(r=t[2*u+a],!isNaN(r)&&!isNaN(t[2*u+1-a]))if(0!==u){if(e>=i&&r>=e||i>=e&&e>=r){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}function jg(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;eu[0]&&isFinite(g)&&isFinite(u[0]);)f=nd(f),g=u[1]-f*a;else{var y=t.getTicks().length-1;y>a&&(f=nd(f));var m=f*a;v=Math.ceil(u[1]/f)*f,g=Zi(v-m),0>g&&u[0]>=0?(g=0,v=Zi(m)):v>0&&u[1]<=0&&(v=0,g=-Zi(m))}var _=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*_,v+f*x),i.setInterval.call(t,f),(_||x)&&i.setNiceExtent.call(t,g+f,v-f)}function av(t,e){return t.getCoordSysModel()===e}function sv(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],s=n.model,l=s.get(["axisLine","onZero"]),u=s.get(["axisLine","onZeroAxisIndex"]);if(l){if(null!=u)lv(a[u])&&(o=a[u]);else for(var h in a)if(a.hasOwnProperty(h)&&lv(a[h])&&!i[r(a[h])]){o=a[h];break}o&&(i[r(o)]=!0)}}function lv(t){return t&&"category"!==t.type&&"time"!==t.type&&Ed(t)}function uv(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function hv(t,e,n,i){var r,o,a=Qi(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Ji(a-aL/2)?(o=l?"bottom":"top",r="center"):Ji(a-1.5*aL)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*aL>a&&a>aL/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function cv(t,e,n){if(!Gd(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]);e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],p=n[n.length-2];i===!1?(pv(o),pv(u)):dv(o,a)&&(i?(pv(a),pv(h)):(pv(o),pv(u))),r===!1?(pv(s),pv(c)):dv(l,s)&&(r?(pv(l),pv(p)):(pv(s),pv(c)))}}function pv(t){t&&(t.ignore=!0)}function dv(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Ne([]);return We(r,r,-t.rotation),n.applyTransform(Ve([],r,t.getLocalTransform())),i.applyTransform(Ve([],r,e.getLocalTransform())),n.intersect(i)}}function fv(t){return"middle"===t||"center"===t}function gv(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function Tv(t){var e=Cv(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=kv(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0?2:0),TL(t,function(n,i){"inherit"===t[i]&&(t[i]=e[i])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?Uc(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]),"inherit"===u.stroke&&(u.stroke=i[h]),"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity),s(u,i);var p=e.getModel("lineStyle"),d=p.getLineStyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=p.get("inactiveColor"),d.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Ev(t){var e=t.icon||"roundRect",n=fc(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function Nv(t,e,n,i){Hv(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),Vv(t,e,n,i)}function Fv(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;r>i&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function Vv(t,e,n,i){Fv(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Hv(t,e,n,i){Fv(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function Wv(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;na||M(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,p=u.dim,d="x"===c||"radius"===c?1:0,f=o.mapDimension(p),g=[];g[d]=o.get(f,a),g[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(g)||[]}else i=l.dataToPoint(o.getValues(y(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),i=[v.x+v.width/2,v.y+v.height/2]}return{point:i,el:s}}function my(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||jx(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ky(r)&&(r=yy({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=ky(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||ky(r),p={},d={},f={list:[],map:{}},g={showPointer:S(wy,d),showTooltip:S(by,f)};v(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);v(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=Cy(u,t);if(!c&&n&&(!u||i)){var o=i&&i.value;null!=o||l||(o=e.pointToData(r)),null!=o&&_y(t,o,g,!1,p)}})});var y={};return v(h,function(t,e){var n=t.linkGroup;n&&!d[e]&&v(n.axesInfo,function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,Iy(e),Iy(t)))),y[t.key]=o}})}),v(y,function(t,e){_y(h[e],t,g,!0,p)}),Sy(d,h,p),My(f,r,t,a),Ty(h,a,n),p}}function _y(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var a=xy(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&h(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}}function xy(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return v(e.seriesModels,function(e){var l,u,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,n);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var p=t-l,d=Math.abs(p);a>=d&&((a>d||p>=0&&0>s)&&(a=d,s=p,r=l,o.length=0),v(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function wy(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function by(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Dv(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function Sy(t,e,n){var i=n.axesInfo=[];v(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function My(t,e,n,i){if(ky(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Ty(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=GL(i)[r]||{},a=GL(i)[r]={};v(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&v(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];v(o,function(t,e){!a[e]&&l.push(t)}),v(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Cy(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Iy(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function ky(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Dy(t){hL.registerAxisPointerClass("CartesianAxisPointer",EL),t.registerComponentModel(FL),t.registerComponentView(WL),t.registerPreprocessor(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!M(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=_v(t,e)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},my)}function Ay(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function Py(t){if(Cx.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;i>n;n++)if(t[n]in e)return t[n]}function Oy(t,e){if(!t)return e;e=Ol(e,!0);var n=t.indexOf(e);return t=-1===n?e:"-"+t.slice(0,n)+"-"+e,t.toLowerCase()}function Ly(t,e){var n=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return n?e?n[e]:n:null}function Ry(t){return t="left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function zy(t,e,n){if(!C(n)||"inside"===n)return"";var i=t.get("backgroundColor"),r=t.get("borderWidth");e=Nl(e);var o,a=Ry(n),s=Math.max(1.5*Math.round(r),6),l="",u=jL+":";p(["left","right"],a)>-1?(l+="top:50%",u+="translateY(-50%) rotate("+(o="left"===a?-225:-45)+"deg)"):(l+="left:50%",u+="translateX(-50%) rotate("+(o="top"===a?225:45)+"deg)");var h=o*Math.PI/180,c=s+r,d=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),f=Math.round(100*((d-Math.SQRT2*r)/2+Math.SQRT2*r-(d-c)/2))/100;l+=";"+a+":-"+f+"px";var g=e+" solid "+r+"px;",v=["position:absolute;width:"+s+"px;height:"+s+"px;",l+";"+u+";","border-bottom:"+g,"border-right:"+g,"background-color:"+i+";"];return'
'}function By(t,e){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+t/2+"s "+n,r="opacity"+i+",visibility"+i;return e||(i=" "+t+"s "+n,r+=Cx.transformSupported?","+jL+i:",left"+i+",top"+i),UL+":"+r}function Ey(t,e,n){var i=t.toFixed(0)+"px",r=e.toFixed(0)+"px";if(!Cx.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=Cx.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+jL+":"+a+";":[["top",0],["left",0],[XL,a]]}function Ny(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var r=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return r&&o&&e.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),v(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function Fy(t,e,n){var i=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),u=t.get("shadowOffsetY"),h=t.getModel("textStyle"),c=Dh(t,"html"),p=l+"px "+u+"px "+a+"px "+s;return i.push("box-shadow:"+p),e&&r&&i.push(By(r,n)),o&&i.push("background-color:"+o),v(["width","color","radius"],function(e){var n="border-"+e,r=Ol(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))}),i.push(Ny(h)),null!=c&&i.push("padding:"+YC(c).join("px ")+"px"),i.join(";")+";"}function Vy(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&we(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function Hy(t){return Math.max(0,t)}function Wy(t){var e=Hy(t.shadowBlur||0),n=Hy(t.shadowOffsetX||0),i=Hy(t.shadowOffsetY||0);return{left:Hy(e-n),right:Hy(e+n),top:Hy(e-i),bottom:Hy(e+i)}}function Gy(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function Zy(t,e,n){var i,r=e.ecModel;n?(i=new CC(n,r,r),i=new CC(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof CC&&(a=a.get("tooltip",!0)),C(a)&&(a={formatter:a}),a&&(i=new CC(a,i,r)))}return i}function Xy(t,e){return t.dispatchAction||jx(e.dispatchAction,e)}function Yy(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function Uy(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function jy(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}function qy(t){return"center"===t||"middle"===t}function Ky(t,e,n){var i=zr(t).queryOptionMap,r=i.keys()[0];if(r&&"series"!==r){var o=Br(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s,l=n.getViewOfComponentModel(a);return l.group.traverse(function(e){var n=EM(e).tooltipConfig;return n&&n.name===t.name?(s=e,!0):void 0}),s?{componentMainType:r,componentIndex:a.componentIndex,el:s}:void 0}}}function $y(t){Kd(Dy),t.registerComponentModel(ZL),t.registerComponentView(JL),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},$),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},$)}function Qy(t){var e=t.get("coordinateSystem");return p(eR,e)>=0}function Jy(t){return t+"Axis"}function tm(t,e){function n(t){!l.get(t.uid)&&r(t)&&(i(t),u=!0)}function i(t){l.set(t.uid,!0),s.push(t),o(t)}function r(t){var e=!1;return t.eachTargetAxis(function(t,n){var i=a.get(t);i&&i[n]&&(e=!0)}),e}function o(t){t.eachTargetAxis(function(t,e){(a.get(t)||a.set(t,[]))[e]=!0})}var a=Y(),s=[],l=Y();t.eachComponent({mainType:"dataZoom",query:e},function(t){l.get(t.uid)||i(t)});var u;do u=!1,t.eachComponent("dataZoom",n);while(u);return s}function em(t){var e=t.ecModel,n={infoList:[],infoMap:Y()};return t.eachTargetAxis(function(t,i){var r=e.getComponent(Jy(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}function nm(t){var e={};return v(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}function im(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=om(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=om(s,[0,a]),r=o=om(s,[r,o]),i=0}e[0]=om(e[0],n),e[1]=om(e[1],n);var l=rm(e,i);e[i]+=t;var u=r||0,h=n.slice();l.sign<0?h[0]+=u:h[1]-=u,e[i]=om(e[i],h);var c;return c=rm(e,i),null!=r&&(c.sign!==l.sign||c.spano&&(e[1-i]=e[i]+c.sign*o),e}function rm(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:0>n?1:e?-1:1}}function om(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function am(t,e,n){var i=um(t);i[e]=n}function sm(t,e,n){var i=um(t),r=i[e];r===n&&(i[e]=null)}function lm(t,e){return!!um(t)[e]}function um(t){return t[aR]||(t[aR]={})}function hm(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(gw(i.event),cm(t,e,n,i,r))}function cm(t,e,n,i,r){r.isAvailableBehavior=jx(pm,null,n,i),t.trigger(e,r)}function pm(t,e,n){var i=n[t];return!t||i&&(!C(i)||e.event[i+"Key"])}function dm(t,e,n){lR(t).coordSysRecordMap.each(function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)})}function fm(t,e){for(var n=lR(t).coordSysRecordMap,i=n.keys(),r=0;ri[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function xm(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=lR(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=Y());i.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(t){var n=em(t);v(n.infoList,function(n){var r=n.model.uid,o=i.get(r)||i.set(r,vm(e,n.model)),a=o.dataZoomInfoMap||(o.dataZoomInfoMap=Y());a.set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})})}),i.each(function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(!e)return void gm(i,t);var a=_m(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Uh(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")})})}function wm(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return im(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function bm(t,e,n){var i=[1/0,-1/0];pR(n,function(t){Xd(i,t.getData(),e)});var r=t.getAxisModel(),o=Pd(r.axis.scale,r,i).calculate();return[o.min,o.max]}function Sm(t){t.registerAction("dataZoom",function(t,e){var n=tm(e,t);v(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}function Mm(t){vR||(vR=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,gR),Sm(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Tm(t){Mm(t),t.registerComponentModel(rR),t.registerComponentView(uR),xm(t)}function Cm(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Im(t){return"vertical"===t?"ns-resize":"ew-resize"}function km(t){t.registerComponentModel(yR),t.registerComponentView(kR),Mm(t)}function Dm(){Kd(Tm),Kd(km)}function Am(t){t.registerComponentModel(DR),t.registerComponentView(AR),Mm(t)}function Pm(t,e){OR[t]=e}function Om(t){return OR[t]}function Lm(t){return 0===t.indexOf("my")}function Rm(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function zm(t){var e=[];return v(t,function(t){var n=t.categoryAxis,i=t.valueAxis,r=i.dim,o=[" "].concat(y(t.series,function(t){return t.name})),a=[n.model.getCategories()];v(t.series,function(t){var e=t.getRawData();a.push(t.getRawData().mapArray(e.mapDimension(r),function(t){return t}))});for(var s=[o.join(HR)],l=0;la;a++)i[a]=arguments[a];n.push((o?o+HR:"")+i.join(HR))}),n.join("\n")}).join("\n\n"+VR+"\n\n")}function Em(t){var e=Rm(t);return{value:_([zm(e.seriesGroupByCategoryAxis),Bm(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+VR+"\n\n"),meta:e.meta}}function Nm(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Fm(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(HR)>=0?!0:void 0}function Vm(t){for(var e=t.split(/\n+/g),n=Nm(e.shift()).split(WR),i=[],r=y(n,function(t){return{name:t,data:[]}}),o=0;o=0;r--){var o=n[r];if(o[i])break}if(0>r){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(a){var s=a.getPercentRange();n[0][i]={dataZoomId:i,start:s[0],end:s[1]}}}}),n.push(e)}function Xm(t){var e=jm(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return ZR(n,function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}}),i}function Ym(t){XR(t).snapshots=null}function Um(t){return jm(t).length}function jm(t){var e=XR(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}function qm(t,e){var n=sz[e.brushType].createCover(t,e);return n.__brushOption=e,Qm(n,e),t.group.add(n),n}function Km(t,e){var n=t_(e);return n.endCreating&&(n.endCreating(t,e),Qm(e,e.__brushOption)),e}function $m(t,e){var n=e.__brushOption;t_(e).updateCoverShape(t,e,n.range,n)}function Qm(t,e){var n=e.z;null==n&&(n=$R),t.traverse(function(t){t.z=n,t.z2=n})}function Jm(t,e){t_(e).updateCommon(t,e),$m(t,e)}function t_(t){return sz[t.__brushOption.brushType]}function e_(t,e,n){var i=t._panels;if(!i)return UR;var r,o=t._transform;return v(i,function(t){t.isTargetByCursor(e,n,o)&&(r=t)}),r}function n_(t,e){var n=t._panels;if(!n)return UR;var i=e.__brushOption.panelId;return null!=i?n[i]:UR}function i_(t){var e=t._covers,n=e.length;return v(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function r_(t,e){var n=y(t._covers,function(t){var e=t.__brushOption,n=s(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function o_(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1],a=KR(r*r+o*o,.5);return a>QR}function a_(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function s_(t,e,n,i){var r=new tS;return r.add(new DM({name:"main",style:c_(n),silent:!0,draggable:!0,cursor:"move",drift:S(v_,t,e,r,["n","s","w","e"]),ondragend:S(r_,e,{isEnd:!0})})),v(i,function(n){r.add(new DM({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:S(v_,t,e,r,n),ondragend:S(r_,e,{isEnd:!0})}))}),r}function l_(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=qR(r,JR),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],p=h-o+r/2,d=c-o+r/2,f=h-a,g=c-s,v=f+r,y=g+r;h_(t,e,"main",a,s,f,g),i.transformable&&(h_(t,e,"w",l,u,o,y),h_(t,e,"e",p,u,o,y),h_(t,e,"n",l,u,v,o),h_(t,e,"s",l,d,v,o),h_(t,e,"nw",l,u,o,o),h_(t,e,"ne",p,u,o,o),h_(t,e,"sw",l,d,o,o),h_(t,e,"se",p,d,o,o))}function u_(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(c_(n)),r.attr({silent:!i,cursor:i?"move":"default"}),v([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var r=e.childOfName(n.join("")),o=1===n.length?f_(t,n[0]):g_(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?nz[o]+"-resize":null})})}function h_(t,e,n,i,r,o,a){var s=e.childOfName(n);s&&s.setShape(x_(__(t,e,[[i,r],[i+o,r+a]])))}function c_(t){return c({strokeNoScale:!0},t.brushStyle)}function p_(t,e,n,i){var r=[jR(t,n),jR(e,i)],o=[qR(t,n),qR(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function d_(t){return Cs(t.group)}function f_(t,e){var n={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=ks(n[e],d_(t));return i[r]}function g_(t,e){var n=[f_(t,e[0]),f_(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}function v_(t,e,n,i,r,o){var a=n.__brushOption,s=t.toRectRange(a.range),l=m_(e,r,o);v(i,function(t){var e=ez[t];s[e[0]][e[1]]+=l[e[0]]}),a.range=t.fromRectRange(p_(s[0][0],s[1][0],s[0][1],s[1][1])),Jm(e,n),r_(e,{isEnd:!1})}function y_(t,e,n,i){var r=e.__brushOption.range,o=m_(t,n,i);v(r,function(t){t[0]+=o[0],t[1]+=o[1]}),Jm(t,e),r_(t,{isEnd:!1})}function m_(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function __(t,e,n){var i=n_(t,e);return i&&i!==UR?i.clipPath(n,t._transform):s(n)}function x_(t){var e=jR(t[0][0],t[1][0]),n=jR(t[0][1],t[1][1]),i=qR(t[0][0],t[1][0]),r=qR(t[0][1],t[1][1]);return{x:e,y:n,width:i-e,height:r-n}}function w_(t,e,n){if(t._brushType&&!I_(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=e_(t,e,n);if(!t._dragging)for(var a=0;ae||e>i.getWidth()||0>n||n>i.getHeight()}function k_(t){return{createCover:function(e,n){return s_({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=a_(e),i=jR(n[0][t],n[1][t]),r=qR(n[0][t],n[1][t]);return[i,r]},updateCoverShape:function(e,n,i,r){var o,a=n_(e,n);if(a!==UR&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,o];t&&l.reverse(),l_(e,n,l,r)},updateCommon:u_,contain:S_}}function D_(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!lz.hasOwnProperty(i.mainType)&&r&&r.model!==n}function A_(t){return t=L_(t),function(e){return Os(e,t)}}function P_(t,e){return t=L_(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function O_(t,e,n){var i=L_(t);return function(t,r){return i.contain(r[0],r[1])&&!D_(t,e,n)}}function L_(t){return kw.create(t)}function R_(t){return t[0]>t[1]&&t.reverse(),t}function z_(t,e){return Rr(t,e,{includeMainTypes:uz})}function B_(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=R_(y([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[0/0,0/0],{values:o,xyMinMax:a}}function E_(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function N_(t,e){var n=F_(t),i=F_(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function F_(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function V_(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}function H_(t,e){t.setIconStatus("back",Um(e)>1?"emphasis":"normal")}function W_(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key?i.dataZoomSelectActive:!1),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new hz(V_(t),e,{include:["grid"]}),s=a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(s).enableBrush(o&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}function G_(t){t.registerComponentModel(LR),t.registerComponentView(RR),Pm("saveAsImage",zR),Pm("magicType",NR),Pm("dataView",GR),Pm("dataZoom",mz),Pm("restore",YR),Kd(Am)}function Z_(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}function X_(t,e){var n;return v(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}function Y_(t,e,n){var i=h({},n),r=t[e],o=n.$action||"merge";"merge"===o?r?(l(r,i,!0),Zl(r,i,{ignoreSize:!0}),Yl(n,r),U_(n,r),U_(n,r,"shape"),U_(n,r,"style"),U_(n,r,"extra"),n.clipPath=r.clipPath):t[e]=i:"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}function U_(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?xz:wz,r=0;r0&&(a.during=s?jx(ax,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),h(a,n[o]),a}function J_(t,e,n,i){i=i||{};var r=i.dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Cz(t),u=e.style;l.userDuring=e.during;var c={},p={};if(hx(t,e,p),lx("shape",e,p),lx("extra",e,p),!o&&s&&(ux(t,e,c),sx("shape",t,e,c),sx("extra",t,e,c),cx(t,e,u,c)),p.style=u,ix(t,p,a),ox(t,e),s)if(o){var d={};v(Tz,function(t){var n=t?e[t]:e;n&&n.enterFrom&&(t&&(d[t]=d[t]||{}),h(t?d[t]:d,n.enterFrom))});var f=Q_("enter",t,e,n,r);f.duration>0&&t.animateFrom(d,f)}else rx(t,e,r||0,n,c);tx(t,e),u?t.dirty():t.markRedraw()}function tx(t,e){for(var n=Cz(t).leaveToProps,i=0;i0&&t.animateFrom(r,o)}}function ox(t,e){K(e,"silent")&&(t.silent=e.silent),K(e,"ignore")&&(t.ignore=e.ignore),t instanceof RS&&K(e,"invisible")&&(t.invisible=e.invisible),t instanceof xM&&K(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}function ax(){var t=this,e=t.el;if(e){var n=Cz(e).userDuring,i=t.userDuring;if(n!==i)return void(t.el=t.userDuring=null);Iz.el=e,i(kz)}}function sx(t,e,n,i){var r=n[t];if(r){var o,a=e[t];if(a){var s=n.transition,l=r.transition;if(l)if(!o&&(o=i[t]={}),nx(l))h(o,a);else for(var u=dr(l),c=0;c=0){!o&&(o=i[t]={});for(var g=w(a),c=0;c=0)){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!r&&(r=i.style={});for(var g=w(n),u=0;u=0)s=a*n.length;else for(var l=0;lr;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;ns;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],n=1;nl;l++){var u=i[l];if(!r||!r.filter||null==u.query||r.filter(t,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,o-1))}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t}(),sw=Math.log(2),lw="___zrEVENTSAVED",uw=[],hw=/([&<>"'])/g,cw={"&":"&","<":"<",">":">",'"':""","'":"'"},pw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,dw=[],fw=Cx.browser.firefox&&+Cx.browser.version.split(".")[0]<39,gw=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},vw=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;a>o;o++){var s=i[o],l=Ie(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},t.prototype._recognize=function(t){for(var e in yw)if(yw.hasOwnProperty(e)){var n=yw[e](this._track,t);if(n)return n}},t}(),yw={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=ze(i)/ze(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=Be(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},mw=(Object.freeze||Object)({create:Ee,identity:Ne,copy:Fe,mul:Ve,translate:He,rotate:We,scale:Ge,invert:Ze,clone:Xe}),_w=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),xw=Math.min,ww=Math.max,bw=new _w,Sw=new _w,Mw=new _w,Tw=new _w,Cw=new _w,Iw=new _w,kw=function(){function t(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=xw(t.x,this.x),n=xw(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?ww(t.x+t.width,this.x+this.width)-e:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?ww(t.y+t.height,this.y+this.height)-n:t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=Ee();return He(r,r,[-e.x,-e.y]),Ge(r,r,[n,i]),He(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(l>o||r>u||h>s||a>c);if(n){var d=1/0,f=0,g=Math.abs(o-l),v=Math.abs(u-r),y=Math.abs(s-h),m=Math.abs(c-a),_=Math.min(g,v),x=Math.min(y,m);l>o||r>u?_>f&&(f=_,v>g?_w.set(Iw,-g,0):_w.set(Iw,v,0)):d>_&&(d=_,v>g?_w.set(Cw,g,0):_w.set(Cw,-v,0)),h>s||a>c?x>f&&(f=x,m>y?_w.set(Iw,0,-y):_w.set(Iw,0,m)):d>_&&(d=_,m>y?_w.set(Cw,0,y):_w.set(Cw,0,-m))}return n&&_w.copy(n,p?Cw:Iw),p},t.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(!i)return void(e!==n&&t.copy(e,n));if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}bw.x=Mw.x=n.x,bw.y=Tw.y=n.y,Sw.x=Tw.x=n.x+n.width,Sw.y=Mw.y=n.y+n.height,bw.transform(i),Tw.transform(i),Sw.transform(i),Mw.transform(i),e.x=xw(bw.x,Sw.x,Mw.x,Tw.x),e.y=xw(bw.y,Sw.y,Mw.y,Tw.y);var l=ww(bw.x,Sw.x,Mw.x,Tw.x),u=ww(bw.y,Sw.y,Mw.y,Tw.y);e.width=l-e.x,e.height=u-e.y},t}(),Dw="silent",Aw=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return e(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(aw),Pw=function(){function t(t,e){this.x=t,this.y=e}return t}(),Ow=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Lw=new kw(0,0,0,0),Rw=function(t){function n(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new Pw(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new Aw,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new ow(a),a}return e(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(v(Ow,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=Ke(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(r=this.findHover(r.x,r.y),o=r.target);var a=this._hovered=i?new Pw(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new Pw(0,0)},n.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},n.prototype.dispatchToElement=function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,o=Ye(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},n.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new Pw(t,e);if(qe(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new kw(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(Lw.copy(h.getBoundingRect()),h.transform&&Lw.applyTransform(h.transform),Lw.intersect(l)&&o.push(h))}if(o.length)for(var c=4,p=Math.PI/12,d=2*Math.PI,f=0;s>f;f+=c)for(var g=0;d>g;g+=p){var v=t+f*Math.cos(g),y=e+f*Math.sin(g);if(qe(o,r,v,y,n),r.target)return r}}return r},n.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new vw);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new Pw;o.target=i.target,this.dispatchToElement(o,r,i.event)}},n}(aw);v(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Rw.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=Ke(this,r,o);if("mouseup"===t&&a||(n=this.findHover(r,o),i=n.target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||ew(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});var zw,Bw=32,Ew=7,Nw=1,Fw=2,Vw=4,Hw=!1,Ww=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=sn}return t.prototype.traverse=function(t,e){for(var n=0;ni;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,on(n,sn)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s0&&(u.__clipPaths=[]),isNaN(u.z)&&(an(),u.z=0),isNaN(u.z2)&&(an(),u.z2=0),isNaN(u.zlevel)&&(an(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;n>e;e++)this.delRoot(t[e]);else{var i=p(this._roots,t);i>=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();zw=Cx.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var Gw=zw,Zw={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Zw.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*Zw.bounceIn(2*t):.5*Zw.bounceOut(2*t-1)+.5}},Xw=Math.pow,Yw=Math.sqrt,Uw=1e-8,jw=1e-4,qw=Yw(3),Kw=1/3,$w=Q(),Qw=Q(),Jw=Q(),tb=/cubic-bezier\(([0-9,\.e ]+)\)/,eb=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||$,this.ondestroy=t.ondestroy||$,this.onrestart=t.onrestart||$,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused)return void(this._pausedTime+=e);var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;0>r&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=T(t)?t:Zw[t]||Mn(t)},t}(),nb=function(){function t(t){this.value=t}return t}(),ib=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new nb(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),rb=function(){function t(t){this._list=new ib,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new nb(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),ob={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},ab=new rb(20),sb=null,lb=Vn,ub=Hn,hb=(Object.freeze||Object)({parse:zn,lift:Nn,toHex:Fn,fastLerp:Vn,fastMapToColor:lb,lerp:Hn,mapToColor:ub,modifyHSL:Wn,modifyAlpha:Gn,stringify:Zn,lum:Xn,random:Yn}),cb=(function(){return Cx.hasGlobalWindow&&T(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(){return null}}(),Array.prototype.slice),pb=0,db=1,fb=2,gb=3,vb=4,yb=5,mb=6,_b=[0,0,0,0],xb=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=mb,s=e;if(g(e)){var l=ri(e);a=l,(1===l&&!k(e[0])||2===l&&!k(e[0][0]))&&(o=!0)}else if(k(e)&&!B(e))a=pb;else if(C(e))if(isNaN(+e)){var u=zn(e);u&&(s=u,a=gb)}else a=pb;else if(L(e)){var c=h({},s);c.colorStops=y(e.colorStops,function(t){return{offset:t.offset,color:zn(t.color)}}),Un(e)?a=vb:jn(e)&&(a=yb),s=c}0===r?this.valType=a:(a!==this.valType||a===mb)&&(o=!0),this.discrete=this.discrete||o;var p={time:t,value:s,rawValue:e,percent:0};return n&&(p.easing=n,p.easingFunc=T(n)?n:Zw[n]||Mn(n)),i.push(p),p},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=ai(i),l=oi(i),u=0;r>u;u++){var h=n[u],c=h.value,p=o.value;h.percent=h.time/t,a||(s&&u!==r-1?ei(c,p,i):l&&ti(c.colorStops,p.colorStops))}if(!a&&i!==yb&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var d=n[0].value,u=0;r>u;u++)i===pb?n[u].additiveValue=n[u].value-d:i===gb?n[u].additiveValue=Qn([],n[u].value,d,-1):ai(i)&&(n[u].additiveValue=i===db?Qn([],n[u].value,d,-1):Jn([],n[u].value,d,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,r,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,h=this.propName,c=s===gb,p=this._lastFr,d=Math.min;if(1===u)i=r=l[0];else{if(0>e)n=0;else if(e=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;u>n&&!(l[n].percent>e);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var g=r.percent-i.percent,v=0===g?1:d((e-i.percent)/g,1);r.easingFunc&&(v=r.easingFunc(v));var m=o?this._additiveValue:c?_b:t[h];if(!ai(s)&&!c||m||(m=this._additiveValue=[]),this.discrete)t[h]=1>v?i.rawValue:r.rawValue;else if(ai(s))s===db?Kn(m,i[a],r[a],v):$n(m,i[a],r[a],v);else if(oi(s)){var _=i[a],x=r[a],w=s===vb;t[h]={type:w?"linear":"radial",x:qn(_.x,x.x,v),y:qn(_.y,x.y,v),colorStops:y(_.colorStops,function(t,e){var n=x.colorStops[e];return{offset:qn(t.offset,n.offset,v),color:ii(Kn([],t.color,n.color,v))}}),global:x.global},w?(t[h].x2=qn(_.x2,x.x2,v),t[h].y2=qn(_.y2,x.y2,v)):t[h].r=qn(_.r,x.r,v)}else if(c)Kn(m,i[a],r[a],v),o||(t[h]=ii(m));else{var b=qn(i[a],r[a],v);o?this._additiveValue=b:t[h]=b}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===pb?t[n]=t[n]+i:e===gb?(zn(t[n],_b),Qn(_b,_b,i,1),t[n]=ii(_b)):e===db?Qn(t[n],t[n],i,1):e===fb&&Jn(t[n],t[n],i,1)},t}(),wb=function(){function t(t,e,n,i){return this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i?void a("Can' use additive animation on looped animation."):(this._additiveAnimators=i,void(this._allowDiscrete=n))}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target +},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,w(e),n)},t.prototype.whenWithKeys=function(t,e,n,i){for(var r=this._tracks,o=0;o0&&s.addKeyframe(0,ni(l),i),this._trackKeys.push(a)}s.addKeyframe(t,ni(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;e>n;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}(),bb=function(t){function n(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return e(n,t),n.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},n.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},n.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},n.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},n.prototype.update=function(t){for(var e=si()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next,o=i.step(e,n);o?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},n.prototype._startLoop=function(){function t(){e._running&&(Gw(t),!e._paused&&e.update())}var e=this;this._running=!0,Gw(t)},n.prototype.start=function(){this._running||(this._time=si(),this._pausedTime=0,this._startLoop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pauseStart=si(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedTime+=si()-this._pauseStart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},n.prototype.isFinished=function(){return null==this._head},n.prototype.animate=function(t,e){e=e||{},this.start();var n=new wb(t,e.loop);return this.addAnimator(n),n},n}(aw),Sb=300,Mb=Cx.domSupported,Tb=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=y(t,function(t){var e=t.replace("mouse","pointer");return n.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:i}}(),Cb={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ib=!1,kb=function(){function t(t,e){this.stopPropagation=$,this.stopImmediatePropagation=$,this.preventDefault=$,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return t}(),Db={mousedown:function(t){t=Ae(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Ae(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Ae(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Ae(this.dom,t);var e=t.toElement||t.relatedTarget;pi(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Ib=!0,t=Ae(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Ib||(t=Ae(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Ae(this.dom,t),hi(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Db.mousemove.call(this,t),Db.mousedown.call(this,t)},touchmove:function(t){t=Ae(this.dom,t),hi(t),this.handler.processGesture(t,"change"),Db.mousemove.call(this,t)},touchend:function(t){t=Ae(this.dom,t),hi(t),this.handler.processGesture(t,"end"),Db.mouseup.call(this,t),+new Date-+this.__lastTouchMoment1e-10&&Zb(t[3]-1)>1e-10?Math.sqrt(Zb(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){mi(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&We(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Yb=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],Ub={},jb="__zr_normal__",qb=Yb.concat(["ignore"]),Kb=m(Yb,function(t,e){return t[e]=!0,t},{ignore:!1}),$b={},Qb=new kw(0,0,0,0),Jb=function(){function t(t){this.id=o(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=Qb;u.copy(n.layoutRect?n.layoutRect:this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition($b,n,u):Ci($b,n,u),r.x=$b.x,r.y=$b.y,o=$b.align,a=$b.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Ti(h[0],u.width),p=Ti(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,y=void 0,m=void 0;f&&this.canBeInsideText()?(v=n.insideFill,y=n.insideStroke,(null==v||"auto"===v)&&(v=this.getInsideTextFill()),(null==y||"auto"===y)&&(y=this.getInsideTextStroke(v),m=!0)):(v=n.outsideFill,y=n.outsideStroke,(null==v||"auto"===v)&&(v=this.getOutsideFill()),(null==y||"auto"===y)&&(y=this.getOutsideStroke(v),m=!0)),v=v||"#000",(v!==g.fill||y!==g.stroke||m!==g.autoStroke||o!==g.align||a!==g.verticalAlign)&&(s=!0,g.fill=v,g.stroke=y,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=Nw,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Eb:Bb},t.prototype.getOutsideStroke=function(){var t=this.__zr&&this.__zr.getBackgroundColor(),e="string"==typeof t&&zn(t);e||(e=[255,255,255,1]);for(var n=e[3],i=this.__zr.isDarkMode(),r=0;3>r;r++)e[r]=e[r]*n+(i?0:255)*(1-n);return e[3]=1,Zn(e,"rgba")},t.prototype.traverse=function(){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},h(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(D(t))for(var n=t,i=w(n),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(jb,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===jb,o=this.hasState();if(o||!r){var s=this.currentStates,l=this.stateTransition;if(!(p(s,t)>=0)||!e&&1!==s.length){var u;if(this.stateProxy&&!r&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!r)return void a("State "+t+" not exists.");r||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,d=this._textGuide;return c&&c.useState(t,e,n,h),d&&d.useState(t,e,n,h),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Nw),u}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;o>s;s++)if(t[s]!==r[s]){a=!1;break}if(a)return;for(var s=0;o>s;s++){var l=t[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,t)),u||(u=this.states[l]),u&&i.push(u)}var h=i[o-1],c=!!(h&&h.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(t.join(","),p,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Nw)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=p(i,t),o=p(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;i>o;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},t.prototype.animateTo=function(t,e,n){Ii(this,t,e,n)},t.prototype.animateFrom=function(t,e,n){Ii(this,t,e,n,!0)},t.prototype._transitionState=function(t,e,n,i){for(var r=Ii(this,e,n,i),o=0;o=0&&(n.splice(i,0,t),this._doAdd(t))}return this},n.prototype.replace=function(t,e){var n=p(this._children,t);return n>=0&&this.replaceAt(e,n),this},n.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},n.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},n.prototype.remove=function(t){var e=this.__zr,n=this._children,i=p(n,t);return 0>i?this:(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh(),this)},n.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0&&(this._ux=rM(n/Rb/t)||0,this._uy=rM(n/Rb/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(US.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=rM(t-this._xi),i=rM(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(US.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(US.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(US.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),lM[0]=i,lM[1]=r,_o(lM,o),i=lM[0],r=lM[1];var a=r-i;return this.addData(US.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=nM(r)*n+t,this._yi=iM(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(US.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(US.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!sM||(this.data=new Float32Array(e));for(var n=0;e>n;n++)this.data[n]=t[n];this._len=e},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();sM&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;at.length&&(this._expandData(),t=this.data);for(var e=0;e0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){KS[0]=KS[1]=QS[0]=QS[1]=Number.MAX_VALUE,$S[0]=$S[1]=JS[0]=JS[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tc;){var p=t[c++],d=1===c;d&&(r=t[c],o=t[c+1],a=r,s=o);var f=-1;switch(p){case US.M:r=a=t[c++],o=s=t[c++];break;case US.L:var g=t[c++],v=t[c++],y=g-r,m=v-o;(rM(y)>n||rM(m)>i||c===e-1)&&(f=Math.sqrt(y*y+m*m),r=g,o=v);break;case US.C:var _=t[c++],x=t[c++],g=t[c++],v=t[c++],w=t[c++],b=t[c++];f=vn(r,o,_,x,g,v,w,b,10),r=w,o=b;break;case US.Q:var _=t[c++],x=t[c++],g=t[c++],v=t[c++];f=Sn(r,o,_,x,g,v,10),r=g,o=v;break;case US.A:var S=t[c++],M=t[c++],T=t[c++],C=t[c++],I=t[c++],k=t[c++],D=k+I;c+=1;{!t[c++]}d&&(a=nM(I)*T+S,s=iM(I)*C+M),f=eM(T,C)*tM(aM,Math.abs(k)),r=nM(D)*T+S,o=iM(D)*C+M;break;case US.R:a=r=t[c++],s=o=t[c++];var A=t[c++],P=t[c++];f=2*A+2*P;break;case US.Z:var y=a-r,m=s-o;f=Math.sqrt(y*y+m*m),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p,d=this.data,f=this._ux,g=this._uy,v=this._len,y=1>e,m=0,_=0,x=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=this._pathLen,h=e*u))t:for(var w=0;v>w;){var b=d[w++],S=1===w;switch(S&&(r=d[w],o=d[w+1],n=r,i=o),b!==US.L&&x>0&&(t.lineTo(c,p),x=0),b){case US.M:n=r=d[w++],i=o=d[w++],t.moveTo(r,o);break;case US.L:a=d[w++],s=d[w++];var M=rM(a-r),T=rM(s-o);if(M>f||T>g){if(y){var C=l[_++];if(m+C>h){var I=(h-m)/C;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}m+=C}t.lineTo(a,s),r=a,o=s,x=0}else{var k=M*M+T*T;k>x&&(c=a,p=s,x=k)}break;case US.C:var D=d[w++],A=d[w++],P=d[w++],O=d[w++],L=d[w++],R=d[w++];if(y){var C=l[_++];if(m+C>h){var I=(h-m)/C;fn(r,D,P,L,I,jS),fn(o,A,O,R,I,qS),t.bezierCurveTo(jS[1],qS[1],jS[2],qS[2],jS[3],qS[3]);break t}m+=C}t.bezierCurveTo(D,A,P,O,L,R),r=L,o=R;break;case US.Q:var D=d[w++],A=d[w++],P=d[w++],O=d[w++];if(y){var C=l[_++];if(m+C>h){var I=(h-m)/C;wn(r,D,P,I,jS),wn(o,A,O,I,qS),t.quadraticCurveTo(jS[1],qS[1],jS[2],qS[2]);break t}m+=C}t.quadraticCurveTo(D,A,P,O),r=P,o=O;break;case US.A:var z=d[w++],B=d[w++],E=d[w++],N=d[w++],F=d[w++],V=d[w++],H=d[w++],W=!d[w++],G=E>N?E:N,Z=rM(E-N)>.001,X=F+V,Y=!1;if(y){var C=l[_++];m+C>h&&(X=F+V*(h-m)/C,Y=!0),m+=C}if(Z&&t.ellipse?t.ellipse(z,B,E,N,H,F,X,W):t.arc(z,B,G,F,X,W),Y)break t;S&&(n=nM(F)*E+z,i=iM(F)*N+B),r=nM(X)*E+z,o=iM(X)*N+B;break;case US.R:n=r=d[w],i=o=d[w+1],a=d[w++],s=d[w++];var U=d[w++],j=d[w++];if(y){var C=l[_++];if(m+C>h){var q=h-m;t.moveTo(a,s),t.lineTo(a+tM(q,U),s),q-=U,q>0&&t.lineTo(a+U,s+tM(q,j)),q-=j,q>0&&t.lineTo(a+eM(U-q,0),s+j),q-=U,q>0&&t.lineTo(a,s+eM(j-q,0));break t}m+=C}t.rect(a,s,U,j);break;case US.Z:if(y){var C=l[_++];if(m+C>h){var I=(h-m)/C;t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}m+=C}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=US,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}(),hM=2*Math.PI,cM=2*Math.PI,pM=uM.CMD,dM=2*Math.PI,fM=1e-4,gM=[-1,-1,-1],vM=[-1,-1],yM=c({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},AS),mM={style:c({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},PS.style)},_M=Yb.concat(["invisible","culling","z","z2","zlevel","parent"]),xM=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.update=function(){var e=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new n;r.buildPath===n.prototype.buildPath&&(r.buildPath=function(t){e.buildPath(t,e.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s<_M.length;++s)r[_M[s]]=this[_M[s]];r.__dirty|=Nw}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(e){var n=w(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r.5?Bb:e>.2?Nb:Eb}if(t)return Eb}return Bb},n.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(C(e)){var n=this.__zr,i=!(!n||!n.isDarkMode()),r=Xn(t,0)0))},n.prototype.hasFill=function(){var t=this.style,e=t.fill;return null!=e&&"none"!==e},n.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&Vw)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Lo(o,a/s,t,e)))return!0}if(this.hasFill())return Oo(o,t,e)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=Vw,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},n.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:h(n,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(this.__dirty&Vw)},n.prototype.createStyle=function(t){return j(yM,t)},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=h({},this.shape))},n.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=h({},i.shape),h(s,n.shape)):(s=h({},r?this.shape:i.shape),h(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=h({},this.shape);for(var u={},c=w(s),p=0;p0},n.prototype.hasFill=function(){var t=this.style,e=t.fill;return null!=e&&"none"!==e},n.prototype.createStyle=function(t){return j(wM,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=wi(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},n.initDefaultProps=function(){var t=n.prototype;t.dirtyRectTolerance=10}(),n}(RS);bM.prototype.type="tspan";var SM=c({x:0,y:0},AS),MM={style:c({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},PS.style)},TM=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.createStyle=function(t){return j(SM,t)},n.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i=Ro(e.image)?e.image:this.__image;if(!i)return 0;var r="width"===t?"height":"width",o=e[r];return null==o?i[t]:i[t]/i[r]*o},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return MM},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new kw(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(RS);TM.prototype.type="image";var CM=Math.round,IM=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),kM={},DM=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new IM},n.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Eo(kM,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?zo(t,e):t.rect(n,i,r,o)},n.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},n}(xM);DM.prototype.type="rect";var AM={fill:"#000"},PM=2,OM={style:c({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},PS.style)},LM=function(t){function n(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=AM,n.attr(e),n}return e(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,C=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),I=r.calculatedLineHeight,k=0;kM&&(k=x[M],!k.align||"left"===k.align);)this._placeToken(k,t,b,g,T,"left",y),S-=k.width,T+=k.width,M++;for(;I>=0&&(k=x[I],"right"===k.align);)this._placeToken(k,t,b,g,C,"right",y),S-=k.width,C-=k.width,I--;for(T+=(i-(T-f)-(v-C)-S)/2;I>=M;)k=x[M],this._placeToken(k,t,b,g,T+k.width/2,"center",y),T+=k.width,M++;g+=b}},n.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2);var h=!t.isLineHolder&&jo(s);h&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var c=!!s.backgroundColor,p=t.textPadding;p&&(r=Yo(r,o,p),u-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(bM),f=d.createStyle();d.useStyle(f);var g=this._defaultStyle,v=!1,y=0,m=Xo("fill"in s?s.fill:"fill"in e?e.fill:(v=!0,g.fill)),_=Zo("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||g.autoStroke&&!v?null:(y=PM,g.stroke)),x=s.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=u,x&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||Dx,f.opacity=F(s.opacity,e.opacity,1),Vo(f,s),_&&(f.lineWidth=F(s.lineWidth,e.lineWidth,y),f.lineDash=N(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=_),m&&(f.fill=m);var w=t.contentWidth,b=t.contentHeight;d.setBoundingRect(new kw(bi(f.x,w,f.textAlign),Si(f.y,b,f.textBaseline),w,b))},n.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l=t.backgroundColor,u=t.borderWidth,h=t.borderColor,c=l&&l.image,p=l&&!c,d=t.borderRadius,f=this;if(p||t.lineHeight||u&&h){a=this._getOrCreateChild(DM),a.useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=d,a.dirtyShape()}if(p){var v=a.style;v.fill=l||null,v.fillOpacity=N(t.fillOpacity,1)}else if(c){s=this._getOrCreateChild(TM),s.onload=function(){f.dirtyStyle()};var y=s.style;y.image=l.image,y.x=n,y.y=i,y.width=r,y.height=o}if(u&&h){var v=a.style;v.lineWidth=u,v.stroke=h,v.strokeOpacity=N(t.strokeOpacity,1),v.lineDash=t.borderDash,v.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(v.strokeFirst=!0,v.lineWidth*=2)}var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=F(t.opacity,e.opacity,1)},n.makeFont=function(t){var e="";return Ho(t)&&(e=[t.fontStyle,t.fontWeight,Fo(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&G(e)||t.textFont||t.font},n}(RS),RM={left:!0,right:1,center:1},zM={top:1,bottom:1,middle:1},BM=["fontStyle","fontWeight","fontSize","fontFamily"],EM=Lr(),NM=function(t,e,n,i){if(i){var r=EM(i);r.dataIndex=n,r.dataType=e,r.seriesIndex=t,"group"===i.type&&i.traverse(function(i){var r=EM(i);r.seriesIndex=t,r.dataIndex=n,r.dataType=e})}},FM=1,VM={},HM=Lr(),WM=Lr(),GM=0,ZM=1,XM=2,YM=["emphasis","blur","select"],UM=["normal","emphasis","blur","select"],jM=10,qM=9,KM="highlight",$M="downplay",QM="select",JM="unselect",tT="toggleSelect",eT=new rb(100),nT=["emphasis","blur","select"],iT={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"},rT=uM.CMD,oT=[[],[],[]],aT=Math.sqrt,sT=Math.atan2,lT=Math.sqrt,uT=Math.sin,hT=Math.cos,cT=Math.PI,pT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,dT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,fT=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.applyTransform=function(){},n}(xM),gT=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),vT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new gT},n.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},n}(xM);vT.prototype.type="circle";var yT=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),mT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new yT},n.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},n}(xM);mT.prototype.type="ellipse";var _T=Math.PI,xT=2*_T,wT=Math.sin,bT=Math.cos,ST=Math.acos,MT=Math.atan2,TT=Math.abs,CT=Math.sqrt,IT=Math.max,kT=Math.min,DT=1e-4,AT=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}return t}(),PT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new AT},n.prototype.buildPath=function(t,e){is(t,e)},n.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},n}(xM);PT.prototype.type="sector";var OT=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),LT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new OT},n.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},n}(xM);LT.prototype.type="ring";var RT=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),zT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultShape=function(){return new RT},n.prototype.buildPath=function(t,e){os(t,e,!0)},n}(xM);zT.prototype.type="polygon";var BT=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),ET=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new BT},n.prototype.buildPath=function(t,e){os(t,e,!1)},n}(xM);ET.prototype.type="polyline";var NT={},FT=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),VT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new FT},n.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Bo(NT,e,this.style);n=a.x1,i=a.y1,r=a.x2,o=a.y2}else n=e.x1,i=e.y1,r=e.x2,o=e.y2;var s=e.percent;0!==s&&(t.moveTo(n,i),1>s&&(r=n*(1-s)+r*s,o=i*(1-s)+o*s),t.lineTo(r,o))},n.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},n}(xM);VT.prototype.type="line";var HT=[],WT=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}(),GT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new WT},n.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(1>h&&(wn(n,a,r,h,HT),a=HT[1],r=HT[2],wn(i,s,o,h,HT),s=HT[1],o=HT[2]),t.quadraticCurveTo(a,s,r,o)):(1>h&&(fn(n,a,l,r,h,HT),a=HT[1],l=HT[2],r=HT[3],fn(i,s,u,o,h,HT),s=HT[1],u=HT[2],o=HT[3]),t.bezierCurveTo(a,s,l,u,r,o)))},n.prototype.pointAt=function(t){return as(this.shape,t,!1)},n.prototype.tangentAt=function(t){var e=as(this.shape,t,!0);return ce(e,e)},n}(xM);GT.prototype.type="bezier-curve";var ZT=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return t}(),XT=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new ZT},n.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},n}(xM);XT.prototype.type="arc";var YT=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return e(n,t),n.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;nn;n++)this._corners[n]=new _w;for(var n=0;2>n;n++)this._axes[n]=new _w;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,r=t.x,o=t.y,a=r+t.width,s=o+t.height;if(n[0].set(r,o),n[1].set(a,o),n[2].set(a,s),n[3].set(r,s),e)for(var l=0;4>l;l++)n[l].transform(e);_w.sub(i[0],n[1],n[0]),_w.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;2>l;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,i=!e;return QT.set(1/0,1/0),JT.set(0,0),!this._intersectCheckOneSide(this,t,QT,JT,i,1)&&(n=!1,i)?n:!this._intersectCheckOneSide(t,this,QT,JT,i,-1)&&(n=!1,i)?n:(i||_w.copy(e,n?QT:JT),n)},t.prototype._intersectCheckOneSide=function(t,e,n,i,r,o){for(var a=!0,s=0;2>s;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,KT),this._getProjMinMaxOnAxis(s,e._corners,$T),KT[1]<$T[0]||KT[0]>$T[1]){if(a=!1,r)return a;var u=Math.abs($T[0]-KT[1]),h=Math.abs(KT[0]-$T[1]);Math.min(u,h)>i.len()&&(h>u?_w.scale(i,l,-u*o):_w.scale(i,l,h*o))}else if(n){var u=Math.abs($T[0]-KT[1]),h=Math.abs(KT[0]-$T[1]);Math.min(u,h)u?_w.scale(n,l,u*o):_w.scale(n,l,-h*o))}}return a},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l-1?AC:OC}():OC;rl(PC,kC),rl(AC,DC);var BC=1e3,EC=60*BC,NC=60*EC,FC=24*NC,VC=365*FC,HC={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},WC="{yyyy}-{MM}-{dd}",GC={year:"{yyyy}",month:"{yyyy}-{MM}",day:WC,hour:WC+" "+HC.hour,minute:WC+" "+HC.minute,second:WC+" "+HC.second,millisecond:HC.none},ZC=["year","month","day","hour","minute","second","millisecond"],XC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"],YC=H,UC=["a","b","c","d","e","f","g"],jC=function(t,e){return"{"+t+(null==e?"":e)+"}"},qC=v,KC=["left","right","top","bottom","width","height"],$C=[["width","left","right"],["height","top","bottom"]],QC=Vl,JC=(S(Vl,"vertical"),S(Vl,"horizontal"),Lr()),tI=function(t){function n(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=tl("ec_cpt_model"),r}return e(n,t),n.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=Gl(this),i=n?Xl(t):{},r=e.getTheme();l(t,r.get(this.mainType)),l(t,this.getDefaultOption()),n&&Zl(t,i,n)},n.prototype.mergeOption=function(t){l(this.option,t,!0);var e=Gl(this);e&&Zl(this.option,t,e)},n.prototype.optionUpdated=function(){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!Gr(t))return t.defaultOption;var e=JC(this);if(!e.defaultOption){for(var n=[],i=t;i;){var r=i.prototype.defaultOption;r&&n.push(r),i=i.superClass}for(var o={},a=n.length-1;a>=0;a--)o=l(o,n[a],!0);e.defaultOption=o}return e.defaultOption},n.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Br(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},n.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=function(){var t=n.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),n}(CC);Yr(tI,CC),Kr(tI),el(tI),nl(tI,Ul);var eI="";"undefined"!=typeof navigator&&(eI=navigator.platform||"");var nI,iI,rI="rgba(0, 0, 0, 0.2)",oI={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:rI,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:rI,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:rI,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:rI,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:rI,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:rI,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:eI.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},aI=Y(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),sI="original",lI="arrayRows",uI="objectRows",hI="keyedColumns",cI="typedArray",pI="unknown",dI="column",fI="row",gI={Must:1,Might:2,Not:3},vI=Lr(),yI=Y(),mI=Lr(),_I=(Lr(),function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var i=dr(this.get("color",!0)),r=this.get("colorLayer",!0);return iu(this,mI,i,r,t,e,n)},t.prototype.clearColorPalette=function(){ru(this,mI)},t}()),xI="\x00_ec_inner",wI=1,bI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new CC(i),this._locale=new CC(r),this._optionManager=o},n.prototype.setOption=function(t,e,n){var i=uu(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},n.prototype.resetOption=function(t,e){return this._resetOption(t,uu(e))},n.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):iI(this,r),n=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&v(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,e){function n(e){var n=eu(this,e,dr(t[e])),a=r.get(e),s=a?c&&c.get(e)?"replaceMerge":"normalMerge":"replaceAll",l=yr(a,n,s);Ar(l,e,tI),i[e]=null,r.set(e,null),o.set(e,0);var u,p=[],d=[],f=0;v(l,function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=tI.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(u)return;u=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=h({componentIndex:n},t.keyInfo);i=new a(r,this,this,s),h(i,s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(p.push(i.option),d.push(i),f++):(p.push(void 0),d.push(void 0))},this),i[e]=p,r.set(e,d),o.set(e,f),"series"===e&&nI(this)}var i=this.option,r=this._componentsMap,o=this._componentsCount,a=[],u=Y(),c=e&&e.replaceMergeMainTypeMap;jl(this),v(t,function(t,e){null!=t&&(tI.hasClass(e)?e&&(a.push(e),u.set(e,!0)):i[e]=null==i[e]?s(t):l(i[e],t,!0))}),c&&c.each(function(t,e){tI.hasClass(e)&&!u.get(e)&&(a.push(e),u.set(e,!0))}),tI.topologicalTravel(a,tI.getAllClassMainTypes(),n,this),this._seriesIndices||nI(this)},n.prototype.getOption=function(){var t=s(this.option);return v(t,function(e,n){if(tI.hasClass(n)){for(var i=dr(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!kr(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t[xI],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;ra;a++)cu(n[a].query,t,e)&&r.push(a);return!r.length&&i&&(r=[-1]),r.length&&!du(r,this._currentMediaIndices)&&(o=y(r,function(t){return s(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,o},t}(),zI=v,BI=D,EI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],NI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],FI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],VI=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]],HI=function(){function t(t){this.data=t.data||(t.sourceFormat===hI?{}:[]),this.sourceFormat=t.sourceFormat||pI,this.seriesLayoutBy=t.seriesLayoutBy||dI,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;no;o++)e[o]=n[r+o];return e},i=function(t,e,n,i){for(var r=this._data,o=this._dimSize,a=0;o>a;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;h>p;p++){var d=r[p*o+a];c[t+p]=d,l>d&&(l=d),d>u&&(u=d)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};e={},e[lI+"_"+dI]={pure:!0,appendData:t},e[lI+"_"+fI]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[uI]={pure:!0,appendData:t},e[hI]={pure:!0,appendData:function(t){var e=this._data;v(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},e[sI]={appendData:t},e[cI]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},CI=e}(),t}(),GI=function(t,e,n,i){return t[i]},ZI=(SI={},SI[lI+"_"+dI]=function(t,e,n,i){return t[i+e]},SI[lI+"_"+fI]=function(t,e,n,i,r){i+=e;for(var o=r||[],a=t,s=0;s=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})}},t.prototype.getRawValue=function(t,e){return ju(this.getData(e),t)},t.prototype.formatTooltip=function(){},t}(),$I=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(a!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||d>p)){var f=this._progress;if(M(f))for(var g=0;gi?i++:null}function e(){var t=i%a*r+Math.ceil(i/a),e=i>=n?null:o>t?t:i;return i++,e}var n,i,r,o,a,s={reset:function(l,u,h,c){i=l,n=u,r=h,o=c,a=Math.ceil(o/r),s.next=r>1&&o>0?e:t}};return s}(),JI=(Y({number:function(t){return parseFloat(t)},time:function(t){return+tr(t) +},trim:function(t){return C(t)?G(t):t}}),{lt:function(t,e){return e>t},lte:function(t,e){return e>=t},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}}),tk=(function(){function t(t,e){if(!k(e)){var n="";cr(n)}this._opFn=JI[t],this._rvalFloat=ar(e)}return t.prototype.evaluate=function(t){return k(t)?this._opFn(t,this._rvalFloat):this._opFn(ar(t),this._rvalFloat)},t}(),function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=k(t)?t:ar(t),i=k(e)?e:ar(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=C(t),s=C(e);a&&(n=s?t:0),s&&(i=a?e:0)}return i>n?this._resultLT:n>i?-this._resultLT:0},t}()),ek=(function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=ar(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=ar(t)===this._rvalFloat)}return this._isEQ?e:!e},t}(),function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(){},t.prototype.retrieveValueFromItem=function(){},t.prototype.convertValue=function(t,e){return $u(t,e)},t}()),nk=Y(),ik="undefined",rk=typeof Uint32Array===ik?Array:Uint32Array,ok=typeof Uint16Array===ik?Array:Uint16Array,ak=typeof Int32Array===ik?Array:Int32Array,sk=typeof Float64Array===ik?Array:Float64Array,lk={"float":sk,"int":ak,ordinal:Array,number:Array,time:sk},uk=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Y()}return t.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),r=this.defaultDimValueGetter=kI[i.sourceFormat];this._dimValueGetter=n||r,this._rawExtent=[];Gu(i);this._dimensions=y(e,function(t){return{type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,r=n.get(t);if(null!=r){if(i[r].type===e)return r}else r=i.length;return i[r]={type:e},n.set(t,r),this._chunks[r]=new lk[e||"float"](this._rawCount),this._rawExtent[r]=lh(),r},t.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],r=this._rawExtent,o=i.ordinalOffset||0,a=n.length;0===o&&(r[t]=lh());for(var s=r[t],l=o;a>l;l++){var u=n[l]=e.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}i.ordinalMeta=e,i.ordinalOffset=a,i.type="ordinal"},t.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),i>n&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;r>l;l++){var u=i[l];hh(n,l,u.type,s,!0)}for(var h=[],c=a;s>c;c++)for(var p=c-a,d=0;r>d;d++){var u=i[d],f=kI.arrayRows.call(this,t[p]||h,u.property,p,d);n[d][c]=f;var g=o[d];fg[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=y(o,function(t){return t.property}),u=0;a>u;u++){var h=o[u];s[u]||(s[u]=lh()),hh(r,u,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,r,s);else for(var c=[],p=t;e>p;p++){c=i.getItem(p,c);for(var d=0;a>d;d++){var f=r[d],g=this._dimValueGetter(c,l[d],p,d);f[p]=g;var v=s[d];gv[1]&&(v[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&er;r++)n.push(this.get(i[r],e));return n},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&ei;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(t){var e=[];this.each([t],function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n=i;){var o=(i+r)/2|0;if(e[o]t))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,r=i[t],o=[];if(!r)return o;null==n&&(n=1/0);for(var a=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=this.getRawIndex(u),p=e-r[c],d=Math.abs(p);n>=d&&((a>d||d===a&&p>=0&&0>s)&&(a=d,s=p,l=0),p===s&&(o[l++]=u))}return o.length=l,o},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else{var n=sh(this._rawCount);t=new n(this.count());for(var r=0;rc;c++){var p=void 0,d=n.getRawIndex(c);if(0===s)p=e(c);else if(1===s){var f=h[u][d];p=e(f,c)}else{for(var g=0;s>g;g++)a[g]=h[t[g]][d];a[g]=c,p=e.apply(null,a)}p&&(o[l++]=d)}return i>l&&(n._indices=o),n._count=l,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=w(t),r=i.length;if(!r)return this;var o=e.count(),a=sh(e._rawCount),s=new a(o),l=0,u=i[0],h=t[u][0],c=t[u][1],p=e._chunks,d=!1;if(!e._indices){var f=0;if(1===r){for(var g=p[i[0]],v=0;n>v;v++){var y=g[v];(y>=h&&c>=y||isNaN(y))&&(s[l++]=f),f++}d=!0}else if(2===r){for(var g=p[i[0]],m=p[i[1]],_=t[i[1]][0],x=t[i[1]][1],v=0;n>v;v++){var y=g[v],b=m[v];(y>=h&&c>=y||isNaN(y))&&(b>=_&&x>=b||isNaN(b))&&(s[l++]=f),f++}d=!0}}if(!d)if(1===r)for(var v=0;o>v;v++){var S=e.getRawIndex(v),y=p[i[0]][S];(y>=h&&c>=y||isNaN(y))&&(s[l++]=S)}else for(var v=0;o>v;v++){for(var M=!0,S=e.getRawIndex(v),T=0;r>T;T++){var C=i[T],y=p[C][S];(yt[C][1])&&(M=!1)}M&&(s[l++]=e.getRawIndex(v))}return o>l&&(e._indices=s),e._count=l,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,n){for(var i=t._chunks,r=[],o=e.length,a=t.count(),s=[],l=t._rawExtent,u=0;uh;h++){for(var c=t.getRawIndex(h),p=0;o>p;p++)s[p]=i[e[p]][c];s[o]=h;var d=n&&n.apply(null,s);if(null!=d){"object"!=typeof d&&(r[0]=d,d=r);for(var u=0;uv[1]&&(v[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks,s=a[t],l=this.count(),u=0,h=Math.floor(1/e),c=this.getRawIndex(0),p=new(sh(this._rawCount))(Math.min(2*(Math.ceil(l/h)+2),l));p[u++]=c;for(var d=1;l-1>d;d+=h){for(var f=Math.min(d+h,l-1),g=Math.min(d+2*h,l),v=(g+f)/2,y=0,m=f;g>m;m++){var _=this.getRawIndex(m),x=s[_];isNaN(x)||(y+=x)}y/=g-f;var w=d,b=Math.min(d+h,l),S=d-1,M=s[c];n=-1,r=w;for(var T=-1,C=0,m=w;b>m;m++){var _=this.getRawIndex(m),x=s[_];isNaN(x)?(C++,0>T&&(T=_)):(i=Math.abs((S-v)*(x-M)-(S-m)*(y-M)),i>n&&(n=i,r=_))}C>0&&b-w>C&&(p[u++]=Math.min(T,r),r=Math.max(T,r)),p[u++]=r,c=r}return p[u++]=this.getRawIndex(l-1),o._count=u,o._indices=p,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=r._rawExtent[t]=lh(),c=new(sh(this._rawCount))(Math.ceil(u/s)),p=0,d=0;u>d;d+=s){s>u-d&&(s=u-d,a.length=s);for(var f=0;s>f;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var v=n(a),y=this.getRawIndex(Math.min(d+i(a,v)||0,u-1));l[y]=v,vh[1]&&(h[1]=v),c[p++]=y}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();o>r;r++){var a=this.getRawIndex(r);switch(n){case 0:e(r);break;case 1:e(i[t[0]][a],r);break;case 2:e(i[t[0]][a],i[t[1]][a],r);break;default:for(var s=0,l=[];n>s;s++)l[s]=i[t[s]][a];l[s]=r,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e=this._chunks[t],n=lh();if(!e)return n;var i,r=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var a=i[0],s=i[1],l=0;r>l;l++){var u=this.getRawIndex(l),h=e[u];a>h&&(a=h),h>s&&(s=h)}return i=[a,s],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;ri;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return $u(t[i],this._dimensions[i])}kI={arrayRows:t,objectRows:function(t,e,n,i){return $u(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return $u(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),hk=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(ph(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),l=u.getSource(),a=l.data,s=l.sourceFormat,e=[u._getVersionSign()]}else a=o.get("data",!0),s=P(a)?cI:sI,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},p=N(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=N(h.sourceHeader,c.sourceHeader),f=N(h.dimensions,c.dimensions),g=p!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f;t=g?[zu(a,{seriesLayoutBy:p,sourceHeader:d,dimensions:f},s)]:[]}else{var v=n;if(r){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{var m=v.get("source",!0);t=[zu(m,this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(null!=i){var r="";1!==t.length&&dh(r)}var o,a=[],s=[];return v(t,function(t){t.prepareSource();var e=t.getSource(i||0),n="";null==i||e||dh(n),a.push(e),s.push(t._getVersionSign())}),n?o=rh(n,a,{datasetIndex:e.componentIndex}):null!=i&&(o=[Eu(a[0])]),{sourceList:o,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;ethis.getShallow("animationThreshold")&&(e=!1),!!e},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=_I.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},n.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},n.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[Oh(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this[vk])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},n.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){D(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;a>l;l++){var u=e[l],h=Oh(t,u);s[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(u)}}else if("single"===o||o===!0){var c=e[a-1],h=Oh(t,c);r.selectedMap=(n={},n[h]=!0,n),this._selectedDataIndicesMap=(i={},i[h]=t.getRawIndex(c),i)}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each(function(n){var i=t.getRawDataItem(n);i&&i.selected&&e.push(n)}),e.length>0&&this._innerSelect(t,e)}},n.registerClass=function(t){return tI.registerClass(t)},n.protoInitialize=function(){var t=n.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),n}(tI);f(yk,KI),f(yk,_I),Yr(yk,tI);var mk=function(){function t(){this.group=new tS,this.uid=tl("viewComponent")}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.dispose=function(){},t.prototype.updateView=function(){},t.prototype.updateLayout=function(){},t.prototype.updateVisual=function(){},t.prototype.toggleBlurSeries=function(){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();Zr(mk),Kr(mk);var _k=Lr(),xk=Hh(),wk=function(){function t(){this.group=new tS,this.uid=tl("viewChart"),this.renderTask=Ku({plan:Zh,reset:Xh}),this.renderTask.context={view:this}}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Gh(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Gh(r,i,"normal")},t.prototype.remove=function(){this.group.removeAll()},t.prototype.dispose=function(){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Hs(this.group,t)},t.markUpdateMethod=function(t,e){_k(t).updateMethod=e},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();Zr(wk,["dispose"]),Kr(wk);var bk,Sk={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Mk="\x00__throttleOriginMethod",Tk="\x00__throttleRate",Ck="\x00__throttleType",Ik=Lr(),kk={itemStyle:$r(SC,!0),lineStyle:$r(xC,!0)},Dk={lineStyle:"stroke",itemStyle:"fill"},Ak={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=qh(t,i),a=o(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=Kh(t,i),u=a[l],c=T(u)?u:null,p="auto"===a.fill||"auto"===a.stroke;if(!a[l]||c||p){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||T(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||T(a.stroke)?d:a.stroke}return n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c?(n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=h({},a);r[l]=c(i),e.setItemVisual(n,"style",r)}}):void 0}},Pk=new CC,Ok={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=qh(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Pk.option=n[i];var a=r(Pk),s=t.ensureUniqueItemVisual(e,"style");h(s,a),Pk.option.decal&&(t.setItemVisual(e,"decal",Pk.option.decal),Pk.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Lk={performRawSeries:!0,overallReset:function(t){var e=Y();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),Ik(t).scope=r}}),t.eachSeries(function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Ik(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Kh(e,a);r.each(function(t){var e=r.getRawIndex(t);i[e]=t}),n.each(function(t){var a=i[t],l=r.getItemVisual(a,"colorFromPalette");if(l){var u=r.ensureUniqueItemVisual(a,"style"),h=n.getName(t)||t+"",c=n.count();u[s]=e.getColorFromPalette(h,o,c)}})}})}},Rk=Math.PI,zk=function(){function t(t,e,n,i){this._stageTaskMap=Y(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=r?n.step:null,a=i&&i.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Y();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;v(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";W(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){function r(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}i=i||{};var o=!1,a=this;v(t,function(t){if(!i.visualType||i.visualType===t.visualType){var s=a._stageTaskMap.get(t.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){r(i,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,i.block);c.each(function(t){t.perform(p)}),u.perform(p)&&(o=!0)}else l&&l.each(function(s){r(i,s)&&s.dirty();var l=a.getPerformArgs(s,i.block);l.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(o=!0)})}}),this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){function r(e){var r=e.uid,l=s.set(r,a&&a.get(r)||Ku({plan:nc,reset:ic,count:oc}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,l)}var o=this,a=e.seriesTaskMap,s=e.seriesTaskMap=Y(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(r):l?n.eachRawSeriesByType(l,r):u&&u(n,i).each(r)},t.prototype._createOverallStageTask=function(t,e,n,i){function r(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(p=!0,Ku({reset:Jh,onDirty:ec})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,o._pipe(t,n)}var o=this,a=e.overallTask=e.overallTask||Ku({reset:Qh});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o};var s=a.agentStubMap,l=a.agentStubMap=Y(),u=t.seriesType,h=t.getTargetSeries,c=!0,p=!1,d="";W(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,r):h?h(n,i).each(r):(c=!1,v(n.getSeries(),r)),p&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return T(t)&&(t={overallReset:t,seriesType:ac(t)}),t.uid=tl("stageHandler"),e&&(t.visualType=e),t},t}(),Bk=rc(0),Ek={},Nk={};sc(Ek,bI),sc(Nk,AI),Ek.eachSeriesByType=Ek.eachRawSeriesByType=function(t){bk=t},Ek.eachComponent=function(t){"series"===t.mainType&&t.subType&&(bk=t.subType)};var Fk=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Vk={color:Fk,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Fk]},Hk="#B9B8CE",Wk="#100C2A",Gk=function(){return{axisLine:{lineStyle:{color:Hk}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Zk=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Xk={darkMode:!0,color:Zk,backgroundColor:Wk,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Hk}},textStyle:{color:Hk},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Hk}},dataZoom:{borderColor:"#71708A",textStyle:{color:Hk},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Hk}},timeline:{lineStyle:{color:Hk},label:{color:Hk},controlStyle:{color:Hk,borderColor:Hk}},calendar:{itemStyle:{color:Wk},dayLabel:{color:Hk},monthLabel:{color:Hk},yearLabel:{color:Hk}},timeAxis:Gk(),logAxis:Gk(),valueAxis:Gk(),categoryAxis:Gk(),line:{symbol:"circle"},graph:{color:Zk},gauge:{title:{color:Hk},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Hk},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Xk.categoryAxis.splitLine.show=!1;var Yk=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},n={},i={};if(C(t)){var r=Hr(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};v(t,function(t,r){for(var s=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,a,"mainType")&&n(l,a,"subType")&&n(l,a,"index","componentIndex")&&n(l,a,"name")&&n(l,a,"id")&&n(u,o,"name")&&n(u,o,"dataIndex")&&n(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o))},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Uk=["symbol","symbolSize","symbolRotate","symbolOffset"],jk=Uk.concat(["symbolKeepAspect"]),qk={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){function n(e,n){for(var i=t.getRawValue(n),r=t.getDataParams(n),a=0;a0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,e,n){if(!this[VD]&&!this._disposed){var i,r,o;if(D(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[VD]=!0,!this._model||e){var a=new RI(this._api),s=this._theme,l=this._model=new bI;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},xA);var u={seriesTransition:o,optionChanged:!0};if(n)this[HD]={silent:i,updateParams:u},this[VD]=!1,this.getZr().wakeUp();else{try{KD(this),JD.update.call(this,null,u)}catch(h){throw this[HD]=null,this[VD]=!1,h}this._ssr||this._zr.flush(),this[HD]=null,this[VD]=!1,iA.call(this,i),rA.call(this,i)}}},n.prototype.setTheme=function(){},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||xD&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},n.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},n.prototype.getSvgDataURL=function(){if(Cx.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return v(e,function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},n.prototype.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;v(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return v(i,function(t){t.group.ignore=!1}),o}},n.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(TA[n]){var a=o,l=o,u=-o,h=-o,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();v(MA,function(o){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(s(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}),a*=p,l*=p,u*=p,h*=p;var d=u-a,f=h-l,g=Rx.createCanvas(),y=Bi(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var m="";return v(c,function(t){var e=t.left-a,n=t.top-l;m+=''+t.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new DM({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),v(c,function(t){var e=new TM({style:{x:t.left*p-a,y:t.top*p-l,image:t.dom}});y.add(e)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},n.prototype.convertToPixel=function(t,e){return tA(this,"convertToPixel",t,e)},n.prototype.convertFromPixel=function(t,e){return tA(this,"convertFromPixel",t,e)},n.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=Rr(i,t);return v(r,function(t,i){i.indexOf("Models")>=0&&v(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}},this)},this),!!n}},n.prototype.getVisual=function(t,e){var n=this._model,i=Rr(n,t,{defaultMainType:"series"}),r=i.seriesModel,o=r.getData(),a=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return null!=a?lc(o,a,e):uc(o,e)},n.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},n.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},n.prototype._initEvents=function(){var t=this;v(vA,function(e){var n=function(n){var i,r=t.getModel(),o=n.target,a="globalout"===e;if(a?i={}:o&&pc(o,function(t){var e=EM(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}return e.eventData?(i=h({},e.eventData),!0):void 0},!0),i){var s=i.componentType,l=i.componentIndex;("markLine"===s||"markPoint"===s||"markArea"===s)&&(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:c},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)}),v(mA,function(e,n){t._messageCenter.on(n,function(t){this.trigger(n,t)},t)}),v(["selectchanged"],function(e){t._messageCenter.on(e,function(t){this.trigger(e,t)},t)}),cc(this._messageCenter,this,this._api)},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this.getDom();t&&Er(this.getDom(),kA,"");var e=this,n=e._api,i=e._model;v(e._componentsViews,function(t){t.dispose(i,n)}),v(e._chartsViews,function(t){t.dispose(i,n)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete MA[e.id]}},n.prototype.resize=function(t){if(!this[VD]&&!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[HD]&&(null==i&&(i=this[HD].silent),n=!0,this[HD]=null),this[VD]=!0;try{n&&KD(this),JD.update.call(this,{type:"resize",animation:h({duration:0},t&&t.animation)})}catch(r){throw this[VD]=!1,r}this[VD]=!1,iA.call(this,i),rA.call(this,i)}}},n.prototype.showLoading=function(t,e){if(!this._disposed&&(D(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),SA[t])){var n=SA[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},n.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(t){var e=h({},t);return e.type=mA[t.type],e},n.prototype.dispatchAction=function(t,e){if(!this._disposed&&(D(e)||(e={silent:!!e}),yA[t.type]&&this._model)){if(this[VD])return void this._pendingActions.push(t);var n=e.silent;nA.call(this,t,n);var i=e.flush;i?this._zr.flush():i!==!1&&Cx.browser.weChat&&this._throttledZrFlush(),iA.call(this,n),rA.call(this,n)}},n.prototype.updateLabelLayout=function(){mD.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function n(t){var e=[],n=[],i=!1;if(t.eachComponent(function(t,r){var o=r.get("zlevel")||0,a=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===t?n:e).push({zlevel:o,z:a,idx:r.componentIndex,type:t,key:s})}),i){var r,o,a=e.concat(n);on(a,function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel}),v(a,function(e){var n=t.getComponent(e.type,e.idx),i=e.zlevel,a=e.key;null!=r&&(i=Math.max(r,i)),a?(i===r&&a!==o&&i++,o=a):o&&(i===r&&i++,o=""),r=i,n.setZLevel(i)})}}function i(t){for(var e=[],n=t.currentStates,i=0;ie.get("hoverLayerThreshold")&&!Cx.node&&!Cx.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}function o(t,e){var n=t.get("blendMode")||null;e.eachRendered(function(t){t.isGroup||(t.style.blend=n)})}function a(t,e){if(!t.preventAutoZ){var n=t.get("z")||0,i=t.get("zlevel")||0;e.eachRendered(function(t){return s(t,n,i,-1/0),!0})}}function s(t,e,n,i){var r=t.getTextContent(),o=t.getTextGuideLine(),a=t.isGroup;if(a)for(var l=t.childrenRef(),u=0;u0?{duration:o,delay:n.get("delay"),easing:n.get("easing")}:null;e.eachRendered(function(t){if(t.states&&t.states.emphasis){if(cs(t))return;if(t instanceof xM&&Wa(t),t.__dirty){var e=t.prevStates;e&&t.useStates(e)}if(r){t.stateTransition=a;var n=t.getTextContent(),o=t.getTextGuideLine();n&&(n.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&i(t)}})}KD=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),$D(t,!0),$D(t,!1),e.plan()},$D=function(t,e){function n(t){var n=t.__requireNewView;t.__requireNewView=!1;var u="_ec_"+t.id+"_"+t.type,h=!n&&a[u];if(!h){var c=Hr(t.type),p=e?mk.getClass(c.main,c.sub):wk.getClass(c.sub);h=new p,h.init(i,l),a[u]=h,o.push(h),s.add(h.group)}t.__viewId=h.__id=u,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&r.prepareView(h,t,i,l)}for(var i=t._model,r=t._scheduler,o=e?t._componentsViews:t._chartsViews,a=e?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;h>p;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(t,e){for(var n=0;n1)for(var a=0;o>a;a++)this._add&&this._add(r[a]);else 1===o&&this._add&&this._add(r);e[i]=null}},t.prototype._initIndexMap=function(t,e,n,i){for(var r=this._diffModeMultiple,o=0;oo;o++){var s=void 0,l=void 0,u=void 0,h=this.dimensions[a];if(h&&h.storeDimIndex===o)s=e?h.name:null,l=h.type,u=h.ordinalMeta,a++;else{var c=this.getSourceDimension(o);c&&(s=e?c.name:null,l=c.type)}r.push({property:s,type:l,ordinalMeta:u}),!e||null==s||h&&h.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=ZA[l]||"f",u&&(i+=u.uid),i+="$"}var p=this.source,d=[p.seriesLayoutBy,p.startIndex,i].join("$$");return{dimensions:r,hash:d}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;ea;a++){var s=a-i;this._nameList[a]=e[s],o&&NA(this,a)}},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList,a=i.getSource().sourceFormat,s=a===sI;if(s&&!i.pure)for(var l=[],u=t;e>u;u++){var h=i.getItem(u,l);if(!this.hasItemOption&&vr(h)&&(this.hasItemOption=!0),h){var c=h.name;null==r[u]&&null!=c&&(r[u]=Cr(c,null));var p=h.id;null==o[u]&&null!=p&&(o[u]=Cr(p,null))}}if(this._shouldMakeIdFromName())for(var u=t;e>u;u++)NA(this,u);OA(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){YA(t)?h(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=RA(this,this._nameDimIdx,e)),null==n&&(n=""),n},t.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},t.prototype.getId=function(t){return LA(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];return i?n.get(i.storeDimIndex,e):void 0},t.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];return i?n.getByRawIndex(i.storeDimIndex,e):void 0},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,e){var n=this,i=this._store;return M(t)?i.getValues(UA(t,function(t){return n._getStoreDimIndex(t)}),e):i.getValues(t)},t.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;i>n;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();n>e;e++)if(this.getName(e)===t)return e;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?KA:i},t.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},t.prototype.each=function(t,e,n){T(t)&&(n=e,e=t,t=[]);var i=n||this,r=UA(zA(t),this._getStoreDimIndex,this);this._store.each(r,i?jx(e,i):e)},t.prototype.filterSelf=function(t,e,n){T(t)&&(n=e,e=t,t=[]);var i=n||this,r=UA(zA(t),this._getStoreDimIndex,this);return this._store=this._store.filter(r,i?jx(e,i):e),this},t.prototype.selectRange=function(t){var e=this,n={},i=w(t),r=[];return v(i,function(i){var o=e._getStoreDimIndex(i);n[o]=t[i],r.push(o)}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(t,e,n){T(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},t.prototype.map=function(t,e,n,i){var r=n||i||this,o=UA(zA(t),this._getStoreDimIndex,this),a=EA(this);return a._store=this._store.map(o,r?jx(e,r):e),a},t.prototype.modify=function(t,e,n,i){var r=n||i||this,o=UA(zA(t),this._getStoreDimIndex,this);this._store.modify(o,r?jx(e,r):e)},t.prototype.downSample=function(t,e,n,i){var r=EA(this);return r._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),r},t.prototype.lttbDownSample=function(t,e){var n=EA(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new CC(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new VA(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(e){return LA(t,e)},function(t){return LA(e,t)})},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},YA(t)?h(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),M(r)?r=r.slice():YA(r)&&(r=h({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,YA(e)?h(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){YA(t)?h(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?h(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;NM(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){v(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:UA(this.dimensions,this._getDimInfo,this),this.hostModel)),BA(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];T(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(V(arguments)))})},t.internalField=function(){OA=function(t){var e=t._invertedIndicesMap;v(e,function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new jA(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}}}(),t}(),tP=function(){function t(t){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=t}return t}(),eP={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",fS).models[0],o=t.getReferringComponents("yAxis",fS).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),Gp(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Gp(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",fS).models[0];e.coordSysDims=["single"],n.set("single",r),Gp(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",fS).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),Gp(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Gp(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();v(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),Gp(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))})}},nP=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Kr(nP);var iP=0,rP=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++iP}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&y(i,Jp);return new t({categories:r,needCollect:!r,deduplication:n.dedplication!==!1})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!C(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Y(this.categories))},t}(),oP=function(t){function n(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new rP({})),M(i)&&(i=new rP({categories:y(i,function(t){return D(t)?t.value:t})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e(n,t),n.prototype.parse=function(t){return null==t?0/0:C(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},n.prototype.contain=function(t){return t=this.parse(t),ad(t,this._extent)&&null!=this._ordinalMeta.categories[t]},n.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),sd(t,this._extent)},n.prototype.scale=function(t){return t=Math.round(ld(t,this._extent)),this.getRawOrdinalNumber(t)},n.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},n.prototype.getMinorTicks=function(){},n.prototype.setSortInfo=function(t){if(null==t)return void(this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null);for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);a>r;++r){var s=e[r];n[r]=s,i[s]=r}for(var l=0;o>r;++r){for(;null!=i[l];)l++;n.push(l),i[l]=r}},n.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t=0&&t=t},n.prototype.getOrdinalMeta=function(){return this._ordinalMeta},n.prototype.calcNiceTicks=function(){},n.prototype.calcNiceExtent=function(){},n.type="ordinal",n}(nP);nP.registerClass(oP);var aP=Zi,sP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return e(n,t),n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return ad(t,this._extent)},n.prototype.normalize=function(t){return sd(t,this._extent)},n.prototype.scale=function(t){return ld(t,this._extent)},n.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},n.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},n.prototype.getInterval=function(){return this._interval},n.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=id(t)},n.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;var a=1e4;n[0]a)return[];var l=o.length?o[o.length-1].value:i[1];return n[1]>l&&o.push(t?{value:aP(l+e,r)}:{value:n[1]}),o},n.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;rs;){var c=aP(a.value+(s+1)*h);c>i[0]&&cr&&(r=-r,i.reverse());var o=ed(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},n.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=Math.abs(e[0]);t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=aP(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=aP(Math.ceil(e[1]/r)*r))},n.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},n.type="interval",n}(nP);nP.registerClass(sP);var lP="undefined"!=typeof Float32Array,uP=lP?Float32Array:Array,hP="__ec_stack_",cP=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]n&&(this._approxInterval=n);var o=dP.length,a=Math.min(cP(dP,this._approxInterval,0,o),o-1);this._interval=dP[a][1],this._minLevelUnit=dP[Math.max(a-1,0)][0]},n.prototype.parse=function(t){return k(t)?t:+tr(t)},n.prototype.contain=function(t){return ad(this.parse(t),this._extent)},n.prototype.normalize=function(t){return sd(this.parse(t),this._extent)},n.prototype.scale=function(t){return ld(t,this._extent)},n.type="time",n}(sP),dP=[["second",BC],["minute",EC],["hour",NC],["quarter-day",6*NC],["half-day",12*NC],["day",1.2*FC],["half-week",3.5*FC],["week",7*FC],["month",31*FC],["quarter",95*FC],["half-year",VC/2],["year",VC]];nP.registerClass(pP);var fP=nP.prototype,gP=sP.prototype,vP=Zi,yP=Math.floor,mP=Math.ceil,_P=Math.pow,xP=Math.log,wP=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new sP,e._interval=0,e}return e(n,t),n.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent(),r=gP.getTicks.call(this,t);return y(r,function(t){var e=t.value,r=Zi(_P(this.base,e));return r=e===n[0]&&this._fixMin?Ad(r,i[0]):r,r=e===n[1]&&this._fixMax?Ad(r,i[1]):r,{value:r}},this)},n.prototype.setExtent=function(t,e){var n=xP(this.base);t=xP(Math.max(0,t))/n,e=xP(Math.max(0,e))/n,gP.setExtent.call(this,t,e)},n.prototype.getExtent=function(){var t=this.base,e=fP.getExtent.call(this);e[0]=_P(t,e[0]),e[1]=_P(t,e[1]);var n=this._originalScale,i=n.getExtent();return this._fixMin&&(e[0]=Ad(e[0],i[0])),this._fixMax&&(e[1]=Ad(e[1],i[1])),e},n.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=xP(t[0])/xP(e),t[1]=xP(t[1])/xP(e),fP.unionExtent.call(this,t)},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=er(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Zi(mP(e[0]/i)*i),Zi(yP(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},n.prototype.calcNiceExtent=function(t){gP.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return t=xP(t)/xP(this.base),ad(t,this._extent)},n.prototype.normalize=function(t){return t=xP(t)/xP(this.base),sd(t,this._extent)},n.prototype.scale=function(t){return t=ld(t,this._extent),_P(this.base,t)},n.type="log",n}(nP),bP=wP.prototype;bP.getMinorTicks=gP.getMinorTicks,bP.getLabel=gP.getLabel,nP.registerClass(wP);var SP=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),0>a&&0>s&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[TP[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=MP[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),MP={min:"_determinedMin",max:"_determinedMax"},TP={min:"_dataMin",max:"_dataMax"},CP=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},t.prototype.getCoordSysModel=function(){},t}(),IP={isDimensionStacked:Yp,enableDataStack:Zp,getStackedDimension:Up},kP=(Object.freeze||Object)({createList:Yd,getLayoutRect:Hl,dataStack:IP,createScale:Ud,mixinAxisModelCommonMethods:jd,getECData:EM,createTextStyle:qd,createDimensions:Ep,createSymbol:fc,enableHoverEmphasis:Oa}),DP=[],AP={registerPreprocessor:pp,registerProcessor:dp,registerPostInit:fp,registerPostUpdate:gp,registerUpdateLifecycle:vp,registerAction:yp,registerCoordinateSystem:mp,registerLayout:xp,registerVisual:wp,registerTransform:PA,registerLoading:Sp,registerMap:Tp,registerImpl:tp,PRIORITY:FD,ComponentModel:tI,ComponentView:mk,SeriesModel:yk,ChartView:wk,registerComponentModel:function(t){tI.registerClass(t)},registerComponentView:function(t){mk.registerClass(t)},registerSeriesModel:function(t){yk.registerClass(t)},registerChartView:function(t){wk.registerClass(t)},registerSubTypeDefaulter:function(t,e){tI.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Vi(t,e)}},PP=1e-8,OP=[],LP=function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),RP=function(){function t(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return t}(),zP=function(){function t(t){this.type="linestring",this.points=t}return t}(),BP=function(t){function n(e,n,i){var r=t.call(this,e)||this;return r.type="geoJSON",r.geometries=n,r._center=i&&[i[0],i[1]],r}return e(n,t),n.prototype.calcCenter=function(){for(var t,e=this.geometries,n=0,i=0;in&&(t=r,n=a)}if(t)return ef(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},n.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var n=[1/0,1/0],i=[-1/0,-1/0],r=this.geometries;return v(r,function(e){"polygon"===e.type?tf(e.exterior,n,i,t):v(e.points,function(e){tf(e,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),e=new kw(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=e),e},n.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;r>i;i++){var o=n[i];if("polygon"===o.type){var a=o.exterior,s=o.interiors;if(Qd(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(Qd(s[l],t[0],t[1]))continue t;return!0}}}return!1},n.prototype.transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new kw(t,e,n,i),s=r.calculateTransform(a),l=this.geometries,u=0;u=n&&i>=t},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return ji(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),wf(n,i.count())),Wi(t,GP,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),wf(n,i.count()));var r=Wi(t,n,GP,e);return this.scale.scale(r)},t.prototype.pointToData=function(){},t.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=lf(this,e),i=n.ticks,r=y(i,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this),o=e.get("alignWithLabel");return bf(this,r,o,t.clamp),r},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var n=this.scale.getMinorTicks(e),i=y(n,function(t){return y(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return i},t.prototype.getViewLabels=function(){return sf(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return yf(this)},t}(),XP=2*Math.PI,YP=uM.CMD,UP=["top","right","bottom","left"],jP=[],qP=new _w,KP=new _w,$P=new _w,QP=new _w,JP=new _w,tO=[],eO=new _w,nO=["align","verticalAlign","width","height","fontSize"],iO=new Xb,rO=Lr(),oO=Lr(),aO=["x","y","rotation"],sO=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,i,r){var o=i.style,a=i.__hostTarget,s=a.textConfig||{},l=i.getComputedTransform(),u=i.getBoundingRect().plain();kw.applyTransform(u,u,l),l?iO.setLocalTransform(l):(iO.x=iO.y=iO.rotation=iO.originX=iO.originY=0,iO.scaleX=iO.scaleY=1);var h,c=i.__hostTarget;if(c){h=c.getBoundingRect().plain();var p=c.getComputedTransform();kw.applyTransform(h,h,p)}var d=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:d,seriesModel:n,dataIndex:t,dataType:e,layoutOption:r,computedLayoutOption:null,rect:u,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:d&&d.ignore,x:iO.x,y:iO.y,scaleX:iO.scaleX,scaleY:iO.scaleY,rotation:iO.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:s.position,attachedRot:s.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(T(i)||w(i).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var r=t.getTextContent(),o=EM(t);r&&!r.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,r,i)})},t.prototype.updateLayoutConfig=function(t){function e(t,e){return function(){Lf(t,e)}}for(var n=t.getWidth(),i=t.getHeight(),r=0;r=0&&n.attr(r.oldLayoutSelect),p(h,"emphasis")>=0&&n.attr(r.oldLayoutEmphasis)),us(n,l,e,s)}else if(n.attr(l),!gC(n).valueAnimation){var c=N(n.style.opacity,1);n.style.opacity=0,hs(n,{style:{opacity:c}},e,s)}if(r.oldLayout=l,n.states.select){var d=r.oldLayoutSelect={};Yf(d,l,aO),Yf(d,n.states.select,aO)}if(n.states.emphasis){var f=r.oldLayoutEmphasis={};Yf(f,l,aO),Yf(f,n.states.emphasis,aO)}Js(n,s,u,e,e)}if(i&&!i.ignore&&!i.invisible){var r=oO(i),o=r.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),us(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,hs(i,{style:{strokePercent:1}},e)),r.oldLayout=g}},t}(),lO=Lr();Kd(Uf);var uO=function(t){function n(e,n,i){var r=t.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null; +var o;i=i||Rb,"string"==typeof e?o=jf(e,n,i):D(e)&&(o=e,e=o.id),r.id=e,r.dom=o;var a=o.style;return a&&(q(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),r.painter=n,r.dpr=i,r}return e(n,t),n.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},n.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},n.prototype.setUnpainted=function(){this.__firstTimePaint=!0},n.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=jf("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},n.prototype.createRepaintRects=function(t,e,n,i){function r(t){if(t.isFinite()&&!t.isZero())if(0===o.length){var e=new kw(0,0,0,0);e.copy(t),o.push(e)}else{for(var n=!1,i=1/0,r=0,u=0;ug&&(i=g,r=u)}}if(s&&(o[r].union(t),n=!0),!n){var e=new kw(0,0,0,0);e.copy(t),o.push(e)}s||(s=o.length>=a)}}if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;for(var o=[],a=this.maxRepaintRectCount,s=!1,l=new kw(0,0,0,0),u=this.__startIndex;uo;o++){var a=t[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(hO)),i||(i=n.ctx,i.save()),Xc(i,a,r,o===e-1))}i&&i.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(hO)},t.prototype.paintOne=function(t,e){Zc(t,e)},t.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e,n),o=r.finished,a=r.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer(function(t){t.afterBrush&&t.afterBrush()});else{var s=this;Gw(function(){s._paintList(t,e,n,i)})}}},t.prototype._compositeManually=function(){var t=this.getLayer(cO).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},t.prototype._doPaintList=function(t,e,n){for(var i=this,r=[],o=this._opts.useDirtyRect,a=0;a15)break}}n.prevElClipPaths&&l.restore()};if(c)if(0===c.length)m=s.__endIndex;else for(var x=p.dpr,w=0;w0&&t>i[0]){for(s=0;r-1>s&&!(i[s]t);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?pO:0),this._needsManuallyCompositing),h.__builtin__||a("ZLevel "+u+" has been used by unkown layer "+h.id),h!==s&&(h.__used=!0,h.__startIndex!==o&&(h.__dirty=!0),h.__startIndex=o,h.__drawIndex=h.incremental?-1:o,e(o),s=h),i.__dirty&Nw&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,v(this._layers,function(t){t.setUnpainted()})},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?l(n[t],e,!0):n[t]=e;for(var i=0;is;s++){var u=a[s];Xc(n,u,o,s===l-1)}return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}(),gO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new hk(this),ch(this)},n.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),ch(this)},n.prototype.optionUpdated=function(){this._sourceManager.dirty()},n.prototype.getSourceManager=function(){return this._sourceManager},n.type="dataset",n.defaultOption={seriesLayoutBy:dI},n}(tI),vO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.type="dataset",n}(mk);Kd([$f,Qf]),Kd(Uf);var yO={average:function(t){for(var e=0,n=0,i=0;ie&&(e=t[n]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;nt&&(t=e),t},n.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},n.type="series.bar",n.dependencies=["grid","polar"],n.defaultOption=il(_O.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),n}(_O),wO=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return t}(),bO=function(t){function n(e){var n=t.call(this,e)||this;return n.type="sausage",n}return e(n,t),n.prototype.getDefaultShape=function(){return new wO},n.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?c>u-l:c>l-u;p||(l=u-(h?c:-c));var d=Math.cos(l),f=Math.sin(l),g=Math.cos(u),v=Math.sin(u);p?(t.moveTo(d*r+n,f*r+i),t.arc(d*s+n,f*s+i,a,-Math.PI+l,l,!h)):t.moveTo(d*o+n,f*o+i),t.arc(n,i,o,l,u,!h),t.arc(g*s+n,v*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&t.arc(n,i,r,u,l,h)},n}(xM),SO=Math.max,MO=Math.min,TO=function(t){function n(){var e=t.call(this)||this;return e.type=n.type,e._isFirstFrame=!0,e}return e(n,t),n.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},n.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},n.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},n.prototype.eachRendered=function(t){Hs(this._progressiveEls||this.group,t)},n.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e!==this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},n.prototype._renderNormal=function(t,e,n,i){function r(t){var e=PO[u.type](s,t),n=wg(u,o,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===u.type&&n.setShape("r",m),_[t]=n,n}var o,a=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,h=u.getBaseAxis();"cartesian2d"===u.type?o=h.isHorizontal():"polar"===u.type&&(o="angle"===h.dim);var c=t.isAnimationEnabled()?t:null,p=cg(t,u);p&&this._enableRealtimeSort(p,s,n);var d=t.get("clip",!0)||p,f=hg(u,s);a.removeClipPath();var g=t.get("roundCap",!0),v=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),m=y.get("borderRadius")||0,_=[],x=this._backgroundEls,w=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;s.diff(l).add(function(e){var n=s.getItemModel(e),i=PO[u.type](s,e,n);if(v&&r(e),s.hasValue(e)&&AO[u.type](i)){var l=!1;d&&(l=CO[u.type](f,i));var y=IO[u.type](t,s,e,i,o,c,h.model,!1,g);p&&(y.forceLabelAnimation=!0),vg(y,s,e,n,i,t,o,"polar"===u.type),w?y.attr({shape:i}):p?pg(p,c,y,i,e,o,!1,!1):hs(y,{shape:i},t,e),s.setItemGraphicEl(e,y),a.add(y),y.ignore=l}}).update(function(e,n){var i=s.getItemModel(e),S=PO[u.type](s,e,i);if(v){var M=void 0;0===x.length?M=r(n):(M=x[n],M.useStyle(y.getItemStyle()),"cartesian2d"===u.type&&M.setShape("r",m),_[e]=M);var T=PO[u.type](s,e),C=xg(o,T,u);us(M,{shape:C},c,e)}var I=l.getItemGraphicEl(n);if(!s.hasValue(e)||!AO[u.type](S))return void a.remove(I);var k=!1;if(d&&(k=CO[u.type](f,S),k&&a.remove(I)),I?gs(I):I=IO[u.type](t,s,e,S,o,c,h.model,!!I,g),p&&(I.forceLabelAnimation=!0),b){var D=I.getTextContent();if(D){var A=gC(D);null!=A.prevValue&&(A.prevValue=A.value)}}else vg(I,s,e,i,S,t,o,"polar"===u.type);w?I.attr({shape:S}):p?pg(p,c,I,S,e,o,!0,b):us(I,{shape:S},t,e,null),s.setItemGraphicEl(e,I),I.ignore=k,a.add(I)}).remove(function(e){var n=l.getItemGraphicEl(e);n&&fs(n,t,e)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new tS);S.removeAll();for(var M=0;M<_.length;++M)S.add(_[M]);a.add(S),this._backgroundEls=_,this._data=s},n.prototype._renderLarge=function(t){this._clear(),mg(t,this.group),this._updateLargeClip(t)},n.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),mg(e,this.group,this._progressiveEls,!0)},n.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)&&ng(t.coordinateSystem,!1,t),n=this.group;e?n.setClipPath(e):n.removeClipPath()},n.prototype._enableRealtimeSort=function(t,e,n){var i=this;if(e.count()){var r=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(e,t,n),this._isFirstFrame=!1;else{var o=function(t){var n=e.getItemGraphicEl(t),i=n&&n.shape;return i&&Math.abs(r.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(e,o,r,n)},n.getZr().on("rendered",this._onRendered)}}},n.prototype._dataSort=function(t,e,n){var i=[];return t.each(t.mapDimension(e.dim),function(t,e){var r=n(e);r=null==r?0/0:r,i.push({dataIndex:e,mappedValue:r,ordinalNumber:t})}),i.sort(function(t,e){return e.mappedValue-t.mappedValue}),{ordinalNumbers:y(i,function(t){return t.ordinalNumber})}},n.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,r=t.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;s>a;++a){var l=t.rawIndexOf(r,i.getRawOrdinalNumber(a)),u=0>l?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},n.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o>=r;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},n.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},n.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},n.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},n.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},n.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},n.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){fs(e,t,EM(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},n.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},n.type="bar",n}(wk),CO={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;0>n&&(e.x+=e.width,e.width=-e.width),0>i&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=SO(e.x,t.x),s=MO(e.x+e.width,r),l=SO(e.y,t.y),u=MO(e.y+e.height,o),h=a>s,c=l>u;return e.x=h&&a>r?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,0>n&&(e.x+=e.width,e.width=-e.width),0>i&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(0>n){var i=e.r;e.r=e.r0,e.r0=i}var r=MO(e.r,t.r),o=SO(e.r0,t.r0);e.r=r,e.r0=o;var a=0>r-o;if(0>n){var i=e.r;e.r=e.r0,e.r0=i}return a}},IO={cartesian2d:function(t,e,n,i,r,o){var a=new DM({shape:h({},i),z2:1});if(a.__dataIndex=n,a.name="item",o){var s=a.shape,l=r?"height":"width";s[l]=0}return a},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?bO:PT,h=new u({shape:i,z2:1});h.name="item";var c=gg(r);if(h.calculateTextPosition=ag(c,{isRoundCap:u===bO}),o){var p=h.shape,d=r?"r":"endAngle",f={};p[d]=r?0:i.startAngle,f[d]=i[d],(s?us:hs)(h,{shape:f},o)}return h}},kO=["x","y","width","height"],DO=["cx","cy","r","startAngle","endAngle"],AO={cartesian2d:function(t){return!dg(t,kO)},polar:function(t){return!dg(t,DO)}},PO={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=n?yg(n,i):0,o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}},OO=function(){function t(){}return t}(),LO=function(t){function n(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return e(n,t),n.prototype.getDefaultShape=function(){return new OO},n.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=0?n:null},30,!1);Kd(bg);var zO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.hasSymbolVisual=!0,e}return e(n,t),n.prototype.getInitialData=function(){return Kp(null,this,{useEncodeDefaulter:!0})},n.prototype.getLegendIcon=function(t){var e=new tS,n=fc("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=fc(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},n.type="series.line",n.dependencies=["grid","polar"],n.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},n}(yk),BO=function(t){function n(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return e(n,t),n.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=fc(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=Sg,this._symbolType=t,this.add(o)},n.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){ga(this.childAt(0))},n.prototype.downplay=function(){va(this.childAt(0))},n.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},n.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},n.prototype.updateData=function(t,e,i,r){this.silent=!1;var o=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,s=n.getSymbolSize(t,e),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(o,t,e,s,h)}else{var c=this.childAt(0);c.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?c.attr(p):us(c,p,a,e),gs(c)}if(this._updateCommon(t,e,s,i,r),l){var c=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,hs(c,p,a,e)}}u&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(t,e,n,i,r){function o(e){return I?t.getName(e):rg(t,e)}var a,s,l,u,c,p,d,f,g,v=this.childAt(0),y=t.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,l=i.selectItemStyle,u=i.focus,c=i.blurScope,d=i.labelStatesModels,f=i.hoverScale,g=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),_=m.getModel("emphasis");a=_.getModel("itemStyle").getItemStyle(),l=m.getModel(["select","itemStyle"]).getItemStyle(),s=m.getModel(["blur","itemStyle"]).getItemStyle(),u=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=Xs(m),f=_.getShallow("scale"),g=m.getShallow("cursor")}var x=t.getItemVisual(e,"symbolRotate");v.attr("rotation",(x||0)*Math.PI/180||0);var w=vc(t.getItemVisual(e,"symbolOffset"),n);w&&(v.x=w[0],v.y=w[1]),g&&v.attr("cursor",g);var b=t.getItemVisual(e,"style"),S=b.fill;if(v instanceof TM){var M=v.style;v.useStyle(h({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},b))}else v.useStyle(v.__isEmptyBrush?h({},b):b),v.style.decal=null,v.setColor(S,r&&r.symbolInnerColor),v.style.strokeNoScale=!0;var T=t.getItemVisual(e,"liftZ"),C=this._z2;null!=T?null==C&&(this._z2=v.z2,v.z2+=T):null!=C&&(v.z2=C,this._z2=null);var I=r&&r.useNameLabel;Zs(v,d,{labelFetcher:y,labelDataIndex:e,defaultText:o,inheritColor:S,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var k=v.ensureState("emphasis");k.style=a,v.ensureState("select").style=l,v.ensureState("blur").style=s;var D=null==f||f===!0?Math.max(1.1,3/this._sizeY):isFinite(f)&&f>0?+f:1;k.scaleX=this._sizeX*D,k.scaleY=this._sizeY*D,this.setSymbolScale(1),Ra(this,u,c,p)},n.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},n.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=EM(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&ps(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ps(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},n.getSymbolSize=function(t,e){return gc(t.getItemVisual(e,"symbolSize"))},n}(tS),EO=function(){function t(t){this.group=new tS,this._SymbolCtor=t||BO}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=Tg(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=Cg(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add(function(i){var r=u(i);if(Mg(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}}).update(function(h,c){var p=r.getItemGraphicEl(c),d=u(h);if(!Mg(t,d,h,e))return void n.remove(p);var f=t.getItemVisual(h,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),p=new o(t,h,s,l),p.setPosition(d);else{p.updateData(t,h,s,l);var v={x:d[0],y:d[1]};a?p.attr(v):us(p,v,i)}n.add(p),t.setItemGraphicEl(h,p)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)},i)}).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Cg(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Tg(n);for(var r=t.start;r0&&Og(n[2*r-2],n[2*r-1]);r--);for(;r>i&&Og(n[2*i],n[2*i+1]);i++);}for(;r>i;)i+=Lg(t,n,i,r,r,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},n.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path,o=r.data,a=uM.CMD,s="x"===e,l=[],u=0;u=y&&y>=0){var m=s?(p-i)*y+i:(c-n)*y+n;return s?[t,m]:[m,t]}n=c,i=p;break;case a.C:c=o[u++],p=o[u++],d=o[u++],f=o[u++],g=o[u++],v=o[u++];var _=s?pn(n,c,d,g,t,l):pn(i,p,f,v,t,l);if(_>0)for(var x=0;_>x;x++){var w=l[x];if(1>=w&&w>=0){var m=s?hn(i,p,f,v,w):hn(n,c,d,g,w);return s?[t,m]:[m,t]}}n=g,i=v}}},n}(xM),WO=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(VO),GO=function(t){function n(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return e(n,t),n.prototype.getDefaultShape=function(){return new WO},n.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&Og(n[2*o-2],n[2*o-1]);o--);for(;o>r&&Og(n[2*r],n[2*r+1]);r++);}for(;o>r;){var s=Lg(t,n,r,o,o,1,e.smooth,a,e.connectNulls);Lg(t,i,r+s-1,s,o,-1,e.stackedOnSmooth,a,e.connectNulls),r+=s+1,t.closePath()}},n}(xM),ZO=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(){var t=new tS,e=new EO;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},n.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,p=this._coordSys,d=this._symbolDraw,f=this._polyline,g=this._polygon,v=this._lineGroup,y=t.get("animation"),m=!l.isEmpty(),_=l.get("origin"),x=Ig(r,a,_),w=m&&Ng(r,a,x),b=t.get("showSymbol"),S=t.get("connectNulls"),M=b&&!h&&Wg(t,a,r),T=this._data; +T&&T.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),T.setItemGraphicEl(e,null))}),b||d.remove(),o.add(v);var C,I=h?!1:t.get("step");r&&r.getArea&&t.get("clip",!0)&&(C=r.getArea(),null!=C.width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var k=Hg(a,r,n)||a.getVisual("style")[a.getVisual("drawType")];if(f&&p.type===r.type&&I===this._step){m&&!g?g=this._newPolygon(u,w):g&&!m&&(v.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,r,Nl(k));var D=v.getClipPath();if(D){var A=qg(this,r,!1,t);hs(D,{shape:A.shape},t)}else v.setClipPath(qg(this,r,!0,t));b&&d.updateData(a,{isIgnore:M,clipShape:C,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Rg(this._stackedOnPoints,w)&&Rg(this._points,u)||(y?this._doUpdateAnimation(a,w,r,n,I,_,S):(I&&(u=Fg(u,r,I,S),w&&(w=Fg(w,r,I,S))),f.setShape({points:u}),g&&g.setShape({points:u,stackedOnPoints:w})))}else b&&d.updateData(a,{isIgnore:M,clipShape:C,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,r,C),I&&(u=Fg(u,r,I,S),w&&(w=Fg(w,r,I,S))),f=this._newPolyline(u),m?g=this._newPolygon(u,w):g&&(v.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,r,Nl(k)),v.setClipPath(qg(this,r,!0,t));var P=t.getModel("emphasis"),O=P.get("focus"),L=P.get("blurScope"),R=P.get("disabled");if(f.useStyle(c(s.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),Ba(f,t,"lineStyle"),f.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])){var z=f.getState("emphasis").style;z.lineWidth=+f.style.lineWidth+1}EM(f).seriesIndex=t.seriesIndex,Ra(f,O,L,R);var B=Eg(t.get("smooth")),E=t.get("smoothMonotone");if(f.setShape({smooth:B,smoothMonotone:E,connectNulls:S}),g){var N=a.getCalculationInfo("stackedOnSeries"),F=0;g.useStyle(c(l.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),N&&(F=Eg(N.get("smooth"))),g.setShape({smooth:B,stackedOnSmooth:F,smoothMonotone:E,connectNulls:S}),Ba(g,t,"areaStyle"),EM(g).seriesIndex=t.seriesIndex,Ra(g,O,L,R)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=V)}),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=w,this._points=u,this._step=I,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,f),g&&this.packEventData(t,g))},n.prototype.packEventData=function(t,e){EM(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},n.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Or(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel")||0,c=t.get("z")||0;s=new BO(r,o),s.x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else wk.prototype.highlight.call(this,t,e,n,i)},n.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Or(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else wk.prototype.downplay.call(this,t,e,n,i)},n.prototype._changePolyState=function(t){var e=this._polygon;aa(this._polyline,t),e&&aa(e,t)},n.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new HO({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},n.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new GO({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},n.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");T(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=T(u)?u(null):u;t.eachItemGraphicEl(function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,v=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-v[1]/180*Math.PI):(p=g.r0,d=g.r,f=v[0])}else{var y=n;i?(p=y.x,d=y.x+y.width,f=t.x):(p=y.y+y.height,d=y.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _=T(u)?u(o):l*m+h,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}})},n.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(jg(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new LM({z2:200}),s.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=Xg(a);l>=0&&(Zs(o,Xs(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?og(r,n):rg(r,t)},enableTextSetter:!0},Kg(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},n.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){1>t&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),v=f.inverse,y=e.shape,m=v?g?y.x:y.y+y.height:g?y.x+y.width:y.y,_=(g?d:0)*(v?-1:1),x=(g?0:-d)*(v?-1:1),w=g?"x":"y",b=Ug(u,m,w),S=b.range,M=S[1]-S[0],T=void 0;if(M>=1){if(M>1&&!c){var C=Yg(u,S[0]);s.attr({x:C[0]+_,y:C[1]+x}),r&&(T=h.getRawValue(S[0]))}else{var C=l.getPointOn(m,w);C&&s.attr({x:C[0]+_,y:C[1]+x});var I=h.getRawValue(S[0]),k=h.getRawValue(S[1]);r&&(T=Vr(n,p,I,k,b.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0,C=Yg(u,D);r&&(T=h.getRawValue(D)),s.attr({x:C[0]+_,y:C[1]+x})}r&&gC(s).setLabelText(T)}},n.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=Pg(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),c=h.current,p=h.stackedOnCurrent,d=h.next,f=h.stackedOnNext;if(r&&(c=Fg(h.current,n,r,a),p=Fg(h.stackedOnCurrent,n,r,a),d=Fg(h.next,n,r,a),f=Fg(h.stackedOnNext,n,r,a)),Bg(c,d)>3e3||l&&Bg(p,f)>3e3)return s.stopAnimation(),s.setShape({points:d}),void(l&&(l.stopAnimation(),l.setShape({points:d,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),us(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:p}),l.stopAnimation(),us(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],y=h.status,m=0;me[1]&&e.reverse(),e},n.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},n.prototype.setCategorySortInfo=function(t){return"category"!==this.type?!1:(this.model.option.categorySortInfo=t,void this.scale.setSortInfo(t))},n}(ZP),rL=Math.log,oL=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=eL,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){function n(t){var e,n=w(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=+n[o],s=t[a],l=s.model,u=s.scale;td(u)&&l.get("alignTicks")&&null==l.get("interval")?r.push(s):(zd(u,l),td(u)&&(e=s))}r.length&&(e||(e=r.pop(),zd(e.scale,e.model)),v(r,function(t){ov(t.scale,t.model,e.scale)}))}}var i=this._axesMap;this._updateScale(t,this.model),n(i.x),n(i.y);var r={};v(i.x,function(t){sv(i,"y",t,r)}),v(i.y,function(t){sv(i,"x",t,r)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){function i(){v(s,function(t){var e=t.isHorizontal(),n=e?[0,a.width]:[0,a.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),uv(t,e?a.x:a.y)})}var r=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),a=Hl(r,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var s=this._axesList;i(),o&&(v(s,function(t){if(!t.model.get(["axisLabel","inside"])){var e=Vd(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i)}}}),i()),v(this._coordsList,function(t){t.calcAffineTransform()})},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];return null!=n?n[e||0]:void 0},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}D(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0?"top":"bottom",i="center"):Ji(o-aL)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&aL>o?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),lL={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(ve(s,s,a),ve(l,l,a));var c=h({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new VT({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Ms(p.shape,p.style.lineWidth),p.anid="line",n.add(p);var d=e.get(["axisLine","symbol"]);if(null!=d){var f=e.get(["axisLine","symbolSize"]);C(d)&&(d=[d,d]),(C(f)||k(f))&&(f=[f,f]);var g=vc(e.get(["axisLine","symbolOffset"])||0,f),y=f[0],m=f[1];v([{rotate:t.rotation+Math.PI/2,offset:g[0],r:0},{rotate:t.rotation-Math.PI/2,offset:g[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(e,i){if("none"!==d[i]&&null!=d[i]){var r=fc(d[i],-y/2,-m/2,y,m,c.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}})}}},axisTickLabel:function(t,e,n,i){var r=vv(n,i,e,t),o=mv(n,i,e,t);if(cv(e,o,r),yv(n,i,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var a=Ff(y(o,function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}}));Gf(a)}},axisName:function(t,e,n,i){var r=E(t.axisName,e.get("name"));if(r){var o,a=e.get("nameLocation"),s=t.nameDirection,l=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,h=e.axis.getExtent(),c=h[0]>h[1]?-1:1,p=["start"===a?h[0]-c*u:"end"===a?h[1]+c*u:(h[0]+h[1])/2,fv(a)?t.labelOffset+s*u:0],d=e.get("nameRotate");null!=d&&(d=d*aL/180);var f;fv(a)?o=sL.innerTextLayout(t.rotation,null!=d?d:t.rotation,s):(o=hv(t.rotation,a,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(o.rotation)),!isFinite(f)&&(f=null)));var g=l.getFont(),v=e.get("nameTruncate",!0)||{},y=v.ellipsis,m=E(t.nameTruncateMaxWidth,v.maxWidth,f),_=new LM({x:p[0],y:p[1],rotation:o.rotation,silent:sL.isLabelSilent(e),style:Ys(l,{text:r,font:g,overflow:"truncate",width:m,ellipsis:y,fill:l.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:l.get("align")||o.textAlign,verticalAlign:l.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Fs({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var x=sL.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,EM(_).eventData=x}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}},uL={},hL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,n,i){this.axisPointerClass&&Tv(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},n.prototype.updateAxisPointer=function(t,e,n){this._doUpdateAxisPointerClass(t,n,!1)},n.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},n.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},n.prototype._doUpdateAxisPointerClass=function(t,e,i){var r=n.getAxisPointerClass(this.axisPointerClass);if(r){var o=Iv(t);o?(this._axisPointer||(this._axisPointer=new r)).render(t,o,e,i):this._disposeAxisPointer(e)}},n.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},n.registerAxisPointerClass=function(t,e){uL[t]=e},n.getAxisPointerClass=function(t){return t&&uL[t]},n.type="axis",n}(mk),cL=Lr(),pL=["axisLine","axisTickLabel","axisName"],dL=["splitArea","splitLine","minorSplitLine"],fL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.axisPointerClass="CartesianAxisPointer",e}return e(n,t),n.prototype.render=function(e,n,i,r){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tS,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),s=nv(a,e),l=new sL(e,h({handleAutoShown:function(){for(var t=a.coordinateSystem.getCartesians(),n=0;n=0},n.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},n.type="legend.plain",n.dependencies=["series"],n.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},n}(tI),ML=S,TL=v,CL=tS,IL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.newlineDisabled=!1,e}return e(n,t),n.prototype.init=function(){this.group.add(this._contentGroup=new CL),this.group.add(this._selectorGroup=new CL),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),p=Hl(l,u,h),d=this.layoutInner(t,r,p,i,a,s),f=Hl(c({width:d.width,height:d.height},l),u,h);this.group.x=f.x-d.x,this.group.y=f.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=zv(d,t))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll() +},n.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=Y(),u=e.get("selectedMode"),c=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&c.push(t.id)}),TL(e.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var p=new CL;return p.newline=!0,void s.add(p)}var d=n.getSeriesByName(a)[0];if(!l.get(a))if(d){var f=d.getData(),g=f.getVisual("legendLineStyle")||{},v=f.getVisual("legendIcon"),y=f.getVisual("style"),m=this._createItem(d,a,o,r,e,t,g,y,v,u,i);m.on("click",ML(Nv,a,null,i,c)).on("mouseover",ML(Vv,d.name,null,i,c)).on("mouseout",ML(Hv,d.name,null,i,c)),l.set(a,!0)}else n.eachRawSeries(function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var p=s.indexOfName(a),d=s.getItemVisual(p,"style"),f=s.getItemVisual(p,"legendIcon"),g=zn(d.fill);g&&0===g[3]&&(g[3]=.2,d=h(h({},d),{fill:Zn(g,"rgba")}));var v=this._createItem(n,a,o,r,e,t,{},d,f,u,i);v.on("click",ML(Nv,null,a,i,c)).on("mouseover",ML(Vv,null,a,i,c)).on("mouseout",ML(Hv,null,a,i,c)),l.set(a,!0)}},this)},this),r&&this._createSelector(r,e,i,o,a)},n.prototype._createSelector=function(t,e,n){var i=this.getSelectorGroup();TL(t,function(t){var r=t.type,o=new LM({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});i.add(o);var a=e.getModel("selectorLabel"),s=e.getModel(["emphasis","selectorLabel"]);Zs(o,{normal:a,emphasis:s},{defaultText:t.title}),Oa(o)})},n.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualDrawType,p=r.get("itemWidth"),d=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),v=i.get("symbolKeepAspect"),y=i.get("icon");l=y||l||"roundRect";var m=Bv(l,i,a,s,c,f,h),_=new CL,x=i.getModel("textStyle");if(!T(t.getLegendIcon)||y&&"inherit"!==y){var w="inherit"===y&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;_.add(Ev({itemWidth:p,itemHeight:d,icon:l,iconRotate:w,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:v}))}else _.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:v}));var b="left"===o?p+5:-5,S=o,M=r.get("formatter"),I=e;C(M)&&M?I=M.replace("{name}",null!=e?e:""):T(M)&&(I=M(e));var k=i.get("inactiveColor");_.add(new LM({style:Ys(x,{text:I,x:b,y:d/2,fill:f?x.getTextColor():k,align:S,verticalAlign:"middle"})}));var D=new DM({shape:_.getBoundingRect(),invisible:!0}),A=i.getModel("tooltip");return A.get("show")&&Fs({el:D,componentModel:r,itemName:e,itemTooltipOption:A.option}),_.add(D),_.eachChild(function(t){t.silent=!0}),D.silent=!u,this.getContentGroup().add(_),Oa(_),_.__legendDataIndex=n,_},n.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();QC(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){QC("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",v=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var y={x:0,y:0};return y[f]=l[f]+p+h[f],y[g]=Math.max(l[g],h[g]),y[v]=Math.min(0,h[v]+c[1-d]),y}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(mk),kL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},n.prototype.init=function(e,n,i){var r=Xl(e);t.prototype.init.call(this,e,n,i),Yv(this,e,r)},n.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),Yv(this,this.option,e)},n.type="legend.scroll",n.defaultOption=il(SL.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),n}(SL),DL=tS,AL=["width","height"],PL=["x","y"],OL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.newlineDisabled=!0,e._currentIndex=0,e}return e(n,t),n.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new DL),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new DL)},n.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},n.prototype.renderInner=function(e,n,i,r,o,a,s){function l(t,e){var i=t+"DataIndex",o=Rs(n.get("pageIcons",!0)[n.getOrient().name][e],{onclick:jx(u._pageGo,u,i,n,r)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});o.name=t,h.add(o)}var u=this;t.prototype.renderInner.call(this,e,n,i,r,o,a,s);var h=this._controllerGroup,c=n.get("pageIconSize",!0),p=M(c)?c:[c,c];l("pagePrev",0);var d=n.getModel("pageTextStyle");h.add(new LM({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),l("pageNext",1)},n.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getSelectorGroup(),l=t.getOrient().index,u=AL[l],h=PL[l],c=AL[1-l],p=PL[1-l];r&&QC("horizontal",a,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=a.getBoundingRect(),g=[-f.x,-f.y],v=s(n);r&&(v[u]=n[u]-f[u]-d);var y=this._layoutContentAndController(t,i,v,l,u,c,p,h);if(r){if("end"===o)g[l]+=y[u]+d;else{var m=f[u]+d;g[l]-=m,y[h]-=m}y[u]+=f[u]+d,g[1-l]+=y[p]+y[c]/2-f[c]/2,y[c]=Math.max(y[c],f[c]),y[p]=Math.min(y[p],f[p]+g[1-l]),a.x=g[0],a.y=g[1],a.markRedraw()}return y},n.prototype._layoutContentAndController=function(t,e,n,i,r,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,h=this._controllerGroup;QC(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),QC("horizontal",h,t.get("pageButtonItemGap",!0));var c=l.getBoundingRect(),p=h.getBoundingRect(),d=this._showController=c[r]>n[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],v=[-p.x,-p.y],y=N(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?v[i]+=n[r]-p[r]:g[i]+=p[r]+y}v[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(v);var _={x:0,y:0};if(_[r]=d?n[r]:c[r],_[o]=Math.max(c[o],p[o]),_[a]=Math.min(0,p[a]+v[1-i]),u.__rectSize=n[r],d){var x={x:0,y:0};x[r]=Math.max(n[r]-p[r]-y,0),x[o]=_[o],u.setClipPath(new DM({shape:x})),u.__rectSize=x[r]}else h.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return null!=w.pageIndex&&us(l,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),_},n.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},n.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;v(["pagePrev","pageNext"],function(i){var r=i+"DataIndex",o=null!=e[r],a=n.childOfName(i);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",C(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},n.prototype._getPageInfo=function(t){function e(t){if(t){var e=t.getBoundingRect(),n=e[l]+t[l];return{s:n,e:n+e[s],i:t.__legendDataIndex}}}function n(t,e){return t.e>=e&&t.s<=e+o}var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),o=this._containerGroup.__rectSize,a=t.getOrient().index,s=AL[a],l=PL[a],u=this._findTargetItemIndex(i),h=r.children(),c=h[u],p=h.length,d=p?1:0,f={contentPosition:[r.x,r.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return f;var g=e(c);f.contentPosition[a]=-g.s;for(var v=u+1,y=g,m=g,_=null;p>=v;++v)_=e(h[v]),(!_&&m.e>y.s+o||_&&!n(_,y.s))&&(y=m.i>y.i?m:_,y&&(null==f.pageNextDataIndex&&(f.pageNextDataIndex=y.i),++f.pageCount)),m=_;for(var v=u-1,y=g,m=g,_=null;v>=-1;--v)_=e(h[v]),_&&n(m,_.s)||!(y.ia)return!0;if(o){var s=Cv(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return n===!0},t.prototype.makeElOption=function(){},t.prototype.createPointerEl=function(t,e){var n=e.pointer;if(n){var i=LL(t).pointerEl=new hC[n.type](RL(e.pointer));t.add(i)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=LL(t).labelEl=new LM(RL(e.label));t.add(r),$v(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=LL(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=LL(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),$v(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=Rs(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){gw(t.event)},onmousedown:zL(this._onHandleDragMove,this,0,0),drift:zL(this._onHandleDragMove,this),ondragend:zL(this._onHandleDragEnd,this)}),n.add(i)),Jv(i,e,!1),i.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");M(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,Uh(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},t.prototype._moveHandleToValue=function(t,e){qv(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Qv(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Qv(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Qv(i)),LL(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),jh(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},t}(),EL=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=ly(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=ty(i),c=NL[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=nv(a.model,n);oy(e,t,p,n,i,r)},n.prototype.getHandleTransform=function(t,e,n){var i=nv(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=ry(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,e,n){var i=n.axis,r=i.grid,o=i.getGlobalExtent(!0),a=ly(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=[t.x,t.y];l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(a[1]+a[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}},n}(BL),NL={line:function(t,e,n){var i=ay([e,n[0]],[e,n[1]],uy(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:sy([e-i/2,n[0]],[i,r],uy(t))}}},FL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="axisPointer",n.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},n}(tI),VL=Lr(),HL=v,WL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";hy("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},n.prototype.remove=function(t,e){vy("axisPointer",e)},n.prototype.dispose=function(t,e){vy("axisPointer",e)},n.type="axisPointer",n}(mk),GL=Lr(),ZL=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="tooltip",n.dependencies=["axisPointer"],n.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},n}(tI),XL=Py(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),YL=Py(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),UL=Oy(YL,"transition"),jL=Oy(XL,"transform"),qL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Cx.transform3dSupported?"will-change:transform;":""),KL=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Cx.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;Vy(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler,n=r.painter.getViewportRoot();Ae(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=Ly(e,"position"),i=e.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative");var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,r=this._styleCoord;n.innerHTML?i.cssText=qL+Fy(t,!this._firstShow,this._longHide)+Ey(r[0],r[1],!0)+("border-color:"+Nl(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){var o=this.el;if(null==t)return void(o.innerHTML="");var a="";if(C(r)&&"item"===n.get("trigger")&&!Ay(n)&&(a=zy(n,i,r)),C(t))o.innerHTML=t+a;else if(t){o.innerHTML="",M(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},n.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})})}},n.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!Cx.node&&n.getDom()){var r=Xy(i,n);this._ticket="";var o=i.dataByCoordSys,a=Ky(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=QL;l.x=i.x,l.y=i.y,l.update(),EM(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=yy(i,e),h=u.point[0],c=u.point[1];null!=h&&null!=c&&this._tryShow({offsetX:h,offsetY:c,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},n.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Xy(i,n))},n.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),u=Zy([l.getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel);if("axis"===u.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}}},n.prototype._tryShow=function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(n){this._lastDataByCoordSys=null;var o,a;pc(n,function(t){return null!=EM(t).dataIndex?(o=t,!0):null!=EM(t).tooltipConfig?(a=t,!0):void 0},!0),o?this._showSeriesItemTooltip(t,o,e):a?this._showComponentItemTooltip(t,a,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},n.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=jx(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},n.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=Zy([e.tooltipOption],i),a=this._renderMode,s=[],l=gh("section",{blocks:[],noHeader:!0}),u=[],c=new fk;v(t,function(t){v(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=iy(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),p=gh("section",{header:o,noHeader:!G(o),sortBlocks:!0,blocks:[]});l.blocks.push(p),v(t.seriesDataIndices,function(l){var d=n.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,g=d.getDataParams(f);if(!(g.dataIndex<0)){g.axisDim=t.axisDim,g.axisIndex=t.axisIndex,g.axisType=t.axisType,g.axisId=t.axisId,g.axisValue=Fd(e.axis,{value:r}),g.axisValueLabel=o,g.marker=c.makeTooltipMarker("item",Nl(g.color),a);var v=qu(d.formatTooltip(f,!0,null)),y=v.frag;if(y){var m=Zy([d],i).get("valueFormatter");p.blocks.push(m?h({valueFormatter:m},y):y)}v.text&&u.push(v.text),s.push(g)}})}})}),l.blocks.reverse(),u.reverse();var p=e.position,d=o.get("order"),f=wh(l,c,a,d,n.get("useUTC"),o.get("textStyle"));f&&u.unshift(f);var g="richText"===a?"\n\n":"
",y=u.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,p,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,y,s,Math.random()+"",r[0],r[1],p,null,c)})},n.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=EM(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),p=this._renderMode,d=t.positionDefault,f=Zy([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=f.get("trigger");if(null==g||"item"===g){var v=s.getDataParams(l,u),y=new fk;v.marker=y.makeTooltipMarker("item",Nl(v.color),p);var m=qu(s.formatTooltip(l,!1,u)),_=f.get("order"),x=f.get("valueFormatter"),w=m.frag,b=w?wh(x?h({valueFormatter:x},w):w,y,p,_,i.get("useUTC"),f.get("textStyle")):m.text,S="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,b,v,S,t.offsetX,t.offsetY,t.position,t.target,y)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},n.prototype._showComponentItemTooltip=function(t,e,n){var i=EM(e),r=i.tooltipConfig,o=r.option||{};if(C(o)){var a=o;o={content:a,formatter:a}}var l=[o],u=this._ecModel.getComponent(i.componentMainType,i.componentIndex);u&&l.push(u),l.push({formatter:o.content});var h=t.positionDefault,c=Zy(l,this._tooltipModel,h?{position:h}:null),p=c.get("content"),d=Math.random()+"",f=new fk;this._showOrMove(c,function(){var n=s(c.get("formatterParams")||{});this._showTooltipContent(c,p,n,d,t.offsetX,t.offsetY,t.position,e,f)}),n({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(h)if(C(h)){var f=t.ecModel.get("useUTC"),g=M(n)?n[0]:n,v=g&&g.axisType&&g.axisType.indexOf("time")>=0;c=h,v&&(c=pl(g.axisValue,c,f)),c=Rl(c,n,!0)}else if(T(h)){var y=jx(function(e,i){e===this._ticket&&(u.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,y)}else c=h;u.setContent(c,l,t,d,a),u.show(t,d),this._updatePosition(t,a,r,o,u,n,s)}},n.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||M(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:M(e)?void 0:{color:i||e.color||e.borderColor}},n.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),T(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),M(e))n=Gi(e[0],s),i=Gi(e[1],l);else if(D(e)){var d=e;d.width=u[0],d.height=u[1];var f=Hl(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(C(e)&&a){var g=jy(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{var g=Yy(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=qy(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=qy(c)?u[1]/2:"bottom"===c?u[1]:0),Ay(t)){var g=Uy(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},n.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&v(n,function(n,o){var a=n.dataByAxis||[],s=t[o]||{},l=s.dataByAxis||[];r=r&&a.length===l.length,r&&v(a,function(t,n){var o=l[n]||{},a=t.seriesDataIndices||[],s=o.seriesDataIndices||[];r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===s.length,r&&v(a,function(t,e){var n=s[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}),i&&v(t.seriesDataIndices,function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},n.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},n.prototype.dispose=function(t,e){!Cx.node&&e.getDom()&&(jh(this,"_updatePosition"),this._tooltipContent.dispose(),vy("itemTooltip",e))},n.type="tooltip",n}(mk);Kd($y);var tR=["x","y","radius","angle","single"],eR=["cartesian2d","polar","singleAxis"],nR=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),iR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return e(n,t),n.prototype.init=function(t,e,n){var i=nm(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},n.prototype.mergeOption=function(t){var e=nm(t);l(this.option,t,!0),l(this.settledOption,e,!0),this._doInit(e)},n.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;v([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},n.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=Y(),n=this._fillSpecifiedTargetAxis(e);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this) +},n.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return v(tR,function(n){var i=this.getReferringComponents(Jy(n),gS);if(i.specified){e=!0;var r=new nR;v(i.models,function(t){r.add(t.componentIndex)}),t.set(n,r)}},this),e},n.prototype._fillAutoTargetAxisByOrient=function(t,e){function n(e,n){var i=e[0];if(i){var o=new nR;if(o.add(i.componentIndex),t.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",fS).models[0];a&&v(e,function(t){i.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",fS).models[0]&&o.add(t.componentIndex)})}}}var i=this.ecModel,r=!0;if(r){var o="vertical"===e?"y":"x",a=i.findComponents({mainType:o+"Axis"});n(a,o)}if(r){var a=i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}});n(a,"single")}r&&v(tR,function(e){if(r){var n=i.findComponents({mainType:Jy(e),filter:function(t){return"category"===t.get("type",!0)}});if(n[0]){var o=new nR;o.add(n[0].componentIndex),t.set(e,o),r=!1}}},this)},n.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){!t&&(t=e)},this),"y"===t?"vertical":"horizontal"},n.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},n.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");v([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")})},n.prototype.noTarget=function(){return this._noTarget},n.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(Jy(e),n))},this),t},n.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){v(n.indexList,function(n){t.call(e,i,n)})})},n.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);return n?n.__dzAxisProxy:void 0},n.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);return n&&n.indexMap[e]?this.ecModel.getComponent(Jy(t),e):void 0},n.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;v([["start","startValue"],["end","endValue"]],function(i){(null!=t[i[0]]||null!=t[i[1]])&&(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},n.prototype.setCalculatedRange=function(t){var e=this.option;v(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},n.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},n.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},n.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i3?1.4:r>1?1.2:1.1,l=i>0?s:1/s;hm(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i),h=(i>0?1:-1)*(u>3?.4:u>1?.15:.05);hm(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:o,originY:a,isAvailableBehavior:null})}}},n.prototype._pinchHandler=function(t){if(!lm(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;hm(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},n}(aw),lR=Lr(),uR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return e(n,t),n.prototype.render=function(e,n,i){return t.prototype.render.apply(this,arguments),e.noTarget()?void this._clear():(this.range=e.getPercentRange(),void dm(i,e,{pan:jx(hR.pan,this),zoom:jx(hR.zoom,this),scrollMove:jx(hR.scrollMove,this)}))},n.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){fm(this.api,this.dataZoomModel),this.range=null},n.type="dataZoom.inside",n}(oR),hR={zoom:function(t,e,n,i){var r=this.range,o=r.slice(),a=t.axisModels[0];if(a){var s=cR[e](null,[i.originX,i.originY],a,n,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return im(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:wm(function(t,e,n,i,r,o){var a=cR[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:wm(function(t,e,n,i,r,o){var a=cR[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n);return a.signal*(t[1]-t[0])*o.scrollDelta})},cR={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},pR=v,dR=Xi,fR=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(Qy(e)){var n=Jy(this._dimName),i=e.getReferringComponents(n,fS).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return s(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){function e(t,e,n,i,r){var a=r?"Span":"ValueSpan";im(0,t,n,"all",h["min"+a],h["max"+a]);for(var s=0;2>s;s++)e[s]=Wi(t[s],n,i,!0),r&&(e[s]=o.parse(e[s]))}var n,i=this._dataExtent,r=this.getAxisModel(),o=r.axis.scale,a=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];pR(["start","end"],function(e,r){var h=t[e],c=t[e+"Value"];"percent"===a[r]?(null==h&&(h=s[r]),c=o.parse(Wi(h,s,i))):(n=!0,c=null==c?i[r]:o.parse(c),h=Wi(c,i,s)),u[r]=c,l[r]=h}),dR(u),dR(l);var h=this._minMaxSpan;return n?e(u,l,i,s,!1):e(l,u,s,i,!0),{valueWindow:u,percentWindow:l}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=bm(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&pR(i,function(t){var i=t.getData(),a=i.mapDimensionsAll(n);if(a.length){if("weakFilter"===r){var s=i.getStore(),l=y(a,function(t){return i.getDimensionIndex(t)},i);i.filterSelf(function(t){for(var e,n,i,r=0;ro[1];if(h&&!c&&!p)return!0;h&&(i=!0),c&&(e=!0),p&&(n=!0)}return i&&e&&n})}else pR(a,function(n){if("empty"===r)t.setData(i=i.map(n,function(t){return e(t)?t:0/0}));else{var a={};a[n]=o,i.selectRange(a)}});pR(a,function(t){i.setApproximateExtent(o,t)})}})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;pR(["min","max"],function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Wi(n[0]+o,n,[0,100],!0):null!=r&&(o=Wi(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=ji(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}(),gR={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=t.getComponent(Jy(i),r);e(i,r,o,n)})})}e(function(t,e,n){n.__dzAxisProxy=null});var n=[];e(function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new fR(e,i,o,t),n.push(r.__dzAxisProxy))});var i=Y();return v(n,function(t){v(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(e,n){t.getAxisProxy(e,n).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}},vR=!1,yR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="dataZoom.slider",n.layoutMode="box",n.defaultOption=il(iR.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),n}(iR),mR=DM,_R=7,xR=1,wR=30,bR=7,SR="horizontal",MR="vertical",TR=5,CR=["line","bar","candlestick","scatter"],IR={easing:"cubicOut",duration:100,delay:0},kR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._displayables={},e}return e(n,t),n.prototype.init=function(t,e){this.api=e,this._onBrush=jx(this._onBrush,this),this._onBrushEnd=jx(this._onBrushEnd,this)},n.prototype.render=function(e,n,i,r){return t.prototype.render.apply(this,arguments),Uh(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1?void this.group.removeAll():e.noTarget()?(this._clear(),void this.group.removeAll()):(r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),void this._updateView())},n.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){jh(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},n.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new tS;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},n.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect"),i=n?bR:0,r=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},a=this._orient===SR?{right:o.width-r.x-r.width,top:o.height-wR-_R-i,width:r.width,height:wR}:{right:_R,top:r.y,width:wR,height:r.height},s=Xl(t.option);v(["right","top","width","height"],function(t){"ph"===s[t]&&(s[t]=a[t])});var l=Hl(s,o);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===MR&&this._size.reverse()},n.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==SR||r?n===SR&&r?{scaleY:a?1:-1,scaleX:-1}:n!==MR||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},n.prototype._getViewExtent=function(){return[0,this._size[0]]},n.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new mR({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new mR({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:jx(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},n.prototype._renderDataShadow=function(){function t(t){var e=x.getModel(t?"selectedDataBackground":"dataBackground"),n=new tS,i=new zT({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new ET({shape:{points:u},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var n=this._size,i=this._shadowSize||[],r=e.series,o=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),s=a&&o.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(null!=s){var l=this._shadowPolygonPts,u=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(s),c=.3*(h[1]-h[0]);h=[h[0]-c,h[1]+c];var p,d=[0,n[1]],f=[0,n[0]],g=[[n[0],0],[0,0]],v=[],y=f[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]);o.each([s],function(t,e){if(_>0&&e%_)return void(m+=y);var n=null==t||isNaN(t)||""===t,i=n?0:Wi(t,h,d,!0);n&&!p&&e?(g.push([g[g.length-1][0],0]),v.push([v[v.length-1][0],0])):!n&&p&&(g.push([m,0]),v.push([m,0])),g.push([m,i]),v.push([m,i]),m+=y,p=n}),l=this._shadowPolygonPts=g,u=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=s,this._shadowSize=[n[0],n[1]];for(var x=this.dataZoomModel,w=0;3>w;w++){var b=t(1===w);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}},n.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(r,o){var a=t.getAxisProxy(r,o).getTargetSeriesModels();v(a,function(t){if(!(n||e!==!0&&p(CR,t.get("type"))<0)){var a,s=i.getComponent(Jy(r),o).axis,l=Cm(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}},this)},this),n}},n.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new mR({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new mR({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:xR,fill:"rgba(0,0,0,0)"}})),v([0,1],function(e){var o=a.get("handleIcon");!aD[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=fc(o,-1,0,2,2,null,!0);s.attr({cursor:Im(this._orient),draggable:!0,drift:jx(this._onDragMove,this,e),ondragend:jx(this._onDragEnd,this),onmouseover:jx(this._showDataInfo,this,!0),onmouseout:jx(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Gi(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Oa(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new LM({silent:!0,invisible:!0,style:Ys(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))},this);var c=h;if(u){var p=Gi(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new DM({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=fc(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));c=e.moveZone=new DM({invisible:!0,shape:{y:o[1]-y,height:p+y}}),c.on("mouseover",function(){s.enterEmphasis(d)}).on("mouseout",function(){s.leaveEmphasis(d)}),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:Im(this._orient),drift:jx(this._onDragMove,this,"all"),ondragstart:jx(this._showDataInfo,this,!0),ondragend:jx(this._onDragEnd,this),onmouseover:jx(this._showDataInfo,this,!0),onmouseout:jx(this._showDataInfo,this,!1)})},n.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Wi(t[0],[0,100],e,!0),Wi(t[1],[0,100],e,!0)]},n.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];im(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Wi(o.minSpan,a,r,!0):null,null!=o.maxSpan?Wi(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Xi([Wi(i[0],r,a,!0),Wi(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},n.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Xi(n.slice()),r=this._size;v([0,1],function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},n.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new _w(e,n),this._brushing=!0,this._brushStartTime=+new Date},n.prototype._onBrushEnd=function(){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var e=t.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(e.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Xi([Wi(e.x,i,r,!0),Wi(e.x+e.width,i,r,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)}}}},n.prototype._onBrush=function(t){this._brushing&&(gw(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},n.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new mR({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},n.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?IR:null,start:e[0],end:e[1]})},n.prototype._findCoordRect=function(){var t,e=em(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},n.type="dataZoom.slider",n}(oR);Kd(Dm);var DR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="dataZoom.select",n}(iR),AR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="dataZoom.select",n}(oR),PR=function(){function t(){}return t}(),OR={},LR=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;v(this.option.feature,function(t,n){var i=Om(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),l(t,i.defaultOption))})},n.type="toolbox",n.layoutMode={type:"box",ignoreSize:!0},n.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},n}(tI),RR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(t,e,n,i){function r(r,a){var s,l=c[r],p=c[a],d=u[l],f=new CC(d,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===l&&(d.title=i.newTitle),l&&!p){if(Lm(l))s={onclick:f.option.onclick,featureName:l};else{var g=Om(l);if(!g)return;s=new g}h[l]=s}else if(s=h[p],!s)return;s.uid=tl("toolbox-feature"),s.model=f,s.ecModel=e,s.api=n;var v=s instanceof PR;return!l&&p?void(v&&s.dispose&&s.dispose(e,n)):!f.get("show")||v&&s.unusable?void(v&&s.remove&&s.remove(e,n)):(o(f,s,l),f.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?ga:va)(i[t])},void(s instanceof PR&&s.render&&s.render(f,e,n,i)))}function o(i,r,o){var u,h,c=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=r instanceof PR&&r.getIcons?r.getIcons():i.get("icon"),f=i.get("title")||{};C(d)?(u={},u[o]=d):u=d,C(f)?(h={},h[o]=f):h=f;var g=i.iconPaths={};v(u,function(o,u){var d=Rs(o,{},{x:-s/2,y:-s/2,width:s,height:s});d.setStyle(c.getItemStyle());var f=d.ensureState("emphasis");f.style=p.getItemStyle();var v=new LM({style:{text:h[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null},ignore:!0});d.setTextContent(v),Fs({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",function(){var e=p.getItemStyle(),i=l?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";v.setStyle({fill:p.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),v.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),v.hide()}),("emphasis"===i.get(["iconStatus",u])?ga:va)(d),a.add(d),d.on("click",jx(r.onclick,r,e,n,u)),g[u]=d})}var a=this.group;if(a.removeAll(),t.get("show")){var s=+t.get("itemSize"),l="vertical"===t.get("orient"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];v(u,function(t,e){c.push(e)}),new VA(this._featureNames||[],c).add(r).update(r).remove(S(r,null)).execute(),this._featureNames=c,Rv(a,t,n),a.add(zv(a.getBoundingRect(),t)),l||a.eachChild(function(t){var e=t.__title,i=t.ensureState("emphasis"),r=i.textConfig||(i.textConfig={}),o=t.getTextContent(),l=o&&o.ensureState("emphasis");if(l&&!T(l)&&e){var u=l.style||(l.style={}),h=wi(e,LM.makeFont(u)),c=t.x+a.x,p=t.y+a.y+s,d=!1;p+h.height>n.getHeight()&&(r.position="top",d=!0);var f=d?-5-h.height:s+10;c+h.width/2>n.getWidth()?(r.position=["100%",f],u.align="right"):c-h.width/2<0&&(r.position=[0,f],u.align="left")}})}},n.prototype.updateView=function(t,e,n,i){v(this._features,function(t){t instanceof PR&&t.updateView&&t.updateView(t.model,e,n,i)})},n.prototype.remove=function(t,e){v(this._features,function(n){n instanceof PR&&n.remove&&n.remove(t,e)}),this.group.removeAll()},n.prototype.dispose=function(t,e){v(this._features,function(n){n instanceof PR&&n.dispose&&n.dispose(t,e)})},n.type="toolbox",n}(mk),zR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Cx.browser;if(T(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||r){var h=a.split(","),c=h[0].indexOf("base64")>-1,p=r?decodeURIComponent(h[1]):h[1];c&&(p=window.atob(p));var d=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var f=p.length,g=new Uint8Array(f);f--;)g[f]=p.charCodeAt(f);var v=new Blob([g]);window.navigator.msSaveOrOpenBlob(v,d)}else{var y=document.createElement("iframe");document.body.appendChild(y);var m=y.contentWindow,_=m.document;_.open("image/svg+xml","replace"),_.write(p),_.close(),m.focus(),_.execCommand("SaveAs",!0,d),document.body.removeChild(y)}}else{var x=n.get("lang"),w='',b=window.open();b.document.write(w),b.document.title=i}},n.getDefaultOption=function(t){var e={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}; +return e},n}(PR),BR="__ec_magicType_stack__",ER=[["line","bar"],["stack"]],NR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return v(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},n.getDefaultOption=function(t){var e={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return e},n.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(FR[n]){var o={series:[]},a=function(t){var e=t.subType,r=t.id,a=FR[n](e,r,t,i);a&&(c(a,t.option),o.series.push(a));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim,h=u+"Axis",p=t.getReferringComponents(h,fS).models[0],d=p.componentIndex;o[h]=o[h]||[];for(var f=0;d>=f;f++)o[h][d]=o[h][d]||{};o[h][d].boundaryGap="bar"===n}}};v(ER,function(t){p(t,n)>=0&&v(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},a);var s,u=n;"stack"===n&&(s=l({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(u="tiled")),e.dispatchAction({type:"changeMagicType",currentType:u,newOption:o,newTitle:s,featureName:"magicType"})}},n}(PR),FR={line:function(t,e,n,i){return"bar"===t?l({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0):void 0},bar:function(t,e,n,i){return"line"===t?l({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0):void 0},stack:function(t,e,n,i){var r=n.get("stack")===BR;return"line"===t||"bar"===t?(i.setIconStatus("stack",r?"normal":"emphasis"),l({id:e,stack:r?"":BR},i.get(["option","stack"])||{},!0)):void 0}};yp({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var VR=new Array(60).join("-"),HR=" ",WR=new RegExp("["+HR+"]+","g"),GR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.onclick=function(t,e){function n(){i.removeChild(o),x._dom=null}setTimeout(function(){e.dispatchAction({type:"hideTip"})});var i=e.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin:10px 20px",a.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="overflow:auto";var h=r.get("optionToContent"),c=r.get("contentToOption"),p=Em(t);if(T(h)){var d=h(e.getOption());C(d)?l.innerHTML=d:O(d)&&l.appendChild(d)}else{u.readOnly=r.get("readOnly");var f=u.style;f.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",f.color=r.get("textColor"),f.borderColor=r.get("textareaBorderColor"),f.backgroundColor=r.get("textareaColor"),u.value=p.value,l.appendChild(u)}var g=p.meta,v=document.createElement("div");v.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),_=document.createElement("div");y+=";background-color:"+r.get("buttonColor"),y+=";color:"+r.get("buttonTextColor");var x=this;Oe(m,"click",n),Oe(_,"click",function(){if(null==c&&null!=h||null!=c&&null==h)return void n();var t;try{t=T(c)?c(l,e.getOption()):Wm(u.value,g)}catch(i){throw n(),new Error("Data view format error "+i)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),m.innerHTML=s[1],_.innerHTML=s[2],_.style.cssText=m.style.cssText=y,!r.get("readOnly")&&v.appendChild(_),v.appendChild(m),o.appendChild(a),o.appendChild(l),o.appendChild(v),l.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},n.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},n.prototype.dispose=function(t,e){this.remove(t,e)},n.getDefaultOption=function(t){var e={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return e},n}(PR);yp({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];v(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var r=i.get("data");n.push({name:t.name,data:Gm(t.data,r)})}else n.push(h({type:"scatter"},t))}),e.mergeOption(c({series:n},t.newOption))});var ZR=v,XR=Lr(),YR=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.onclick=function(t,e){Ym(t),e.dispatchAction({type:"restore",from:this.uid})},n.getDefaultOption=function(t){var e={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return e},n}(PR);yp({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var UR=!0,jR=Math.min,qR=Math.max,KR=Math.pow,$R=1e4,QR=6,JR=6,tz="globalPan",ez={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},nz={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},iz={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},rz=0,oz=function(t){function n(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new tS,n._uid="brushController_"+rz++,v(az,function(t,e){this._handlers[e]=jx(t,this)},n),n}return e(n,t),n.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},n.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||am(e,tz,this._uid),v(this._handlers,function(t,n){e.on(n,t)}),this._brushType=t.brushType,this._brushOption=l(s(iz),t,!0)},n.prototype._doDisableBrush=function(){var t=this._zr;sm(t,tz,this._uid),v(this._handlers,function(e,n){t.off(n,e)}),this._brushType=this._brushOption=null},n.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};v(t,function(t){e[t.panelId]=s(t)})}else this._panels=null;return this},n.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},n.prototype.updateCovers=function(t){function e(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function n(t,n){return e(t.__brushOption,n)}function i(e,n){var i=t[e];if(null!=n&&a[n]===c)u[e]=a[n];else{var r=u[e]=null!=n?(a[n].__brushOption=i,a[n]):Km(h,qm(h,i));Jm(h,r)}}function r(t){a[t]!==c&&h.group.remove(a[t])}t=y(t,function(t){return l(s(iz),t,!0)});var o="\x00-brush-index-",a=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new VA(a,t,n,e).add(i).update(i).remove(r).execute(),this},n.prototype.unmount=function(){return this.enableBrush(!1),i_(this),this._zr.remove(this.group),this},n.prototype.dispose=function(){this.unmount(),this.off()},n}(aw),az={mousedown:function(t){if(this._dragging)C_(this,t);else if(!t.target||!t.target.draggable){b_(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var n=this._creatingPanel=e_(this,t,e);n&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(w_(this,t,i),this._dragging){b_(t);var r=M_(this,t,i,!1);r&&r_(this,r)}},mouseup:function(t){C_(this,t)}},sz={lineX:k_(0),lineY:k_(1),rect:{createCover:function(t,e){function n(t){return t}return s_({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=a_(t);return p_(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){l_(t,e,n,i)},updateCommon:u_,contain:S_},polygon:{createCover:function(t,e){var n=new tS;return n.add(new ET({name:"main",style:c_(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new zT({name:"main",draggable:!0,drift:S(y_,t,e),ondragend:S(r_,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:__(t,e,n)})},updateCommon:u_,contain:S_}},lz={axisPointer:1,tooltip:1,brush:1},uz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],hz=function(){function t(t,e,n){var i=this;this._targetInfoList=[];var r=z_(e,t);v(cz,function(t,e){(!n||!n.include||p(n.include,e)>=0)&&t(r,i._targetInfoList)})}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=fz[t.brushType](0,n,e);t.__rangeOffset={offset:gz[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}),t},t.prototype.matchOutputRanges=function(t,e,n){v(t,function(t){var i=this.findTargetInfo(t,e);i&&i!==!0&&v(i.coordSyses,function(i){var r=fz[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)})},this)},t.prototype.setInputRanges=function(t,e){v(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&n!==!0){t.panelId=n.panelId;var i=fz[t.brushType](0,n.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?gz[t.brushType](i.values,r.offset,N_(i.xyMinMax,r.xyMinMax)):i.values}},this)},t.prototype.makePanelOpts=function(t,e){return y(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:A_(i),isTargetByCursor:O_(i,t,n.coordSysModel),getLinearBrushOtherExtent:P_(i)}})},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&p(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=z_(e,t),r=0;r=0||p(i,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:dz.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){v(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:dz.geo})})}},pz=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],dz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Cs(t)),e}},fz={lineX:S(B_,0),lineY:S(B_,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[R_([r[0],o[0]]),R_([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]],o=y(n,function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o});return{values:o,xyMinMax:r}}},gz={lineX:S(E_,0),lineY:S(E_,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return y(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}},vz=v,yz=Dr("toolbox-dataZoom_"),mz=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new oz(n.getZr()),this._brushController.on("brush",jx(this._onBrush,this)).mount()),W_(t,e,this,i,n),H_(t,e)},n.prototype.onclick=function(t,e,n){_z[n].call(this)},n.prototype.remove=function(){this._brushController&&this._brushController.unmount()},n.prototype.dispose=function(){this._brushController&&this._brushController.dispose()},n.prototype._onBrush=function(t){function e(t,e,i){var a=e.getAxis(t),s=a.model,l=n(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=im(0,i.slice(),a.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){var r=n.getAxisModel(t,e.componentIndex);r&&(i=n)}),i}var i=t.areas;if(t.isEnd&&i.length){var r={},o=this.ecModel;this._brushController.updateCovers([]);var a=new hz(V_(this.model),o,{include:["grid"]});a.matchOutputRanges(i,o,function(t,n,i){if("cartesian2d"===i.type){var r=t.brushType;"rect"===r?(e("x",i,n[0]),e("y",i,n[1])):e({lineX:"x",lineY:"y"}[r],i,n)}}),Zm(o,r),this._dispatchZoomAction(r)}},n.prototype._dispatchZoomAction=function(t){var e=[];vz(t,function(t){e.push(s(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},n.getDefaultOption=function(t){var e={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return e},n}(PR),_z={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Xm(this.ecModel))}};tu("dataZoom",function(t){function e(t,e,n){var i=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:yz+e+i};a[n]=i,o.push(a)}var n=t.getComponent("toolbox",0),i=["feature","dataZoom"];if(n&&null!=n.get(i)){var r=n.getModel(i),o=[],a=V_(r),s=Rr(t,a);return vz(s.xAxisModels,function(t){return e(t,"xAxis","xAxisIndex")}),vz(s.yAxisModels,function(t){return e(t,"yAxis","yAxisIndex")}),o}}),Kd(G_);var xz=["transition","enterFrom","leaveTo"],wz=xz.concat(["enterAnimation","updateAnimation","leaveAnimation"]),bz=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.preventAutoZ=!0,e}return e(n,t),n.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},n.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=yr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];v(a,function(t,e){var n=t.newOption;n&&(s.push(n),Z_(t,n),Y_(r,e,n),j_(r[e],n))},this),n.elements=_(r,function(t){return t&&delete t.$action,null!=t})},n.prototype._flatten=function(t,e,n){v(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;i&&i.length&&this._flatten(i,e,t),delete t.children}},this)},n.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},n.type="graphic",n.defaultOption={elements:[]},n}(tI),Sz={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Mz=w(Sz),Tz=(m(Yb,function(t,e){return t[e]=1,t},{}),Yb.join(", "),["","style","shape","extra"]),Cz=Lr(),Iz={},kz={setTransform:function(t,e){return Iz.el[t]=e,this},getTransform:function(t){return Iz.el[t]},setShape:function(t,e){var n=Iz.el,i=n.shape||(n.shape={});return i[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=Iz.el.shape;return e?e[t]:void 0},setStyle:function(t,e){var n=Iz.el,i=n.style;return i&&(i[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=Iz.el.style;return e?e[t]:void 0},setExtra:function(t,e){var n=Iz.el.extra||(Iz.el.extra={});return n[t]=e,this},getExtra:function(t){var e=Iz.el.extra;return e?e[t]:void 0}},Dz=Lr(),Az=["percent","easing","shape","style","extra"],Pz={path:null,compoundPath:null,group:tS,image:TM,text:LM},Oz=Lr(),Lz=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.init=function(){this._elMap=Y()},n.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},n.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group,r=t.get("z"),o=t.get("zlevel");v(e,function(e){var a=Cr(e.id,null),s=null!=a?n.get(a):null,l=Cr(e.parentId,null),u=null!=l?n.get(l):i,h=e.type,c=e.style;"text"===h&&c&&e.hv&&e.hv[1]&&(c.textVerticalAlign=c.textBaseline=c.verticalAlign=c.align=null);var p=e.textContent,d=e.textConfig;if(c&&q_(c,h,!!d,!!p)){var f=K_(c,h,!0);!d&&f.textConfig&&(d=e.textConfig=f.textConfig),!p&&f.textContent&&(p=f.textContent)}var g=_x(e),v=e.$action||"merge",y="merge"===v,m="replace"===v;if(y){var _=!s,x=s;_?x=vx(a,u,e.type,n):(x&&(Oz(x).isNew=!1),dx(x)),x&&(J_(x,g,t,{isInit:_}),mx(x,e,r,o))}else if(m){yx(s,e,n,t);var w=vx(a,u,e.type,n);w&&(J_(w,g,t,{isInit:!0}),mx(w,e,r,o))}else"remove"===v&&(tx(s,e),yx(s,e,n,t));var b=n.get(a);if(b&&p)if(y){var S=b.getTextContent();S?S.attr(p):b.setTextContent(new LM(p))}else m&&b.setTextContent(new LM(p));if(b){var M=e.clipPath;if(M){var T=M.type,C=void 0,_=!1;if(y){var I=b.getClipPath();_=!I||Oz(I).type!==T,C=_?gx(T):I}else m&&(_=!0,C=gx(T));b.setClipPath(C),J_(C,M,t,{isInit:_}),fx(C,M.keyframeAnimation,t)}var k=Oz(b);b.setTextConfig(d),k.option=e,xx(b,t,e),Fs({el:b,componentModel:t,itemName:b.name,itemTooltipOption:e.tooltip}),fx(b,e.keyframeAnimation,t)}})}},n.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=["x","y"],l=0;l=0;l--){var u=n[l],h=Cr(u.id,null),c=null!=h?r.get(h):null;if(c){var d=c.parent,v=Oz(d),y=d===i?{width:o,height:a}:{width:v.width,height:v.height},m={},_=Wl(c,u,y,null,{hv:u.hv,boundingMode:u.bounding},m);if(!Oz(c).isNew&&_){for(var x=u.transition,w={},b=0;b=0)?w[S]=M:c[S]=M}us(c,w,t,0)}else c.attr(m)}}},n.prototype._clear=function(){var t=this,e=this._elMap;e.each(function(n){yx(n,Oz(n).option,e,t._lastGraphicModel)}),this._elMap=Y()},n.prototype.dispose=function(){this._clear()},n.type="graphic",n}(mk);Kd(bx),t.version=wD,t.dependencies=bD,t.PRIORITY=FD,t.init=op,t.connect=ap,t.disConnect=sp,t.disconnect=DA,t.dispose=lp,t.getInstanceByDom=up,t.getInstanceById=hp,t.registerTheme=cp,t.registerPreprocessor=pp,t.registerProcessor=dp,t.registerPostInit=fp,t.registerPostUpdate=gp,t.registerUpdateLifecycle=vp,t.registerAction=yp,t.registerCoordinateSystem=mp,t.getCoordinateSystemDimensions=_p,t.registerLayout=xp,t.registerVisual=wp,t.registerLoading=Sp,t.setCanvasCreator=Mp,t.registerMap=Tp,t.getMap=Cp,t.registerTransform=PA,t.dataTool=FA,t.registerLocale=rl,t.zrender=oS,t.matrix=mw,t.vector=iw,t.zrUtil=Qx,t.color=hb,t.helper=kP,t.number=EP,t.time=NP,t.graphic=FP,t.format=VP,t.util=HP,t.List=JA,t.ComponentModel=tI,t.ComponentView=mk,t.SeriesModel=yk,t.ChartView=wk,t.extendComponentModel=Sf,t.extendComponentView=Mf,t.extendSeriesModel=Tf,t.extendChartView=Cf,t.throttle=Yh,t.use=Kd,t.setPlatformAPI=r,t.parseGeoJSON=af,t.parseGeoJson=af,t.env=Cx,t.Model=CC,t.Axis=ZP,t.innerDrawElementOnCanvas=Zc}); \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/web/export.js b/src/com/fr/plugin/pielinecomb/web/export.js new file mode 100644 index 0000000..49e6f81 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/web/export.js @@ -0,0 +1,102 @@ +(function () { + var system = require('system'); + var fs = require('fs'); + var config = { + FR: 'fr.js', + JQUERY: 'jquery.js', + ECHARTS: 'echarts.js', + CHARTWRAPPER: 'chartwrapper.js', + CHARTDATA: 'chartdata.js', + DEFAULT_WIDTH: '150', + DEFAULT_HEIGHT: '150' + }, parseParams, render; + + // 处理参数 + parseParams = function () { + var map = {}, i, key; + if (system.args.length < 2) { + phantom.exit(); + } + for (i = 0; i < system.args.length; i += 1) { + if (system.args[i].charAt(0) === '-') { + key = system.args[i].substr(1, i.length); + if (key === 'infile') { + // get string from file + // force translate the key from infile to options. + key = 'options'; + try { + map[key] = fs.read(system.args[i + 1]).replace(/^\s+/, ''); + } catch (e) { + console.log('Error: cannot find file, ' + system.args[i + 1]); + phantom.exit(); + } + } else { + map[key] = system.args[i + 1].replace(/^\s+/, ''); + } + } + } + return map; + }; + + render = function (params) { + var page = require('webpage').create(), createChart; + + page.onConsoleMessage = function (msg) { + console.log(msg); + }; + + page.onAlert = function (msg) { + console.log(msg); + }; + + createChart = function (chartname, width, height) { + + // we render the image, so we need set background to white. + //$(document.body).css('backgroundColor', 'white'); + var container = $("
").appendTo(document.body); + container.attr('id', 'container'); + container.css({ + width: width, + height: height + }); + // render the chart + + var chart = new window[chartname]; + var chartInst = chart._init(container[0], window.chartOptions); + return chart.getChartImage() || chartInst.getDataURL(); + + }; + + // parse the params + page.open("about:blank", function (status) { + // inject the dependency js + page.injectJs(config.FR); + page.injectJs(config.JQUERY); + page.injectJs(config.ECHARTS); + page.injectJs(config.CHARTDATA); + page.injectJs(config.CHARTWRAPPER); + + // create the chart + var base64 = page.evaluate(createChart, params.chartname, params.width, params.height); + + setTimeout(function() { + base64 = page.evaluate(function() { + return window.PieLineCombChartInst.getChartImage(); + }); + + console.log(base64); + // exit + phantom.exit(); + + }, 1000); + + + }); + }; + + // get the args + var params = parseParams(); + + // render the image + render(params); +}()); \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/web/fr.js b/src/com/fr/plugin/pielinecomb/web/fr.js new file mode 100644 index 0000000..0ef8d4e --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/web/fr.js @@ -0,0 +1,25 @@ +ExtendedChart = function () { + return this; +}; + +ExtendedChart.extend = function (props) { + + var NewClass = function () { + }; + + _extend(NewClass.prototype, props); //将参数复制到NewClass的prototype中 + + return NewClass; +}; + +function _extend(dest) { + var i, j, len, src; + + for (j = 1, len = arguments.length; j < len; j++) { + src = arguments[j]; + for (i in src) { + dest[i] = src[i]; + } + } + return dest; +} \ No newline at end of file diff --git a/src/com/fr/plugin/pielinecomb/web/jquery.js b/src/com/fr/plugin/pielinecomb/web/jquery.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/src/com/fr/plugin/pielinecomb/web/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0