ECharts图例组件配置 背景色及边框

2018-04-19 17:19 更新

legend.backgroundColor   |   Color

[ default: 'transparent' ]

图例背景色,默认透明。

颜色可以使用 RGB 表示,比如 'rgb(128, 128, 128)' ,如果想要加上 alpha 通道,可以使用 RGBA,比如 'rgba(128, 128, 128, 0.5)',也可以使用十六进制格式,比如 '#ccc'

legend.borderColor    |   Color

[ default: '#ccc' ]

图例的边框颜色。支持的颜色格式同 backgroundColor。


legend.borderWidth    |   number

[ default: 1 ]

图例的边框线宽。


legend.borderRadius    |   number, Array

[ default: 0 ]

圆角半径,单位px,支持传入数组分别指定 4 个圆角半径。 如:

borderRadius: 5, // 统一设置四个角的圆角大小
borderRadius: [5, 5, 0, 0] //(顺时针左上,右上,右下,左下)
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号