option = {
title: { //标题组件
show: true, //是否显示标题组件 默认true
text: "主标题",
link: "", //主标题超链接
textStyle: { //主标题样式
color: "rgba(0,0,0,1)",
fontStyle: "normal", //字体样式-倾斜 normal italic oblique
fontWeight: "normal", //字体粗细 bold lighter 400 500
fontFamily: "", //字体风格 黑体 楷体 宋体
fontSize: 12, //字体大小
lineHeight: "20", //行高
width: "20", //宽度
height: "20", //高度
textBorderColor: "rgba(0,0,0,1)", //文字描边颜色
textBorderWidth: "2", //文字描边宽度
textBorderType: "solid", //文字描边类型 直线solid 虚线dotted 后面还有很多
rich: {}, //自定义富文本样式
},
subtext: "副标题",
sublink: "", //副标题超链接
subtextStyle: {}, //副标题样式
textAlign: "", //标题的水平对齐 auto left right center
textVerticalAlign: "", //标题垂直对齐 auto top bottom middle
padding: [1, 1, 1, 1], //标题内边距
itemGap: 10, //主副标题之间的间距
z: 999, //标题的层级
top: '', bottom: '', left: '', right: '', //title组件距离容器的距离
backgroundColor: 'red', //标题背景颜色
borderColor: 'yellow', //标题边框颜色
borderWidth: 2, //标题边框现款
borderRadius: 5, //标题边框圆角
//shadow 阴影属性
}
}
echarts title属性
最新推荐文章于 2024-05-19 09:47:39 发布