package com.fr.plugin; import com.fr.extended.chart.AbstractChart; import com.fr.extended.chart.HyperLinkPara; import com.fr.extended.chart.StringFormula; import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.plugin.transform.ExecuteFunctionRecord; import com.fr.stable.web.Repository; import java.util.List; public class WaterChat extends AbstractChart { @Override @ExecuteFunctionRecord /** * plotID 对应 */ protected String getChartID() { return "echart.water.chart"; } @Override public String getChartName() { return "水球图"; } /** * 数据源获取并解析成对应类型 */ @Override protected void addJSON(WaterChartConfig waterChartConfig, JSONObject jsonObject, Repository repository, JSONPara jsonPara) throws JSONException { List values = waterChartConfig.getValue().getValues(); jsonObject.put("value", values); } @Override protected String[] requiredJS() { return new String[]{ "com/fr/plugin/web/js/echarts.js", "com/fr/plugin/web/js/echarts-liquidfill.js", "com/fr/plugin/web/js/water.js" }; } @Override protected String wrapperName() { return "demoWrapper"; } @Override protected String demoImagePath() { return "com/fr/plugin/web/icon/preview.PNG"; } @Override protected HyperLinkPara[] hyperLinkParas() { return new HyperLinkPara[0]; } @Override protected List formulas() { return null; } }