在交互版打开 交互版

Excel 图表教程

映像世界知识库 · EXCEL 函数手册

鼠标悬浮在图表图片上,会显示图表的具体名称,点击图表图片跳转对应视频教程

全部

柱形图

折线图

饼图

面积图

其他

其他

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

教程

JS
// ==================== 分类筛选功能 ==================== // 当前选中的分类 let currentCategory = '全部'; // 筛选分类 function filterCategory(category) { currentCategory = category; // 更新按钮状态 const buttons = document.querySelectorAll('.category-btn'); buttons.forEach(btn => { if (btn.textContent === category) { btn.classList.add('active'); } else { btn.classList.remove('active'); } }); // 筛选卡片 const cards = document.querySelectorAll('.chart-card'); cards.forEach(card => { const cardCategory = card.getAttribute('data-category'); if (category === '全部' || cardCategory === category) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); // 平滑滚动到顶部 window.scrollTo({ top: 0, behavior: 'smooth' }); } // 初始化卡片展示 function initChartCards() { filterCategory('全部'); } // 页面加载完成后初始化 initChartCards();
JS
// 等待 Material 主题加载完成后订阅导航事件 (function() { // 使用 MutationObserver 监听 DOM 变化,作为备用方案 let lastUrl = location.href; new MutationObserver(() => { const url = location.href; if (url !== lastUrl) { lastUrl = url; // URL 变化时重新初始化 if (typeof initChartCards === 'function') { setTimeout(initChartCards, 100); } } }).observe(document.body, { subtree: true, childList: true }); // 尝试订阅 Material 主题的 document$ 事件 function trySubscribe() { if (typeof document$ !== 'undefined' && document$.subscribe) { document$.subscribe(() => { if (typeof initChartCards === 'function') { setTimeout(initChartCards, 50); } }); } else { // 如果 document$ 还没准备好,稍后重试 setTimeout(trySubscribe, 200); } } trySubscribe(); })();
CSS
/* 只对当前页面生效 - 使用更具体的选择器 */ body:has(.chart-cards-container) .md-sidebar--secondary { display: none !important; } body:has(.chart-cards-container) .md-main__inner { max-width: none !important; } body:has(.chart-cards-container) .md-grid { max-width: none !important; } body:has(.chart-cards-container) .md-content { max-width: none !important; margin-right: 1rem !important; } body:has(.chart-cards-container) .md-content__inner { max-width: none !important; margin-left: auto !important; margin-right: 1rem !important; } /* 图表容器充分利用宽度 */ .chart-cards-container { width: 100%; max-width: none !important; } .chart-cards-grid { justify-content: flex-start; width: 100%; } /* 响应式调整 */ @media (max-width: 600px) { body:has(.chart-cards-container) .md-content { margin-right: 0.5rem !important; } body:has(.chart-cards-container) .md-content__inner { margin-right: 0.5rem !important; } }