ECharts配置項之title(標題)

標題居中

//left的值爲‘left‘, ‘center‘, ‘right‘
title:{
    left:‘center‘
}

主副標題之間的間距

title:{
    //默認爲10
     itemGap:20   
}

標題文本樣式

title:{
     text:‘標題文本‘,
     textStyle:{
        //文字顏色
        color:‘#ccc‘,
        //字體風格,‘normal‘,‘italic‘,‘oblique‘
        fontStyle:‘normal‘,
        //字體粗細 ‘normal‘,‘bold‘,‘bolder‘,‘lighter‘,100 | 200 | 300 | 400...
        fontWeight:‘bold‘,
        //字體系列
        fontFamily:‘sans-serif‘
        //字體大小
     fontSize:18
     }
    }

副標題

title:{
    subtext:‘副標題‘,
  //副標題文本樣式
  subtextStyle:{}
}

grid組件離容器左側的距離

title:{
    // left 的值可以是像 20 這樣的具體像素值,可以是像 ‘20%‘ 這樣相對於容器高寬的百分比,也可以是 ‘left‘, ‘center‘, ‘right‘。
    //如果 left 的值爲‘left‘, ‘center‘, ‘right‘,組件會根據相應的位置自動對齊。
   left:‘center‘      
}

原文:http://www.cnblogs.com/ytwanzi/p/6640935.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章