修改折線圖大小
myChart.setOption({
title:{
text:"價格指數"
},
grid:{
x:25,
y:45,
x2:5,
y2:20,
borderWidth:1
},
....
餅圖修改顏色

- option = {
- title : {
- text: '全局指標狀態分布圖',
- x:'left',
- y:'top'
- },
- tooltip : {
- show: true,
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- color:['red', 'green','yellow','blueviolet']
- }
tooltip 提示換行
itemStyle: {
normal:{
label:{
show:true,
formatter: '{b} : {c} \n ({d}%)'
},
labelLine:{
show:true
}
},
修改 X 軸,Y 軸 顏色,粗細
xAxis : [ { type : 'category', data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'], //設置軸線的屬性 axisLine:{ lineStyle:{ color:'#FF0000', width:8,//這里是為了突出顯示加上的 } } } ], yAxis : [ { type : 'value', //設置軸線的屬性 axisLine:{ lineStyle:{ color:'#00FF00', width:8,//這里是為了突出顯示加上的 } } }