title:{
show:true,//false
text:"图表标题",//主标题文本
textStyle:{
color:'#ccc',//'red',字体颜色
fontStyle:'normal',//'italic'(倾斜) | 'oblique'(倾斜体) ,字体风格
fontWeight:'normal',//'bold'(粗体) | 'bolder'(粗体) | 'lighter'(正常粗细) ,字体粗细
fontFamily:'sans-serif',//'sans-serif' | 'serif' | 'monospace' | 'Arial' | 'Courier New'
// 'Microsoft YaHei'(微软雅黑) ,文字字体
fontSize:18,//字体大小
lineHeight:18,//字体行高
},
subtext:"副标题",//副标题文本
subtextStyle:{
color:#ccc,//字体颜色
fontStyle:'normal',//字体风格
fontWeight:'normal',//字体粗细
fontFamily:'sans-serif',//文字字体
fontSize:18,//字体大小
lineHeight:18,//字体行高
align:'center',//'left' | 'right' ,文字水平对齐方式
verticalAlign:'middle',//'top' | 'bottom' ,文字垂直对齐方式
}
textAlign:'auto',//整体(包括 text 和 subtext)的水平对齐
textVerticalAlign:'auto',//整体(包括 text 和 subtext)的垂直对齐
padding:0,//[5,10] | [ 5,6, 7, 8] ,标题内边距
left:'auto',//'5' | '5%',title 组件离容器左侧的距离
right:'auto',//'title 组件离容器右侧的距离
top:'auto',//title 组件离容器上侧的距离
bottom:'auto',//title 组件离容器下侧的距离
}
ECharts 图表标题(title)系列设置
最新推荐文章于 2025-03-31 11:00:02 发布