//散点图 export default function pointOption(data=[],dName = [],dx = []) { return { legend: { icon: 'rectangle', //data图标样式 itemWidth: 10, //data图标大小 itemHeight: 10, left: 15, textStyle: { fontSize: 8, fontWeight: 400 }, data: dName }, grid: { // left: '8%', top: 30 }, tooltip: { trigger: 'axis', backgroundColor: "#08182F", color: "#fff", borderColor: "#3373CC", textStyle: { color: "#fff", //设置文字颜色 fontSize: 9 }, extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", confine: true }, xAxis: { data: dx, axisLabel: { formatter: (value) => { let rex = "00:00:00"; let isCont = false; let str = value; for(let i = 0;i 9) { if(isCont == true) { str = value.substring(10, 16) } else { str = value.substring(5, 10) } } return str; } } }, yAxis: {}, series: [ { name: '新车上市', data: data[0], type: 'scatter', symbolSize: function (data) { return data[0]; }, emphasis: { focus: 'series', label: { show: true, formatter: function ( param ) { return param.data[3] }, position: 'top' } }, itemStyle: { color: '#FF4852' } }, { name: '车展', data: data[1], type: 'scatter', symbolSize: function (data) { return data[1]; }, emphasis: { focus: 'series', label: { show: true, formatter: function (param) { return param.data[3] }, position: 'top' } }, itemStyle: { color: '#FF6E25' } } ] } }