(function() { const dom = document.getElementById('chart-calendar'); const myChart = echarts.init(dom); const calData = [], startDate = new Date('2026-01-01'); for (let i = 0; i < 180; i++) { const d = new Date(startDate.getTime() + i * 86400000); calData.push([d.toISOString().split('T')[0], Math.random() * 100]); } myChart.setOption({ tooltip: {}, visualMap: { min: 0, max: 100, type: 'piecewise', orient: 'horizontal', left: 'center', top: 0 }, calendar: { top: 80, left: 30, right: 30, cellSize: ['auto', 15], range: '2026', dayLabel: { firstDay: 1 }, monthLabel: {} }, series: [{ type: 'heatmap', coordinateSystem: 'calendar', data: calData }] }); window.addEventListener('resize', () => myChart.resize()); })();