option = { xAxis: { type: 'category', data: ['A', 'B', 'C', 'D', 'E', 'F'], }, yAxis: { type: 'value' }, series: [ { name: '注册总量', type: 'line', data: [502.84, 205.97, 332.79, 281.55, 398.35, 214.02] }, //折线图流光配置 { name: '滑行的光点', type: 'lines', coordinateSystem: 'cartesian2d', polyline: true, effect: { show: true,//是否展示 period:10,//时间 trailLength:0.1,//尾部长度 symbolSize: 8,//点大小 symbol: 'circle',//点的类型 color: '#ddd',//颜色 }, data: [{ //coords:[['x轴数据',y轴数据]] 一一对应拼接 coords: [ ['A', 502.84], ['B', 205.97], ['C', 332.79], ['D', 281.55], ['E', 398.35], ['F', 214.02], ] }] } ] };
复制
一键式教学,包教包会,觉得有用记得关注糟老头子,这里只有干货.