option = { color: ['#36cfc9','#000fff'], // 设置全局颜色数组 tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' }, //formatter: '{a}<br />{c}' }, title: { left: 'center', text: '大数据量面积图', }, legend: { bottom:'bottom', data: [ '需求', '工时'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: [{ type: 'category', data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', ] }], yAxis: [{ name: '需求', type: 'value', splitLine:true }, { name: '工时', type: 'value', splitLine:true } ], series: [ { name: '需求', type: 'bar', stack: '一季度', label: { show: true }, data: [620, 732, 701, 734, 1090, 1130, 1120] }, { name: '工时', type: 'bar', stack: '一季度', label: { show: true }, data: [620, 732, 701, 734, 1090, 1130, 1120] }, { name: '工时2', type: 'bar', stack: '二季度', label: { show: true }, data: [620, 732, 701, 734, 1090, 1130, 1120] }, { name: '需求2', stack: '二季度', type: 'bar', label: { show: true }, data: [120, 132, 101, 134, 290, 230, 220] }, ] }; // Enable data zoom when user click bar. myChart.on('click', function(params) { console.log(params); });