You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.6 KiB
68 lines
1.6 KiB
4 years ago
|
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<WaterChartConfig> {
|
||
|
@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<Object> 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<StringFormula> formulas() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
}
|