option
option = { title: { text: '深圳月最低生活費組成(單位:元)', subtext: 'From ExcelHome', sublink: 'http://e.weibo.com/1341556070/AjQH99che' }, tooltip : { trigger: 'axis', axisPointer : { // 坐標軸指示器,坐標軸觸發有效 type : 'shadow' // 默認為直線,可選為:'line' | 'shadow' }, formatter: function (params) { var tar = params[0]; return tar.name + '
' + tar.seriesName + ' : ' + tar.value; } }, toolbox: { show : true, feature : { mark : {show: true}, dataView : {show: true, readOnly: false}, restore : {show: true}, saveAsImage : {show: true} } }, xAxis : [ { type : 'category', splitLine: {show:false}, data : ['總費用','房租','水電費','交通費','伙食費','日用品數'] } ], yAxis : [ { type : 'value' } ], series : [ { name:'輔助', type:'bar', stack: '總量', itemStyle:{ normal:{ barBorderColor:'rgba(0,0,0,0)', color:'rgba(0,0,0,0)' }, emphasis:{ barBorderColor:'rgba(0,0,0,0)', color:'rgba(0,0,0,0)' } }, data:[0, 1700, 1400, 1200, 300, 0] }, { name:'生活費', type:'bar', stack: '總量', itemStyle : { normal: {label : {show: true, position: 'inside'}}}, data:[2900, 1200, 300, 200, 900, 300] } ] };
刷 新
切換主題