ECharts配置项之title(标题)
1.标题居中
//left的值为'left', 'center', 'right'
title:{
left:'center'
}
2.主副标题之间的间距
title:{
//默认为10
itemGap:20
}
3.标题⽂本样式
title:{
text:'标题⽂本',
textStyle:{
//⽂字颜⾊
color:'#ccc',
//字体风格,'normal','italic','oblique'
fontStyle:'normal',
//字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 |
fontWeight:'bold',
//字体系列
fontFamily:'sans-serif'
//字体⼤⼩
fontweight属性bold    fontSize:18
}
}
4.副标题
title:{
subtext:'副标题',
  //副标题⽂本样式
  subtextStyle:{}
}
title:{
// left 的值可以是像 20 这样的具体像素值,可以是像 '20%' 这样相对于容器⾼宽的百分⽐,也可以是 'left', 'center', 'right'。    //如果 left 的值为'left', 'center', 'right',组件会根据相应的位置⾃动对齐。
left:'center'
}
同理,top,right,bottom⽤法同left.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。