' + params[i].seriesName + ' : ' + params[i].value + datatype;else res += '
' + params[i].seriesName + ' : 暂无';} } return res;} }, xAxis: [ { type: 'category', data: [], axisLabel:{ textStyle:{ color:'#666' } } } ], yAxis: [ { type: 'value', axisLabel: { formatter: '{value}套', textStyle:{ color:'#666' } } }, { type: 'value', show: true, splitLine: { show: false }, axisLabel: { formatter: function (value, index) { return value.toFixed(2) + '万';}, textStyle:{ color:'#666' } } } ], series: [ { name: '成交套数', type: 'bar', /* 设置柱状图颜色 */ itemStyle: { normal: { color: '#82D4F7' } }, barWidth: '40%', data: [] }, { name: '成交均价', type: 'line', yAxisIndex: 1, itemStyle: { /* 设置折线颜色 */ normal: { color: 'rgba(240, 116, 115, 1)' } }, data: [] } ] };try{ var myChart1 = echarts.init(document.getElementById('mainnew'));if(num===3){ option1.width=260;option1.height=155;}else if(num===2){ option1.height=155;} myChart1.setOption(option1);}catch{ } var num1=3;let xxx1='center';if(num1===3){ xxx1=80;} option = { grid: { y: 10 }, legend: { textStyle:{ color:'#666' }, x: xxx1, y: 'bottom', data: ['成交套数', '参考均价'] }, tooltip: { trigger: 'axis', formatter: function (params, ticket, callback) { var res = '';for (var i = 0, l = params.length;i < l;i++) { if (params[i].seriesName == "成交套数") { var datatype = "套";if (params[i].value != undefined){ res += params[i].seriesName + ' : ' + params[i].value + datatype + '
';} } else { var datatype = "万元/平";if(params[i].value){ res += params[i].seriesName + ' : ' + params[i].value + datatype;} } } return res;} }, xAxis: [ { type: 'category', data: ['2024-10','2024-11','2024-12','2025-1','2025-2','2025-3'], axisLabel: { textStyle:{ color:'#666' } } } ], yAxis: [ { type: 'value', axisLabel: { formatter: '{value}套', textStyle:{ color:'#666' } } }, { type: 'value', splitLine: { show: false }, axisLabel: { formatter: function (value, index) { return value.toFixed(2) + '万';}, textStyle:{ color:'#666' } } } ], series: [ { name: '成交套数', type: 'bar', /* 设置柱状图颜色 */ itemStyle: { normal: { color: '#82D4F7' } }, data: [0,0,0,0,0,0], barWidth: '40%' }, { name: '参考均价', type: 'line', yAxisIndex: 1, itemStyle: {/* 设置折线颜色 */ normal: { color: 'rgba(240, 116, 115, 1)' } }, data: [0.39,0.39,0.39,0.40,0.40,0.40] } ] };var commerce = '通许';if(commerce !== ''){ option = { grid: { y: 10 }, legend: { textStyle:{ color:'#666' }, x: 120, y: 'bottom', data: ['参考均价'] }, tooltip: { trigger: 'axis', formatter: function (params, ticket, callback) { var res = '';for (var i = 0, l = params.length;i < l;i++) { var datatype = "万元/平";if(params[i].value){ res += params[i].seriesName + ' : ' + params[i].value + datatype;} } return res;} }, xAxis: [ { type: 'category', data: ['2024-10','2024-11','2024-12','2025-1','2025-2','2025-3'], axisLabel: { textStyle:{ color:'#666' } } } ], yAxis: [ { type: 'value', splitLine: { show: false }, axisLabel: { formatter: function (value, index) { return value.toFixed(2) + '万';}, textStyle:{ color:'#666' } } } ], series: [ { name: '参考均价', type: 'line', yAxisIndex: 0, itemStyle: {/* 设置折线颜色 */ normal: { color: 'rgba(240, 116, 115, 1)' } }, data: [0.39,0.39,0.39,0.40,0.40,0.40] } ] };} if(num1===3){ option.width=250;}else if(num1===2){ option.height=165;} else if(num1===4){ option.height=210;} var myChart = echarts.init(document.getElementById('main'));myChart.setOption(option);