diff --git a/build.xml b/build.xml index 5021b7b..133b054 100644 --- a/build.xml +++ b/build.xml @@ -61,7 +61,7 @@ executable="${compile_jdk_version}/bin/javac"> - + diff --git a/document/echarts_develop.md b/document/echarts_develop.md new file mode 100644 index 0000000..8f24e40 --- /dev/null +++ b/document/echarts_develop.md @@ -0,0 +1,55 @@ +# ECharts图表插件开发文档 + +## 关键接口解释 + +`IndependentChartProvider` + +介绍:该接口的作用是扩展图表类型引擎部分,一般继承`AbstractIndependentEChartsProvider`就可以了 + +`IndependentChartUIProvider` + +介绍:该接口的作用是扩展图表类型的设计器部分,一般继承`AbstractIndependentEChartsUI`就可以了 + +以上两个接口,都是在plugin.xml中进行配置以扩展图表类型的,使用class属性来对应相应的扩展类,plotID属性对应图表Plot类型 + +## 关键类解释 + +每实现一种新类型的图表,都需要实现抽象类`AbstractIndependentEChartsProvider`来扩展已有的图表类型引擎以及实现抽象类`AbstractIndependentEChartsUI`类扩展已有的图表类型的设计界面. + +为了方便统一处理新的图表类型,我们继承内置的`com.fr.chart.chartattr.Chart`类实现一个全新的图表类[com.fr.solution.plugin.chart.echarts.ECharts](echarts.md). + +### 继承了AbstractIndependentEChartsProvider的类需要实现以下方法 + +// 该方法用于描述图表的名字 + +`public String getChartName()` + +// 该方法用于描述图表的显示名字,会根据不同的语言设置显示不同的名字 + +`public String getChartUseName()` + +// 该方法用户描述图表的子类型 + +`public Chart[] getChartTypes()` + +// 该方法用于描述图表对应的图片,一般在设计界面和图表选择界面会看到该图片 + +`public String getChartImagePath()` + +### 继承了AbstractIndependentEChartsUI的类需要实现以下方法 + +// 该方法用于描述图表类型选择界面(一种图表还会有若干种子类型,所以需要这个界面) + +[`public AbstractChartTypePane getPlotTypePane()`](echarts_type_pane.md) + +// 该方法用于描述此种图表类型的使用数据集数据时的数据设置界面 + +`public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent)` + +// 该方法用于描述此种图表类型的使用单元格数据时的数据设置界面 + +`public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent)` + +// 该方法用户描述此种类型的图表的小图标,一般在添加表单元素的选择界面可以看到 + +`public String getIconPath()` diff --git a/plugin.xml b/plugin.xml index 6c93378..f402f9c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -5,11 +5,10 @@ yes 2.0 8.0 - 2016-01-11 - solution - + 2016-02-18 + solution + 这里.]]> [2016-01-01]中国地图

