option = { color:['#61a0a8','#d48265'], title: { text: '进度图', textStyle:{ color:'#aaa', fontSize:13 }, }, legend: { left:'right', data: ['图例1', '图例2'] }, tooltip : { show:false, trigger: 'axis', axisPointer : { // 坐标轴指示器,坐标轴触发有效 type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type:'time', min:"2018-07-25" }, yAxis: { type: 'category', axisTick:{ //y轴刻度线 "show":false }, axisLine :{ "show": false } }, series:[ { name:'已完工', type:'bar', stack:'工作中心', label: { normal: { show: true, position: 'inside', formatter: function (params) { if (params.data[0] != '') { return params.data[0]; } else { return ''; } } } }, data:[['2018-08-01','x1'],['2018-07-28','x2']] }, { name:'未派工|已派工', type:'bar', stack:'工作中心', label: { normal: { show: true, position: 'inside', formatter: function (params) { if (params.data[0] != '') { return params.data[0]; } else { return ''; } } } }, data:[['2018-08-05','x1'],['2018-08-04','x2']] }, ] };