document.addEventListener('DOMContentLoaded', function() { // 市场趋势图表 const marketTrendChart = echarts.init(document.getElementById('marketTrendChart')); marketTrendChart.setOption({ title: { text: '数据要素市场规模趋势', left: 'center' }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { bottom: '5%' }, grid: { left: '3%', right: '4%', bottom: '15%', top: '15%', containLabel: true }, xAxis: { type: 'category', data: ['2020', '2021', '2022', '2023', '2024E'] }, yAxis: { type: 'value', name: '亿元' }, series: [ { name: '数据交易规模', type: 'bar', data: [200, 400, 600, 800, 1000], itemStyle: { color: '#0d6efd' } }, { name: '数据融资规模', type: 'line', data: [2, 4, 6, 8, 10], itemStyle: { color: '#198754' } } ] }); // 监听窗口大小变化 window.addEventListener('resize', function() { marketTrendChart.resize(); }); });