ECharts
View on GitHub
Home
Example
API & Doc
Download
ZIP (Latest)
Link
Ecom-FE
Data Visualization
ZRender
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; if (params[1][2] != '-') { tar = params[1]; } else { tar = params[2]; } return tar[1] + '
' + tar[0] + ' : ' + tar[2]; } }, toolbox: { show : true, feature : { mark : true, dataView : {readOnly: false}, restore : true, saveAsImage : true } }, xAxis : [ { type : 'category', splitLine: {show:false}, data : ['总费用','房租','水电费','交通费','伙食费','日用品数'] } ], yAxis : [ { type : 'value', splitArea: {show : true} } ], series : [ { name:'辅助', type:'bar', stack: '总量', itemStyle:{ normal:{ borderColor:'rgba(0,0,0,0)', color:'rgba(0,0,0,0)' }, emphasis:{ borderColor:'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] } ] };
Refresh ~