forked from fanruan/bi-starter-latest
15 changed files with 44083 additions and 66 deletions
@ -1,21 +1,12 @@ |
|||||||
# bi-plugin-starter |
# 箱线图插件示例 |
||||||
|
|
||||||
FineBI插件模板 |
+ 编辑界面添加箱线图 |
||||||
|
|
||||||
+ 目录结构(需要添加工程依赖,依赖指向BI中WEB-INF中的lib) |
![箱线图](./screenshots/boxplot.png) |
||||||
- lib中放引用的第三方jar包 |
|
||||||
- src 代码&资源 |
|
||||||
- build.xml Ant编译脚本 |
|
||||||
- plugin.xml 插件 |
|
||||||
|
|
||||||
+ build.xml参数 |
+ 预览和编辑展示箱线图 |
||||||
- line4: JDK路径 |
|
||||||
- line8: 依赖的lib,从crm下bi的jar就行了 |
+ 箱线图与其他图形的联动效果 |
||||||
- line17: value="插件名" |
|
||||||
|
![联动效果](./screenshots/link.png) |
||||||
|
|
||||||
+ plugin.xml参数 |
|
||||||
- id:插件id |
|
||||||
- name: 插件名 |
|
||||||
- ventor: 插件作者 |
|
||||||
- description:插件描述 |
|
||||||
- AbstractWebResourceProvider&function-recorder的class:插件类 |
|
@ -1,17 +1,18 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
<plugin> |
<plugin> |
||||||
<id>com.finebi.plugin.demo</id> |
<id>com.finebi.plugin.boxplotchart</id> |
||||||
<main-package>com.finebi</main-package> |
<main-package>com.finebi</main-package> |
||||||
<name><![CDATA[图片组件插件]]></name> |
<name><![CDATA[BI箱线图]]></name> |
||||||
<active>yes</active> |
<active>yes</active> |
||||||
<version>1.0</version> |
<version>1.0</version> |
||||||
<env-version>8.0</env-version> |
<env-version>10.0</env-version> |
||||||
<jartime>2019-02-29</jartime> |
<jartime>2019-02-29</jartime> |
||||||
<vendor>imp</vendor> |
<vendor>imp</vendor> |
||||||
<description><![CDATA[图片组件在当前页面打开链接]]></description> |
<description><![CDATA[BI箱线图图表插件]]></description> |
||||||
<extra-decision> |
<extra-decision> |
||||||
<WebResourceProvider class="com.finebi.plugin.BIPluginDemo"/> |
<WebResourceProvider class="com.finebi.plugin.BIShowBoxPlotChart"/> |
||||||
|
<WebResourceProvider class="com.finebi.plugin.BIDesignBoxPlotChart"/> |
||||||
</extra-decision> |
</extra-decision> |
||||||
<function-recorder class="com.finebi.plugin.BIPluginDemo"/> |
<function-recorder class="com.finebi.plugin.BIShowBoxPlotChart"/> |
||||||
|
<function-recorder class="com.finebi.plugin.BIDesignBoxPlotChart"/> |
||||||
</plugin> |
</plugin> |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,23 @@ |
|||||||
|
package com.finebi.plugin; |
||||||
|
|
||||||
|
import com.fr.web.struct.Component; |
||||||
|
import com.fr.web.struct.category.ScriptPath; |
||||||
|
import com.fr.web.struct.category.StylePath; |
||||||
|
|
||||||
|
public class BIBoxPlotChartComponent extends Component { |
||||||
|
|
||||||
|
public static final BIBoxPlotChartComponent KEY = new BIBoxPlotChartComponent(); |
||||||
|
|
||||||
|
private BIBoxPlotChartComponent() { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public ScriptPath script() { |
||||||
|
return ScriptPath.build("com/finebi/plugin/web/js/chart.js"); |
||||||
|
} |
||||||
|
|
||||||
|
public StylePath style() { |
||||||
|
return StylePath.build("com/finebi/plugin/web/css/chart.css"); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
package com.finebi.plugin; |
||||||
|
|
||||||
|
import com.finebi.conf.internalimp.component.ReportComponent; |
||||||
|
import com.fr.decision.fun.impl.AbstractWebResourceProvider; |
||||||
|
import com.fr.intelli.record.Focus; |
||||||
|
import com.fr.intelli.record.Original; |
||||||
|
import com.fr.record.analyzer.EnableMetrics; |
||||||
|
import com.fr.web.struct.Atom; |
||||||
|
|
||||||
|
@EnableMetrics |
||||||
|
public class BIDesignBoxPlotChart extends AbstractWebResourceProvider { |
||||||
|
|
||||||
|
@Override |
||||||
|
public Atom attach() { |
||||||
|
return ReportComponent.KEY; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
@Focus(id = "com.finebi.plugin.BIDesignBoxPlotChart", text = "箱线图", source = Original.PLUGIN) |
||||||
|
public Atom client() { |
||||||
|
return BIBoxPlotChartComponent.KEY; |
||||||
|
} |
||||||
|
} |
@ -1,25 +0,0 @@ |
|||||||
package com.finebi.plugin; |
|
||||||
|
|
||||||
import com.fr.web.struct.Component; |
|
||||||
import com.fr.web.struct.browser.RequestClient; |
|
||||||
import com.fr.web.struct.category.ScriptPath; |
|
||||||
import com.fr.web.struct.category.StylePath; |
|
||||||
|
|
||||||
public class BIPluginDemoComponent extends Component { |
|
||||||
|
|
||||||
public static final BIPluginDemoComponent KEY = new BIPluginDemoComponent(); |
|
||||||
|
|
||||||
private BIPluginDemoComponent() { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public ScriptPath script(RequestClient client) { |
|
||||||
return ScriptPath.build("com/finebi/plugin/web/BIPluginDemo.js"); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public StylePath style(RequestClient client) { |
|
||||||
return StylePath.build("com/finebi/plugin/web/BIPluginDemo.css"); |
|
||||||
} |
|
||||||
} |
|
@ -1,3 +0,0 @@ |
|||||||
.bi-dashboard-widget:hover .operator-region, .bi-control-widget:hover .operator-region { |
|
||||||
display: none; |
|
||||||
} |
|
@ -1,6 +0,0 @@ |
|||||||
BI.Plugin.registerObject("bi.show.widget.image", function (widget) { |
|
||||||
widget.img.un(BI.ImageButton.EVENT_CHANGE); |
|
||||||
widget.img.element.on("click", function () { |
|
||||||
location.href = BI.Format.formatAddress("www.baidu.com"); |
|
||||||
}); |
|
||||||
}); |
|
@ -0,0 +1,17 @@ |
|||||||
|
.chart-type-boxplot-column-icon .x-icon { |
||||||
|
display: block; |
||||||
|
background: url('/webroot/decision/resources?path=/com/finebi/plugin/web/image/boxplot.png') no-repeat center center; |
||||||
|
background-size: contain; |
||||||
|
} |
||||||
|
.chart-type-boxplot-column-icon .x-icon.hack { |
||||||
|
background: url('/webroot/decision/resources?path=/com/finebi/plugin/web/image/boxplot.png') no-repeat center center; |
||||||
|
} |
||||||
|
|
||||||
|
.chart-type-boxplot-column-disabled-icon .x-icon { |
||||||
|
display: block; |
||||||
|
background: url('/webroot/decision/resources?path=/com/finebi/plugin/web/image/disable.png') no-repeat center center; |
||||||
|
background-size: contain; |
||||||
|
} |
||||||
|
.chart-type-boxplot-column-disabled-icon .x-icon.hack { |
||||||
|
background: url('/webroot/decision/resources?path=/com/finebi/plugin/web/image/disable.png') no-repeat center center; |
||||||
|
} |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue