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.
|
|
|
# BI全局样式自定义插件
|
|
|
|
|
|
|
|
该插件目前版本提供两个功能:
|
|
|
|
* 在仪表盘处可以使用用户自定义的字体
|
|
|
|
* 可以在新建组件的时候修改组件的默认配置(当前版本可配置图的网格线与线框粗细)
|
|
|
|
|
|
|
|
## 效果示例
|
|
|
|
![配置1](shortcut/config1.png)
|
|
|
|
![配置2](shortcut/config2.png)
|
|
|
|
![配置3](shortcut/config3.png)
|
|
|
|
![配置4](shortcut/config4.png)
|
|
|
|
|
|
|
|
## 注意事项
|
|
|
|
如果要修改图的字体,需要修改插件中的entry中的代码
|
|
|
|
```
|
|
|
|
BI.config("bi.provider.template_style", function (p) {
|
|
|
|
p.inject({ // 通过inject注入想要添加的配置
|
|
|
|
fonts: [{
|
|
|
|
value: "adidasHeader", // **为了改变图的样式,字体的命名应该和系统安装的字体名称一样**
|
|
|
|
text: "自定义字体头字体"
|
|
|
|
}, {
|
|
|
|
value: "adidasBody",
|
|
|
|
text: "自定义字体Bodyzi字体"
|
|
|
|
}],
|
|
|
|
style: {
|
|
|
|
axisWidth: 0, // 默认轴线粗细
|
|
|
|
hGridWidth: 0, // 默认横向网格线粗细
|
|
|
|
vGridWidth: 0 // 默认纵向网格线粗细
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
```
|