[2016-02-18]饼图

]]>
diff --git a/readme.md b/readme.md index e1b7aee..49dad03 100644 --- a/readme.md +++ b/readme.md @@ -1,55 +1,17 @@ -# ECharts图表插件开发文档 - -## 关键接口解释 - -`IndependentChartProvider` - -介绍:该接口的作用是扩展图表类型引擎部分,一般继承`AbstractIndependentEChartsProvider`就可以了 - -`IndependentChartUIProvider` - -介绍:该接口的作用是扩展图表类型的设计器部分,一般继承`AbstractIndependentEChartsUI`就可以了 - -以上两个接口,都是在plugin.xml中进行配置以扩展图表类型的,使用class属性来对应相应的扩展类,plotID属性对应图表Plot类型 - -## 关键类解释 - -每实现一种新类型的图表,都需要实现抽象类`AbstractIndependentEChartsProvider`来扩展已有的图表类型引擎以及实现抽象类`AbstractIndependentEChartsUI`类扩展已有的图表类型的设计界面. - -为了方便统一处理新的图表类型,我们继承内置的`com.fr.chart.chartattr.Chart`类实现一个全新的图表类[com.fr.solution.plugin.chart.echarts.ECharts](document/echarts.md). - -### 继承了AbstractIndependentEChartsProvider的类需要实现以下方法 - -// 该方法用于描述图表的名字 - -`public String getChartName()` - -// 该方法用于描述图表的显示名字,会根据不同的语言设置显示不同的名字 - -`public String getChartUseName()` - -// 该方法用户描述图表的子类型 - -`public Chart[] getChartTypes()` - -// 该方法用于描述图表对应的图片,一般在设计界面和图表选择界面会看到该图片 - -`public String getChartImagePath()` - -### 继承了AbstractIndependentEChartsUI的类需要实现以下方法 - -// 该方法用于描述图表类型选择界面(一种图表还会有若干种子类型,所以需要这个界面) - -[`public AbstractChartTypePane getPlotTypePane()`](document/echarts_type_pane.md) - -// 该方法用于描述此种图表类型的使用数据集数据时的数据设置界面 - -`public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent)` - -// 该方法用于描述此种图表类型的使用单元格数据时的数据设置界面 - -`public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent)` - -// 该方法用户描述此种类型的图表的小图标,一般在添加表单元素的选择界面可以看到 - -`public String getIconPath()` +# ECharts插件使用效果和开发文档 + +## 开发文档 +[详细开发文档](document/charts_develop.md) + +## 试用效果图 +注意:为了对比,需要安装图表(新特性)插件 + +1. 演示用的模板:tpl/echarts.frm +2. 图表选择界面 +![type](tpl/screenshots/echarts_setting_type.png) +3. 图表数据设置界面 +![data](tpl/screenshots/echarts_setting_data.png) +4. 图表样式设置界面(目前只有标题设置) +![type](tpl/screenshots/echarts_setting_style.png) +5. 图表预览图,其中左边的两个为黑色主题的ECharts插件效果,右上为FineReport老图表效果,右下为图表(新特性)效果 +![type](tpl/screenshots/web_dark.png) \ No newline at end of file diff --git a/tpl/echarts.frm b/tpl/echarts.frm new file mode 100644 index 0000000..b9a7949 --- /dev/null +++ b/tpl/echarts.frm @@ -0,0 +1,1459 @@ + +
+ + + + + + + + + + +b^bZM]AMqg),@_CiB.-*cS0k+FW+'A/`l?"h69pZB:/`r)Y,=G3TBoa60[.nb(f +_!Cc3.guP9!rT[VgkiAnZi@ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[ECharts饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[ECharts饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[FineCharts饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[FineCharts饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[新特性饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="128" foreground="-13421773"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[新特性饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="128" foreground="-13421773"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[ECharts玫瑰饼图]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<GI> +<AttrBackground> +<Background name="NullBackground"/> +<Attr shadow="false"/> +</AttrBackground> +<AttrBorder> +<Attr lineStyle="0" isRoundBorder="false" roundRadius="0"/> +<newColor borderColor="-6908266"/> +</AttrBorder> +<AttrAlpha> +<Attr alpha="1.0"/> +</AttrAlpha> +</GI> +<O> +<![CDATA[新建图表标题]]></O> +<TextAttr> +<Attr alignText="0"> +<FRFont name="Microsoft YaHei" style="0" size="88"/> +</Attr> +</TextAttr> +<TitleVisible value="true" position="0"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/tpl/screenshots/echarts_setting_data.png b/tpl/screenshots/echarts_setting_data.png new file mode 100644 index 0000000..063b9f0 Binary files /dev/null and b/tpl/screenshots/echarts_setting_data.png differ diff --git a/tpl/screenshots/echarts_setting_style.png b/tpl/screenshots/echarts_setting_style.png new file mode 100644 index 0000000..cd5a6ca Binary files /dev/null and b/tpl/screenshots/echarts_setting_style.png differ diff --git a/tpl/screenshots/echarts_setting_type.png b/tpl/screenshots/echarts_setting_type.png new file mode 100644 index 0000000..4ccc58f Binary files /dev/null and b/tpl/screenshots/echarts_setting_type.png differ diff --git a/tpl/screenshots/web_dark.png b/tpl/screenshots/web_dark.png new file mode 100644 index 0000000..cedb844 Binary files /dev/null and b/tpl/screenshots/web_dark.png differ diff --git a/安装包/fr-plugin-echarts-2.0.zip b/安装包/fr-plugin-echarts-2.0.zip new file mode 100644 index 0000000..1f89aeb Binary files /dev/null and b/安装包/fr-plugin-echarts-2.0.zip differ