option = { baseOption: { timeline: { data: flightnumber, left: '10%', right: '10%', bottom: 0, height: 60, axisType: 'category', show: true, autoPlay: false, playInterval: 1000, checkpointStyle: { color: '#04a5f1', borderColor: 'rgba(4, 165, 261, .5)' }, label: { normal: { formatter: function(v) { var _txt = v.replace(/\//igm, '\n'); return _txt; }, rotate: -45, position: 'bottom' } }, itemStyle: { normal: { color: '#04a5f1' }, }, lineStyle: { color: '#ddd' }, controlStyle: { show: false, }, }, title: { text: airLine, left: 'center' }, tooltip: { trigger: 'axis', }, toolbox: { show: true, feature: { mark: { show: true }, dataView: { show: true, readOnly: false }, magicType: { show: true, type: ['line', 'bar'] }, restore: { show: true }, saveAsImage: { show: true } } }, grid: [ ], xAxis: [{ type: 'category', data: date, axisLabel: { //坐标轴刻度标签的相关设置。 interval: 0, //设置为 1,表示『隔一个标签显示一个标签』 //rotate:-30, textStyle: { color: '#666', fontStyle: 'normal', } }, axisLine: { //坐标轴轴线相关设置 lineStyle: { color: '#666', opacity: 1 } }, splitLine: { //坐标轴在 grid 区域中的分隔线。 show: false, } } //data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"] //{type: 'category', gridIndex: 0, data:issueDate,name:'购票时间'}, //{type:'category', gridIndex: 1, data:xBoardedTimeData,name:'值机时间',axisLabel: {rotate: 50, interval: 0}, boundaryGap : false} ], yAxis: [ //{type:'value',gridIndex: 0,name:'购票人数'}, //{type:'value',gridIndex: 1,name:'值机人数'} { type: 'value', axisLabel: { textStyle: { color: '#666', } }, axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: false, }, name: '人数' } ], dataZoom: [ { // 这个dataZoom组件,默认控制x轴。 type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件 start: 10, // 左边在 10% 的位置。 end: 60, // 右边在 60% 的位置。 //xAxisIndex: [0] } ], series: seriesData } };
世人的悲欢并不相通,我只是觉得他们吵闹。