笔记: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语言标记滚动字幕,网页滚动文字的
- 下一篇: 魔兽服务器总是正在连接,魔兽世界怀旧服卡