@ -0,0 +1,5 @@
|
||||
*.iml |
||||
.idea/ |
||||
lib/report/*.jar |
||||
.DS_Store |
||||
.classpath |
@ -1,19 +0,0 @@
|
||||
<component name="libraryTable"> |
||||
<library name="report"> |
||||
<CLASSES> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-platform-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-chart-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-core-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/servlet-api.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-performance-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-designer-core-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-third-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-designer-report-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-report-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-designer-feedback-8.0.jar!/" /> |
||||
<root url="jar://$PROJECT_DIR$/lib/report/fr-designer-chart-8.0.jar!/" /> |
||||
</CLASSES> |
||||
<JAVADOC /> |
||||
<SOURCES /> |
||||
</library> |
||||
</component> |
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="ProjectModuleManager"> |
||||
<modules> |
||||
<module fileurl="file://$PROJECT_DIR$/plugin-echarts.iml" filepath="$PROJECT_DIR$/plugin-echarts.iml" /> |
||||
</modules> |
||||
</component> |
||||
</project> |
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="VcsDirectoryMappings"> |
||||
<mapping directory="" vcs="Git" /> |
||||
</component> |
||||
</project> |
@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<module type="JAVA_MODULE" version="4"> |
||||
<component name="NewModuleRootManager" inherit-compiler-output="false"> |
||||
<output url="file://$USER_HOME$/Documents/finereport/env/8.0/WebReport/WEB-INF/classes" /> |
||||
<content url="file://$MODULE_DIR$"> |
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |
||||
</content> |
||||
<orderEntry type="inheritedJdk" /> |
||||
<orderEntry type="sourceFolder" forTests="false" /> |
||||
<orderEntry type="library" name="lib" level="project" /> |
||||
<orderEntry type="module" module-name="base" /> |
||||
<orderEntry type="module" module-name="base-basic" /> |
||||
<orderEntry type="module" module-name="base-calculate" /> |
||||
<orderEntry type="module" module-name="base-data" /> |
||||
<orderEntry type="module" module-name="base-file" /> |
||||
<orderEntry type="module" module-name="base-performance" /> |
||||
<orderEntry type="module" module-name="base-stable" /> |
||||
<orderEntry type="module" module-name="chart-base" /> |
||||
<orderEntry type="module" module-name="chart-chartattr" /> |
||||
<orderEntry type="module" module-name="chart-chartdata" /> |
||||
<orderEntry type="module" module-name="chart-chartglyph" /> |
||||
<orderEntry type="module" module-name="chart-web" /> |
||||
<orderEntry type="module" module-name="designer" /> |
||||
<orderEntry type="module" module-name="designer_base" /> |
||||
<orderEntry type="module" module-name="designer_chart" /> |
||||
<orderEntry type="module" module-name="designer_feedback" /> |
||||
<orderEntry type="module" module-name="designer_form" /> |
||||
<orderEntry type="module" module-name="engine" /> |
||||
<orderEntry type="module" module-name="engine-page" /> |
||||
<orderEntry type="module" module-name="engine-remote" /> |
||||
<orderEntry type="module" module-name="engine-view" /> |
||||
<orderEntry type="module" module-name="engine-write" /> |
||||
<orderEntry type="module" module-name="form" /> |
||||
</component> |
||||
</module> |
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<parent> |
||||
<groupId>com.fr.plugin</groupId> |
||||
<artifactId>starter</artifactId> |
||||
<version>10.0</version> |
||||
</parent> |
||||
|
||||
<packaging>jar</packaging> |
||||
<artifactId>demo-show-echarts</artifactId> |
||||
<build> |
||||
<!---如果要更改调试插件,改这里的配置就可以了--> |
||||
<outputDirectory>${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.solution.plugin.chart.echarts-1.0/classes</outputDirectory> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<configuration> |
||||
<source>6</source> |
||||
<target>6</target> |
||||
</configuration> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
</project> |
@ -1,39 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map; |
||||
|
||||
import com.fr.chart.chartattr.Chart; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.AbstractIndependentEChartsProvider; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.ECharts; |
||||
import com.fr.solution.plugin.chart.echarts.map.plot.ChineseMapPlot; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class EChartsChineseMap extends AbstractIndependentEChartsProvider { |
||||
|
||||
private static ECharts createChineseMap() { |
||||
ChineseMapPlot plot = new ChineseMapPlot(); |
||||
return new ECharts(plot); |
||||
} |
||||
|
||||
public static ECharts[] charts = new ECharts[] { |
||||
createChineseMap() |
||||
}; |
||||
|
||||
|
||||
@Override |
||||
public String getChartName() { |
||||
return "Plugin-ECharts_Chinese_Map"; |
||||
} |
||||
|
||||
@Override |
||||
public Chart[] getChartTypes() { |
||||
return charts; |
||||
} |
||||
|
||||
@Override |
||||
public String getChartImagePath() { |
||||
return "com/fr/solution/plugin/chart/echarts/map/images/map256.png"; |
||||
} |
||||
|
||||
} |
@ -1,36 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map; |
||||
|
||||
import com.fr.chart.chartattr.Plot; |
||||
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.data.table.AbstractTableDataContentPane; |
||||
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||
import com.fr.solution.plugin.chart.echarts.common.ui.AbstractIndependentEChartsUI; |
||||
import com.fr.solution.plugin.chart.echarts.map.ui.ChineseMapReportDataContentPane; |
||||
import com.fr.solution.plugin.chart.echarts.map.ui.ChineseMapTableDataContentPane; |
||||
import com.fr.solution.plugin.chart.echarts.map.ui.ChineseChartTypePane; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class EChartsChineseMapUI extends AbstractIndependentEChartsUI { |
||||
@Override |
||||
public AbstractChartTypePane getPlotTypePane() { |
||||
return new ChineseChartTypePane(); |
||||
} |
||||
|
||||
@Override |
||||
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { |
||||
return new ChineseMapTableDataContentPane(parent); |
||||
} |
||||
|
||||
@Override |
||||
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { |
||||
return new ChineseMapReportDataContentPane(parent); |
||||
} |
||||
|
||||
@Override |
||||
public String getIconPath() { |
||||
return "com/fr/solution/plugin/chart/echarts/map/images/chinese.png"; |
||||
} |
||||
} |
@ -1,72 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.glyph; |
||||
|
||||
import com.fr.json.JSONArray; |
||||
import com.fr.json.JSONException; |
||||
import com.fr.json.JSONObject; |
||||
import com.fr.solution.plugin.chart.echarts.common.glyph.EChartsPlotGlyph; |
||||
import com.fr.stable.web.Repository; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class ChineseMapPlotGlyph extends EChartsPlotGlyph { |
||||
@Override |
||||
public void layoutAxisGlyph(int resolution) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void layoutDataSeriesGlyph(int resolution) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public String getPlotGlyphType() { |
||||
return "ChineseMapPlotGlyph"; |
||||
} |
||||
|
||||
@Override |
||||
public String getChartType() { |
||||
return "ChineseMap"; |
||||
} |
||||
|
||||
public JSONArray toSeriesData(Repository repo) throws JSONException { |
||||
JSONArray series = JSONArray.create(); |
||||
|
||||
series.put(JSONObject.create() |
||||
.put("name", "iPhone3") |
||||
.put("type", "map") |
||||
.put("mapType", "china") |
||||
.put("itemStyle", createItemStyle(repo)) |
||||
.put("data", JSONArray.create().put(JSONObject.create().put("name", "北京").put("value", 20))) |
||||
); |
||||
|
||||
series.put(JSONObject.create() |
||||
.put("name", "iPhone4") |
||||
.put("type", "map") |
||||
.put("mapType", "china") |
||||
.put("itemStyle", createItemStyle(repo)) |
||||
.put("data", JSONArray.create() |
||||
.put(JSONObject.create().put("name", "江苏").put("value", 20)) |
||||
.put(JSONObject.create().put("name", "四川").put("value", 300)) |
||||
) |
||||
); |
||||
|
||||
series.put(JSONObject.create() |
||||
.put("name", "iPhone5") |
||||
.put("type", "map") |
||||
.put("mapType", "china") |
||||
.put("itemStyle", createItemStyle(repo)) |
||||
.put("data", JSONArray.create().put(JSONObject.create().put("name", "四川").put("value", 20))) |
||||
); |
||||
|
||||
return series; |
||||
} |
||||
|
||||
private JSONObject createItemStyle(Repository repo) throws JSONException { |
||||
JSONObject itemStyle = JSONObject.create(); |
||||
itemStyle.put("normal", JSONObject.create().put("label", JSONObject.create().put("show", true))); |
||||
itemStyle.put("emphasis", JSONObject.create().put("label", JSONObject.create().put("show", true))); |
||||
return itemStyle; |
||||
} |
||||
} |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 5.5 KiB |
@ -1,37 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.monitor; |
||||
|
||||
import com.fr.general.Inter; |
||||
import com.fr.stable.fun.FunctionHelper; |
||||
import com.fr.stable.fun.impl.AbstractFunctionProcessor; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/18. |
||||
*/ |
||||
public class MonitorMap extends AbstractFunctionProcessor { |
||||
|
||||
private static MonitorMap instance = new MonitorMap(); |
||||
|
||||
public static MonitorMap getInstance() { |
||||
return instance; |
||||
} |
||||
|
||||
private MonitorMap() { |
||||
super(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public int getId() { |
||||
return FunctionHelper.generateFunctionID("com.fr.solution.plugin.chart.echarts.map"); |
||||
} |
||||
|
||||
@Override |
||||
public String getLocaleKey() { |
||||
return "Plugin-ECharts_Chinese_Map"; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return Inter.getLocText("Plugin-ECharts_Chinese_Map"); |
||||
} |
||||
} |
@ -1,55 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.plot; |
||||
|
||||
import com.fr.base.chart.chartdata.ChartData; |
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.chart.chartdata.NormalChartData; |
||||
import com.fr.chart.chartglyph.PlotGlyph; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.map.glyph.ChineseMapPlotGlyph; |
||||
import com.fr.solution.plugin.chart.echarts.map.monitor.MonitorMap; |
||||
import com.fr.solution.plugin.chart.echarts.common.plot.EChartsPlot; |
||||
import com.fr.stable.fun.FunctionProcessor; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class ChineseMapPlot extends EChartsPlot { |
||||
|
||||
@Override |
||||
public PlotGlyph createPlotGlyph(ChartData chartData) { |
||||
PlotGlyph glyph = new ChineseMapPlotGlyph(); |
||||
install4PlotGlyph(glyph, chartData); |
||||
return glyph; |
||||
} |
||||
|
||||
@Override |
||||
public String getPlotID() { |
||||
return "EChartsChinaMapPlot"; |
||||
} |
||||
|
||||
@Override |
||||
public boolean matchPlotType(Plot newPlot) { |
||||
return newPlot instanceof ChineseMapPlot; |
||||
} |
||||
|
||||
@Override |
||||
public ChartData defaultChartData() { |
||||
return new NormalChartData(); |
||||
} |
||||
|
||||
@Override |
||||
public FunctionProcessor getFunctionToRecord() { |
||||
return MonitorMap.getInstance(); |
||||
} |
||||
|
||||
public boolean accept(Class<? extends Plot> obClass) { |
||||
return ComparatorUtils.equals(ChineseMapPlot.class, obClass); |
||||
} |
||||
|
||||
@Override |
||||
public String getPlotName() { |
||||
return Inter.getLocText("Plugin-ECharts_Chinese_Map"); |
||||
} |
||||
|
||||
} |
@ -1,53 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.ui; |
||||
|
||||
import com.fr.chart.chartattr.Chart; |
||||
import com.fr.design.mainframe.chart.gui.type.UserDefinedChartTypePane; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.map.EChartsChineseMap; |
||||
import com.fr.solution.plugin.chart.echarts.map.plot.ChineseMapPlot; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class ChineseChartTypePane extends UserDefinedChartTypePane { |
||||
/** |
||||
* 弹出框的标题 |
||||
* |
||||
* @return 弹出框的标题 |
||||
*/ |
||||
public String title4PopupWindow() { |
||||
return Inter.getLocText("Plugin-ECharts_Chinese_Map"); |
||||
} |
||||
|
||||
public void updateBean(Chart chart) { |
||||
if (chart != null) { |
||||
chart.setPlot(new ChineseMapPlot()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected String getPlotTypeID() { |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 界面是否接受 |
||||
* @param ob 对象是否为chart |
||||
* @return 界面是否接受对象 |
||||
*/ |
||||
public boolean accept(Object ob) { |
||||
return (ob instanceof Chart)&&((Chart) ob).getPlot().accept(ChineseMapPlot.class); |
||||
} |
||||
|
||||
@Override |
||||
public Chart getDefaultChart() { |
||||
return EChartsChineseMap.charts[0]; |
||||
} |
||||
|
||||
@Override |
||||
protected String[] getTypeIconPath() { |
||||
return new String[]{ |
||||
"/com/fr/solution/plugin/chart/echarts/map/images/map_type1.png" |
||||
}; |
||||
} |
||||
} |
@ -1,40 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.ui; |
||||
|
||||
import com.fr.chart.chartattr.ChartCollection; |
||||
import com.fr.design.event.UIObserver; |
||||
import com.fr.design.event.UIObserverListener; |
||||
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.data.table.AbstractTableDataContentPane; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class ChineseMapReportDataContentPane extends AbstractReportDataContentPane implements UIObserver { |
||||
|
||||
public ChineseMapReportDataContentPane(ChartDataPane parent) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
protected String[] columnNames() { |
||||
return new String[0]; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(ChartCollection ob) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void registerChangeListener(UIObserverListener listener) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public boolean shouldResponseChangeListener() { |
||||
return true; |
||||
} |
||||
} |
@ -1,14 +0,0 @@
|
||||
package com.fr.solution.plugin.chart.echarts.map.ui; |
||||
|
||||
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||
import com.fr.solution.plugin.chart.echarts.common.ui.data.AbstractEChartsTableDataContentPane; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class ChineseMapTableDataContentPane extends AbstractEChartsTableDataContentPane { |
||||
|
||||
public ChineseMapTableDataContentPane(ChartDataPane parent) { |
||||
super(parent); |
||||
} |
||||
} |
@ -0,0 +1,6 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.base; |
||||
|
||||
public class EChartsConstants { |
||||
|
||||
public static final String PLUGIN_ID = "com.fr.solution.plugin.chart.echarts"; |
||||
} |
@ -1,7 +1,6 @@
|
||||
package com.fr.solution.plugin.chart.echarts.pie; |
||||
|
||||
import com.fr.chart.chartattr.Chart; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.AbstractIndependentEChartsProvider; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.ECharts; |
||||
import com.fr.solution.plugin.chart.echarts.pie.plot.EChartsPiePlot; |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 1017 B |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |