笔记:echarts 标题(title)设置
生活随笔
收集整理的这篇文章主要介绍了
笔记:echarts 标题(title)设置
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
var option = {title : {show:true, // 显示策略,默认值true,可选为:true(显示) | false(隐藏)text: '主标题', // 主标题文本,'\n'指定换行link:'', // 主标题文本超链接,默认值truetarget: null, // 指定窗口打开主标题超链接,支持'self' | 'blank',不指定等同为'blank'(新窗口)subtext: '副标题', // 副标题文本,'\n'指定换行sublink: '', // 副标题文本超链接subtarget: null, // 指定窗口打开副标题超链接,支持'self' | 'blank',不指定等同为'blank'(新窗口)x:'center', // 水平安放位置,默认为'left',可选为:'center' | 'left' | 'right' | {number}(x坐标,单位px)y: 'top', // 垂直安放位置,默认为top,可选为:'top' | 'bottom' | 'center' | {number}(y坐标,单位px)textAlign: null ,// 水平对齐方式,默认根据x设置自动调整,可选为: left' | 'right' | 'centerbackgroundColor: 'rgba(0,0,0,0)', //标题背景颜色,默认'rgba(0,0,0,0)'透明borderColor: '#ccc', // 标题边框颜色,默认'#ccc'borderWidth: 0, // 标题边框线宽,单位px,默认为0(无边框)padding: 5, // 标题内边距,单位px,默认各方向内边距为5,接受数组分别设定上右下左边距itemGap: 10, // 主副标题纵向间隔,单位px,默认为10textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}fontFamily: 'Arial',fontSize: 12,fontStyle: 'normal',fontWeight: 'normal',},subtextStyle: { // 副标题文本样式{"color": "#aaa"}fontFamily: 'Arial, Verdana, sans...',fontSize: 12,fontStyle: 'normal',fontWeight: 'normal',}}
}
总结
以上是生活随笔为你收集整理的笔记:echarts 标题(title)设置的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: html语言标记滚动字幕,网页滚动文字的
- 下一篇: 魔兽服务器总是正在连接,魔兽世界怀旧服卡