legend
legend={
show:true, //是否顯示
zlevel:0, //所屬圖形的Canvas分層脚线,zlevel 大的 Canvas 會(huì)放在 zlevel 小的 Canvas 的上面
z:2, //所屬組件的z分層鹿蜀,z值小的圖形會(huì)被z值大的圖形覆蓋
left:"center", //組件離容器左側(cè)的距離,'left', 'center', 'right','20%'
top:"top", //組件離容器上側(cè)的距離,'top', 'middle', 'bottom','20%'
right:"auto", //組件離容器右側(cè)的距離,'20%'
bottom:"auto", //組件離容器下側(cè)的距離,'20%'
width:"auto", //圖例寬度
height:"auto", //圖例高度
orient:"horizontal", //圖例排列方向
align:"auto", //圖例標(biāo)記和文本的對(duì)齊,left,right
padding:5, //圖例內(nèi)邊距,單位px 5 [5, 10] [5,10,5,10]
itemGap:10, //圖例每項(xiàng)之間的間隔
itemWidth:25, //圖例標(biāo)記的圖形寬度
itemHeight:14, //圖例標(biāo)記的圖形高度
formatter:function (name) { //用來(lái)格式化圖例文本鼠证,支持字符串模板和回調(diào)函數(shù)兩種形式肯尺。模板變量為圖例名稱(chēng) {name}
return 'Legend ' + name;
},
selectedMode:"single", //圖例選擇的模式,true開(kāi)啟,false關(guān)閉,single單選,multiple多選
inactiveColor:"#ccc", //圖例關(guān)閉時(shí)的顏色
textStyle:mytextStyle, //文本樣式
data:['類(lèi)別1', '類(lèi)別2', '類(lèi)別3'], //series中根據(jù)名稱(chēng)區(qū)分
backgroundColor:"transparent", //標(biāo)題背景色
borderColor:"#ccc", //邊框顏色
borderWidth:0, //邊框線(xiàn)寬
shadowColor:"red", //陰影顏色
shadowOffsetX:0, //陰影水平方向上的偏移距離
shadowOffsetY:0, //陰影垂直方向上的偏移距離
shadowBlur:10, //陰影的模糊大小
};