var names = [], values = []; for (var a = 0; a < 10; a++) { names.push("数据" + a); values.push(Math.round(Math.random() * 100)); } option = { grid: { top: 20, bottom: 40, left: 50, right: 30 }, xAxis: { position: 'bottom', type: 'category', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: true, interval: 0, rotate: 0 }, splitLine: { show: false }, gridIndex: 0, data: names }, yAxis: { axisLine: { show: false }, axisTick: { show: true }, axisLabel: { show: true, rotate: 0 }, splitLine: { show: false } }, series: [ { // 背景柱状图 type: 'bar', barWidth: '25', barGap: '-100%', animation: false, itemStyle: { normal: { borderWidth: 0, barBorderRadius: [4, 4, 0, 0], color: '#0d81d3' } }, label: { show: true, position: 'top', // color: '#fff' }, z: 0, data: values }, { // 分隔 type: 'pictorialBar', symbol: 'rect', symbolClip: true, symbolRotate: '-28', symbolRepeat: 'fixed', symbolPosition: 'start', symbolMargin: 3, symbolSize: [25, 4], symbolOffset: [0, 0], itemStyle: { normal: { color: '#3299e9', }, }, data: values } ] };