let option = { backgroundColor: '#fff', tooltip: {}, //详情提示 legend: { show: false }, grid: { top: 110 }, xAxis: {//配置x轴,x轴和y轴互换 type: "value" //值轴 }, yAxis: {//配置y轴 type: "category", //类目轴 data: ['雪碧', '可乐', '冰红茶', '绿茶', '茶π', '红牛'] }, series: [//配置数据系列,一个图表可以配置多个数据系列 { name: "", type: "bar",//数据系统的类型,即图表的类型。bar代表柱状状图 itemStyle: { color: 'red' }, data: [10, 2, 3, 4, 5, 6] } ] };