import echarts from 'echarts/lib/echarts'; export default function DrpOption(data) { let eopts = { tooltip: { trigger: 'axis', }, grid: { x: 40, y: 30, x2: 30, y2: 28, // borderWidth: 0 }, legend: { // 显示图例 show: true, }, xAxis: [ { type: 'category', data: ["1h","2h"], } ], yAxis: { type: 'value', axisLabel: { // format: 'projectFormat' formatter:'{value} mm' } }, }; let chartData = { series: [{ name: '降雨量', type: 'bar', barWidth: '60%', data: [6, 8], itemStyle: { color:"#6395fa" } }, ] }; return { eopts, chartData } }