AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
新增32种SVG图表模板,包括面积图、箱线图、气泡图等,更新README以反映新模板数量和使用指南,优化文档结构以提升用户体验。
hugohe3dc9f2e2842b7
diff --git a/templates/charts/README.md b/templates/charts/README.mdindex 5b239287..e69014ad 100644--- a/templates/charts/README.md+++ b/templates/charts/README.md@@ -1,404 +1,466 @@# SVG 图表模板库-本目录包含标准化的 SVG 图表模板,用于提高生成质量和设计一致性。所有模板遵循 `docs/design_guidelines.md` 的设计规范。+本目录包含 **32 种**标准化 SVG 图表模板,按使用频率和功能分类,方便快速查找。## 📋 目录-- [使用方式](#使用方式)-- [模板列表](#模板列表)+- [快速选择指南](#快速选择指南)+- [常用图表](#常用图表)(高频使用)+- [进阶图表](#进阶图表)(中频使用)+- [专业图表](#专业图表)(特定场景)- [通用规范](#通用规范)- [自定义指南](#自定义指南)----## 使用方式+## 快速选择指南++| 我想展示... | 推荐图表 | 文件名 |+|------------|---------|--------|+| 几个数字指标 | KPI 卡片 | `kpi_cards.svg` |+| 类别数值对比 | 柱状图 / 条形图 | `bar_chart.svg` |+| 时间趋势变化 | 折线图 / 面积图 | `line_chart.svg` |+| 占比构成 | 饼图 / 环形图 | `pie_chart.svg` |+| 目标完成度 | 进度条 / 仪表盘 | `progress_bar_chart.svg` |+| 转化漏斗 | 漏斗图 | `funnel_chart.svg` |+| 项目排期 | 甘特图 | `gantt_chart.svg` |+| 多维评估 | 雷达图 | `radar_chart.svg` |+| 资金/流量流向 | 桑基图 | `sankey_chart.svg` |+| 战略分析 | SWOT / 波特五力 | `swot_analysis.svg` |-### 1. 选择合适的模板+----根据数据类型和展示目标选择:+## 常用图表-| 数据类型 | 推荐模板 | 使用场景 |-|---------|---------|---------|-| 关键指标 | KPI 卡片 | 展示数字、增长率、对比 |-| 分类对比 | 柱状图 | 3-8个类别的数值比较 |-| 构成对比 | 堆叠柱状图 | 多类别构成、占比趋势 |-| 趋势分析 | 折线图 | 时间序列、趋势变化 |-| 双量纲趋势 | 双Y轴折线图 | 两个不同单位指标的时序对比 |-| 占比分析 | 环形图 | 3-6个部分的比例展示 |-| 多维评估 | 雷达图 | 能力评估、竞品对比 |-| 流程转化 | 漏斗图 | 转化率、用户旅程 |-| 四象限分析 | 矩阵图 | 波士顿矩阵、风险评估 |-| 时序事件 | 时间轴 | 历史演进、里程碑 |-| 项目进度 | 甘特图 | 项目管理、任务排期 |-| 业务流程 | 流程图 | 流程步骤、决策树 |-| 层级关系 | 组织结构图 | 公司架构、团队结构 |+> ⭐ 日常数据展示最常用的图表类型-### 2. 复制并修改+### 📊 对比类-1. 将对应模板文件复制到项目中-2. 根据实际数据修改数值和文本-3. 按需调整颜色、尺寸等参数-4. 保持模板的基础结构和布局逻辑+#### 柱状图 (bar_chart.svg)-### 3. 画布适配+**用途**:类别数据对比(垂直柱状)-所有模板默认为 **1280×720 (16:9)** 画布。其他画布格式请参考 `docs/canvas_formats.md`,按比例调整:+**特点**:支持 3-8 个柱子 · 数值标签自动对齐 · 可选网格线-- **PPT 4:3 (1024×768)**:宽度缩放至 80%-- **小红书 3:4 (1242×1660)**:竖屏布局,元素垂直排列-- **方形 1:1 (1080×1080)**:居中布局,调整边距-- **Story 9:16 (1080×1920)**:竖屏长图,增加垂直间距+**适用场景**:销售额对比、区域排名、年度数据对比----## 模板列表+#### 水平条形图 (horizontal_bar_chart.svg)-### 1. KPI 卡片 (kpi_cards.svg)+**用途**:类别排名、数值对比(适合长标签)-**用途**:展示关键业绩指标+**特点**:支持 5-12 个条形 · 水平布局便于阅读 · 渐变色填充-**特点**:-- 支持 2×2 或 1×4 布局-- 大号数字 (48-56px)-- 趋势箭头和百分比-- 同比/环比说明+**适用场景**:品牌排行榜、销售排名、满意度评分-**适用场景**:-- 财务指标总览-- 业务数据看板-- 增长率展示+----### 2. 柱状图 (bar_chart.svg)+#### 分组柱状图 (grouped_bar_chart.svg)-**用途**:类别数据对比+**用途**:多系列数据对比-**特点**:-- 支持 3-8 个柱子-- 柱宽 40-60px,间距合理-- 数值标签自动对齐-- 可选网格线+**特点**:支持 3-6 组 × 2-4 系列 · 不同颜色区分系列-**适用场景**:-- 销售额对比-- 区域/产品排名-- 年度数据对比+**适用场景**:季度产品线对比、同比环比分析、多区域对比-### 3. 折线图 (line_chart.svg)+---++### 📈 趋势类++#### 折线图 (line_chart.svg)**用途**:趋势和变化展示-**特点**:-- 线条粗细 2-3px-- 数据点圆形标记 (半径 4-6px)-- 网格线 1px 浅灰色-- 支持多条折线对比+**特点**:线条 2-3px · 数据点圆形标记 · 支持多条折线对比++**适用场景**:时间序列分析、增长趋势、多指标对比++---++#### 面积图 (area_chart.svg)++**用途**:趋势变化、累积数据展示++**特点**:渐变填充强调累积量 · 峰值标注功能 · 底部统计卡片++**适用场景**:网站流量趋势、用户增长、销售累积++---++#### 双Y轴折线图 (dual_axis_line_chart.svg)++**用途**:两个不同量纲指标的时序对比++**特点**:左右独立Y轴 · 实线+虚线区分 · 阶段分隔标注++**适用场景**:销量与利润率、流量与转化率、产量与能耗++---++### 🥧 占比类++#### 饼图 (pie_chart.svg)++**用途**:占比和构成分析(基础版)++**特点**:支持 3-6 个分块 · 渐变色填充 · 右侧详细图例++**适用场景**:市场份额、预算分配、类别构成(3-5类)++---++#### 环形图 (donut_chart.svg)++**用途**:占比和构成分析(带中心数据)++**特点**:中心可显示总计 · 起始角度12点方向 · 视觉更现代++**适用场景**:市场份额、结构占比、类别构成(3-6类)++---++#### 堆叠柱状图 (stacked_bar_chart.svg)++**用途**:多类别构成对比、占比趋势++**特点**:支持 3-6 个堆叠类别 · 顶部显示总计 · 图例清晰++**适用场景**:收入构成分析、市场份额变化、预算分配对比++---++### 🎯 指标类++#### KPI 卡片 (kpi_cards.svg)++**用途**:展示关键业绩指标++**特点**:2×2 或 1×4 布局 · 大号数字 48-56px · 趋势箭头++**适用场景**:财务指标总览、业务数据看板、增长率展示++---++#### 仪表盘图 (gauge_chart.svg)++**用途**:单一指标达成度展示++**特点**:半圆仪表盘 · 三色分区 · 指针指示 · 状态标签-**适用场景**:-- 时间序列分析-- 增长趋势-- 多指标对比+**适用场景**:KPI完成率、健康指数、性能监控-### 4. 环形图 (donut_chart.svg)+---++#### 进度条图 (progress_bar_chart.svg)++**用途**:多项目标完成进度对比++**特点**:水平进度条 · 目标线标注 · 四色状态 · 概览卡片++**适用场景**:OKR进度追踪、项目完成度、预算执行情况++---++## 进阶图表++> 📈 业务分析和项目管理常用图表++### 📊 对比类(进阶)++#### 对比条形图 / 蝴蝶图 (butterfly_chart.svg)++**用途**:左右双向数据对比++**特点**:中轴对称布局 · 渐变色区分 · 百分比标签-**用途**:占比和构成分析+**适用场景**:人口金字塔、男女用户对比、AB测试、收支对比-**特点**:-- 支持 3-6 个分块-- 起始角度 -90° (12点方向)-- 环形宽度 40-60px-- 百分比标签清晰-- 中心可显示总计数据+---++#### 子弹图 (bullet_chart.svg)++**用途**:目标vs实际对比(比仪表盘更省空间)++**特点**:三色背景范围 · 目标线标注 · 达成率标签++**适用场景**:年度KPI达成、销售目标对比、绩效评估++---++#### 瀑布图 (waterfall_chart.svg)++**用途**:增减变化分析、财务分解++**特点**:增加项绿色 / 减少项红色 · 连接线展示累计++**适用场景**:年度利润分解、预算变化、成本构成变化++----**适用场景**:-- 市场份额分析-- 预算分配展示-- 结构占比分析-- 类别构成展示+### 📈 趋势类(进阶)-### 5. 漏斗图 (funnel_chart.svg)+#### 堆叠面积图 (stacked_area_chart.svg)++**用途**:多系列累积趋势、构成变化++**特点**:支持 4 个系列堆叠 · 渐变色填充 · 峰值标注++**适用场景**:营收来源趋势、流量来源变化、市场份额演进++---++### 🔍 分析类++#### 雷达图 (radar_chart.svg)++**用途**:多维度能力评估、综合对比++**特点**:支持 4-8 个维度 · 多边形网格 · 多系列对比++**适用场景**:能力素质评估、竞品对比、员工绩效、产品特性++---++#### 散点图 (scatter_chart.svg)++**用途**:相关性分析、数据分布展示++**特点**:支持 2 个系列 · 趋势线 · 统计信息面板++**适用场景**:广告投入vs销售额、价格vs需求、投入产出分析++---++#### 漏斗图 (funnel_chart.svg)**用途**:转化流程分析-**特点**:-- 3-5 个阶段-- 渐变色填充-- 转化率自动计算-- 损失标注+**特点**:3-5 个阶段 · 渐变色填充 · 转化率计算 · 损失标注-**适用场景**:-- 销售漏斗-- 用户转化-- 流程效率+**适用场景**:销售漏斗、用户转化、流程效率分析-### 6. 矩阵图 (matrix_2x2.svg)+---++#### 矩阵图 / 四象限 (matrix_2x2.svg)**用途**:四象限分析-**特点**:-- 2×2 布局-- 坐标轴清晰-- 象限标签-- 数据点可定制+**特点**:2×2 布局 · 坐标轴清晰 · 数据点可定制++**适用场景**:波士顿矩阵、风险评估、优先级分析-**适用场景**:-- 波士顿矩阵-- 风险评估-- 优先级分析+---++### 📅 项目管理类-### 7. 时间轴 (timeline.svg)+#### 甘特图 (gantt_chart.svg)++**用途**:项目进度规划、时间线管理++**特点**:6-12 个任务 · 时间轴 · 依赖关系线 · 里程碑标记++**适用场景**:项目管理看板、产品路线图、任务排期++---++#### 时间轴 (timeline.svg)**用途**:时序事件展示-**特点**:-- 水平或垂直布局-- 节点标记清晰-- 连接线统一-- 支持 3-8 个节点+**特点**:水平/垂直布局 · 节点清晰 · 支持 3-8 个节点-**适用场景**:-- 项目里程碑-- 历史演进-- 产品路线图+**适用场景**:项目里程碑、历史演进、产品路线图-### 8. 流程图 (process_flow.svg)+---++#### 流程图 (process_flow.svg)**用途**:业务流程、操作步骤展示-**特点**:-- 标准化步骤卡片(200×80px)-- 决策节点菱形设计-- 箭头方向清晰(支持回环)-- 时间统计信息面板-- 三种节点类型:流程步骤、决策判断、异常处理--**适用场景**:-- 业务流程图示-- 操作指南步骤-- 决策流程-- 项目工作流--### 9. 双Y轴折线图 (dual_axis_line_chart.svg)--**用途**:展示两个不同量纲指标的时序变化--**特点**:-- 左右两个Y轴,独立刻度-- 支持不同线型区分(实线+虚线)-- 支持不同数据点标记(圆点+方块)-- 阶段分隔线和标注背景框-- 关键数据点标注,避免重叠-- 数据点阴影效果--**适用场景**:-- 温湿度监控曲线-- 销量与利润率对比-- 流量与转化率分析-- 产量与能耗关系-- 任何需要双量纲对比的时序数据--### 10. 雷达图 (radar_chart.svg)--**用途**:多维度能力评估、综合对比分析--**特点**:-- 支持 4-8 个评估维度-- 六边形/多边形网格背景(可配置5层)-- 多数据系列对比(半透明填充)-- 数据点圆形标记,带边框-- 维度标签沿外围分布--**适用场景**:-- 能力素质评估-- 竞品综合对比-- 员工绩效分析-- 产品特性雷达--### 11. 堆叠柱状图 (stacked_bar_chart.svg)--**用途**:多类别构成对比、占比趋势分析--**特点**:-- 支持 3-6 个堆叠类别-- 支持 4-8 组数据对比-- 类别颜色区分清晰-- 顶部显示总计数值-- 图例说明各类别含义--**适用场景**:-- 收入/成本构成分析-- 市场份额变化-- 预算分配对比-- 时期构成变化--### 12. 组织结构图 (org_chart.svg)+**特点**:标准化步骤卡片 · 决策节点菱形 · 三种节点类型++**适用场景**:业务流程图、操作指南、决策流程++---++### 🏢 关系类++#### 组织结构图 (org_chart.svg)**用途**:层级关系展示、组织架构可视化-**特点**:-- 支持 2-4 层层级结构-- 卡片式节点设计(圆角矩形)-- 清晰的连接线(垂直+水平)-- 可配置颜色区分层级/部门-- 节点内容支持姓名、职位、人数+**特点**:支持 2-4 层 · 卡片式节点 · 清晰连接线-**适用场景**:-- 公司组织架构-- 团队成员结构-- 汇报关系展示-- 项目团队构成+**适用场景**:公司组织架构、团队结构、汇报关系-### 13. 甘特图 (gantt_chart.svg)+----**用途**:项目进度规划、时间线管理+## 专业图表++> 🔬 特定分析场景使用的专业图表++### 📊 统计分析类-**特点**:-- 支持 6-12 个任务条目-- 时间轴(月/周分隔)-- 任务条带渐变色-- 任务依赖关系线-- 里程碑菱形标记-- 今日线标注-- 阶段颜色编码+#### 箱线图 (box_plot_chart.svg)-**适用场景**:-- 项目管理看板-- 产品路线图-- 任务排期计划-- 里程碑跟踪+**用途**:数据分布和统计分析++**特点**:5组对比 · 四分位数 · 异常值标记 · 统计摘要++**适用场景**:薪资分布分析、成绩统计、质量控制、异常检测----## 通用规范+#### 热力图 (heatmap_chart.svg)-### 配色方案+**用途**:矩阵数据可视化、密度展示-**咨询风格**(专业、沉稳):-```-主色:#005587 (McKinsey Blue)-辅色:#0076A8 (Deloitte Blue)-强调:#F5A623 (橙色)-警示:#E74C3C (红色)-成功:#27AE60 (绿色)-```+**特点**:7×8 矩阵 · 蓝-黄-红色阶 · 数值标签 · 洞察卡片-**通用灵活风格**(现代、活力):-```-蓝色组:#2196F3, #42A5F5, #90CAF9-绿色组:#4CAF50, #66BB6A, #81C784-橙色组:#FF9800, #FFA726, #FFB74D-紫色组:#9C27B0, #AB47BC, #BA68C8-```+**适用场景**:用户活跃度时段、相关性矩阵、日历热图-### 文本规范+----```-标题:24-32px, font-weight: bold-正文:16-20px, font-weight: normal-数值:32-56px, font-weight: bold-标注:13-15px, font-weight: normal-```+#### 帕累托图 (pareto_chart.svg)-### 间距规范+**用途**:80/20分析,识别关键因素-```-卡片外边距:40-80px (横屏), 60-120px (竖屏)-卡片内边距:20-40px-元素间距:15-30px-标签距离:8-12px-```+**特点**:柱状图+累计折线 · 80%高亮 · 双Y轴 · 洞察建议框++**适用场景**:质量问题归因、销售贡献分析、客户投诉分类++---++### 🌊 流向类-### 必须遵守的约束+#### 桑基图 (sankey_chart.svg)-❌ **禁止使用 `<foreignObject>`**-✅ 使用 `<tspan>` 手动换行+**用途**:数据流向、转化路径可视化-❌ **禁止硬编码坐标**-✅ 使用相对位置和比例+**特点**:三层级节点 · 贝塞尔曲线 · 流量宽度代表数值-❌ **禁止混用字体**-✅ 统一使用系统 UI 字体栈+**适用场景**:预算分配流向、能源流向、用户转化路径----## 自定义指南+### 📦 层级占比类-### 修改颜色+#### 矩形树图 (treemap_chart.svg)-所有颜色定义集中在 `<defs>` 中的渐变或直接在元素的 `fill` 属性中:+**用途**:层级数据占比可视化-```xml-<!-- 修改前 -->-<rect fill="#2196F3" />+**特点**:多层级嵌套 · 面积代表数值 · 颜色区分类别-<!-- 修改后 -->-<rect fill="#FF5722" />-```+**适用场景**:预算分配可视化、磁盘空间、市场份额构成-### 调整尺寸+----保持元素间的比例关系,统一缩放:+### 🎯 多维数据类-```xml-<!-- 柱状图柱宽和间距成比例调整 -->-柱宽: 50px → 60px (增加 20%)-间距: 30px → 36px (同步增加 20%)-```+#### 气泡图 (bubble_chart.svg)-### 更换数据+**用途**:三维数据展示(X轴、Y轴、气泡大小)-1. **文本内容**:直接修改 `<text>` 中的 `<tspan>` 内容-2. **数值**:同步修改图表元素(如柱高、饼图角度)和文本标签-3. **数据点数量**:复制已有元素结构,调整位置+**特点**:四象限背景 · 气泡大小代表第三维度 · 产品列表面板-### 添加动画(可选)+**适用场景**:波士顿矩阵、市场规模vs增长率vs份额、竞品分析-为演示增加动效(注意:可能影响兼容性):+----```xml-<rect x="100" y="200" width="0" height="50" fill="#2196F3">- <animate attributeName="width" from="0" to="200" dur="1s" fill="freeze" />-</rect>-```+### 🎯 战略框架类++#### SWOT 分析图 (swot_analysis.svg)++**用途**:战略分析、竞争态势评估++**特点**:四象限卡片 · 颜色编码(绿/红/蓝/橙)· 中心品牌标识++**适用场景**:商业计划书、战略规划、竞品分析、可行性评估----## 质量检查清单+#### 波特五力图 (porter_five_forces.svg)-在使用模板生成图表后,请检查以下要点(CRAP 原则):+**用途**:行业竞争分析、战略规划-- [ ] **对齐 (Alignment)**:所有元素沿网格线对齐,无随意偏移-- [ ] **对比 (Contrast)**:标题、数值、标注层次清晰-- [ ] **重复 (Repetition)**:相同类型元素(如柱子、卡片)样式一致-- [ ] **亲密性 (Proximity)**:相关元素靠近,不相关元素分离+**特点**:五力放射状布局 · 威胁程度进度条 · 战略建议面板-其他技术检查:+**适用场景**:行业分析报告、市场进入评估、竞争策略制定-- [ ] `viewBox` 与画布格式一致-- [ ] 无 `<foreignObject>` 元素-- [ ] 文本使用 `<tspan>` 手动换行-- [ ] 颜色对比度符合可访问性标准-- [ ] 字号在规范范围内+---++## 通用规范++### 画布格式++所有模板默认为 **1280×720 (16:9)** 画布。其他格式按比例调整:++| 格式 | 尺寸 | 适配建议 |+|------|------|---------|+| PPT 4:3 | 1024×768 | 宽度缩放至 80% |+| 小红书 | 1242×1660 | 竖屏布局,元素垂直排列 |+| 方形 | 1080×1080 | 居中布局,调整边距 |+| Story | 1080×1920 | 竖屏长图,增加垂直间距 |++### 配色方案++**咨询风格**(专业、沉稳):+```+主色:#005587 辅色:#0076A8+强调:#F5A623 警示:#E74C3C 成功:#27AE60+```++**通用风格**(现代、活力):+```+蓝色组:#2196F3, #42A5F5, #90CAF9+绿色组:#4CAF50, #66BB6A, #81C784+橙色组:#FF9800, #FFA726, #FFB74D+```++### 文本规范++| 元素 | 字号 | 字重 |+|------|------|------|+| 标题 | 24-32px | bold |+| 正文 | 16-20px | normal |+| 数值 | 32-56px | bold |+| 标注 | 13-15px | normal |++### 必须遵守++❌ 禁止使用 `<foreignObject>` → ✅ 使用 `<tspan>` 手动换行+❌ 禁止混用字体 → ✅ 统一使用系统 UI 字体栈----## 贡献指南+## 自定义指南-### 新增模板+### 修改颜色-如需添加新的图表类型:+```xml+<!-- 修改前 -->+<rect fill="#2196F3" />+<!-- 修改后 -->+<rect fill="#FF5722" />+```++### 更换数据-1. 在本目录创建 `{chart_type}.svg` 文件-2. 遵循通用规范和设计原则-3. 更新本 README.md 的模板列表-4. 在模板文件中添加详细注释+1. **文本内容**:修改 `<text>` 中的 `<tspan>` 内容+2. **数值**:同步修改图表元素(如柱高)和文本标签+3. **数据点数量**:复制已有元素结构,调整位置-### 优化建议+----发现现有模板可优化之处:+## 质量检查清单-1. 在项目 Issues 中描述问题和建议-2. 提供优化后的 SVG 代码示例-3. 说明改进的理由和效果+- [ ] **对齐**:所有元素沿网格线对齐+- [ ] **对比**:标题、数值、标注层次清晰+- [ ] **重复**:相同类型元素样式一致+- [ ] **亲密性**:相关元素靠近,不相关元素分离+- [ ] `viewBox` 与画布格式一致+- [ ] 无 `<foreignObject>` 元素---@@ -407,11 +469,10 @@- **设计规范**:`docs/design_guidelines.md`- **画布格式**:`docs/canvas_formats.md`- **工作流程**:`docs/workflow_tutorial.md`-- **速查表**:`docs/quick_reference.md`- **示例项目**:`examples/`---**维护者**:PPT Master Team-**最后更新**:2025-12-06-+**最后更新**:2025-12-11+**模板数量**:32 种图表类型diff --git a/templates/charts/area_chart.svg b/templates/charts/area_chart.svgnew file mode 100644index 00000000..68ef10f2--- /dev/null+++ b/templates/charts/area_chart.svg@@ -0,0 +1,255 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 面积图模板+ 用途: 趋势变化、累积数据展示+ 适用场景: 流量趋势、销售累积、库存变化、用户增长+ 支持: 12个时间点 × 2系列(可调整)+ 与折线图区别: 填充面积,更强调量的累积和变化+ -->++ <defs>+ <!-- 面积填充渐变(蓝色系列) -->+ <linearGradient id="areaGrad1" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.6" />+ <stop offset="100%" style="stop-color:#2196F3;stop-opacity:0.1" />+ </linearGradient>++ <!-- 面积填充渐变(绿色系列) -->+ <linearGradient id="areaGrad2" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:0.5" />+ <stop offset="100%" style="stop-color:#4CAF50;stop-opacity:0.05" />+ </linearGradient>++ <!-- 数据点阴影 -->+ <filter id="dotShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.3"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>网站流量趋势分析</tspan>+ </text>++ <text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年度月度数据 · 单位:万次访问</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(950, 70)">+ <line x1="0" y1="10" x2="30" y2="10" stroke="#2196F3" stroke-width="3"/>+ <circle cx="15" cy="10" r="5" fill="#2196F3"/>+ <text x="40" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>PC端访问</tspan>+ </text>++ <line x1="150" y1="10" x2="180" y2="10" stroke="#4CAF50" stroke-width="3"/>+ <circle cx="165" cy="10" r="5" fill="#4CAF50"/>+ <text x="190" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>移动端访问</tspan>+ </text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- Y轴网格线 -->+ <line x1="120" y1="560" x2="1200" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="120" y1="470" x2="1200" y2="470" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="120" y1="380" x2="1200" y2="380" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="120" y1="290" x2="1200" y2="290" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="120" y1="200" x2="1200" y2="200" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="105" y="565" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>0</tspan>+ </text>+ <text x="105" y="475" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>200</tspan>+ </text>+ <text x="105" y="385" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>400</tspan>+ </text>+ <text x="105" y="295" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>600</tspan>+ </text>+ <text x="105" y="205" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>800</tspan>+ </text>++ <!-- 坐标轴 -->+ <line x1="120" y1="160" x2="120" y2="560" stroke="#95A5A6" stroke-width="2"/>+ <line x1="120" y1="560" x2="1200" y2="560" stroke="#95A5A6" stroke-width="2"/>++ <!-- X轴标签(12个月) -->+ <!-- 每个月间距: (1200-120)/12 = 90px -->+ <text x="165" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>1月</tspan></text>+ <text x="255" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>2月</tspan></text>+ <text x="345" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>3月</tspan></text>+ <text x="435" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>4月</tspan></text>+ <text x="525" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>5月</tspan></text>+ <text x="615" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>6月</tspan></text>+ <text x="705" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>7月</tspan></text>+ <text x="795" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>8月</tspan></text>+ <text x="885" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>9月</tspan></text>+ <text x="975" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>10月</tspan></text>+ <text x="1065" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>11月</tspan></text>+ <text x="1155" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>12月</tspan></text>++ <!--+ 数据点计算:+ X: 165, 255, 345, 435, 525, 615, 705, 795, 885, 975, 1065, 1155+ Y: 560 - (数值/200)*90 (每200单位=90px)++ PC端数据: 320, 280, 350, 420, 480, 520, 580, 620, 550, 490, 460, 520+ 移动端数据: 180, 160, 210, 280, 350, 420, 480, 540, 500, 460, 430, 490+ -->++ <!-- 面积1: PC端(蓝色) -->+ <path d="M 165,560+ L 165,416 L 255,434 L 345,402.5 L 435,371 L 525,344 L 615,326 L 705,299 L 795,281 L 885,312.5 L 975,339.5 L 1065,353 L 1155,326+ L 1155,560 Z"+ fill="url(#areaGrad1)"/>++ <!-- 折线1: PC端 -->+ <path d="M 165,416 L 255,434 L 345,402.5 L 435,371 L 525,344 L 615,326 L 705,299 L 795,281 L 885,312.5 L 975,339.5 L 1065,353 L 1155,326"+ fill="none" stroke="#2196F3" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>++ <!-- 面积2: 移动端(绿色) -->+ <path d="M 165,560+ L 165,479 L 255,488 L 345,465.5 L 435,434 L 525,402.5 L 615,371 L 705,344 L 795,317 L 885,335 L 975,353 L 1065,366.5 L 1155,339.5+ L 1155,560 Z"+ fill="url(#areaGrad2)"/>++ <!-- 折线2: 移动端 -->+ <path d="M 165,479 L 255,488 L 345,465.5 L 435,434 L 525,402.5 L 615,371 L 705,344 L 795,317 L 885,335 L 975,353 L 1065,366.5 L 1155,339.5"+ fill="none" stroke="#4CAF50" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>++ <!-- PC端数据点 -->+ <circle cx="165" cy="416" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="255" cy="434" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="345" cy="402.5" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="435" cy="371" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="525" cy="344" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="615" cy="326" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="705" cy="299" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="795" cy="281" r="6" fill="#2196F3" stroke="#FFFFFF" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="885" cy="312.5" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="975" cy="339.5" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="1065" cy="353" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="1155" cy="326" r="5" fill="#FFFFFF" stroke="#2196F3" stroke-width="2" filter="url(#dotShadow)"/>++ <!-- 移动端数据点 -->+ <circle cx="165" cy="479" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="255" cy="488" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="345" cy="465.5" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="435" cy="434" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="525" cy="402.5" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="615" cy="371" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="705" cy="344" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="795" cy="317" r="6" fill="#4CAF50" stroke="#FFFFFF" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="885" cy="335" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="975" cy="353" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="1065" cy="366.5" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>+ <circle cx="1155" cy="339.5" r="5" fill="#FFFFFF" stroke="#4CAF50" stroke-width="2" filter="url(#dotShadow)"/>++ <!-- 峰值标注(8月) -->+ <g>+ <rect x="755" y="225" width="80" height="45" rx="6" fill="#2196F3"/>+ <text x="795" y="245" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#FFFFFF" text-anchor="middle">+ <tspan>峰值</tspan>+ </text>+ <text x="795" y="262" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#FFFFFF" text-anchor="middle">+ <tspan>620万</tspan>+ </text>+ <path d="M 795,270 L 790,281 L 800,281 Z" fill="#2196F3"/>+ </g>+ </g>++ <!-- 统计卡片 -->+ <g id="statsCards" transform="translate(60, 620)">+ <!-- 卡片1: 总访问量 -->+ <rect x="0" y="0" width="200" height="70" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>+ <text x="20" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>年度总访问量</tspan>+ </text>+ <text x="20" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#2C3E50">+ <tspan>10,240万</tspan>+ </text>++ <!-- 卡片2: PC端占比 -->+ <rect x="220" y="0" width="180" height="70" rx="8" fill="#E3F2FD" stroke="#2196F3" stroke-width="1"/>+ <text x="240" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#1976D2">+ <tspan>PC端占比</tspan>+ </text>+ <text x="240" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#2196F3">+ <tspan>55.8%</tspan>+ </text>++ <!-- 卡片3: 移动端占比 -->+ <rect x="420" y="0" width="180" height="70" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="1"/>+ <text x="440" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#388E3C">+ <tspan>移动端占比</tspan>+ </text>+ <text x="440" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#4CAF50">+ <tspan>44.2%</tspan>+ </text>++ <!-- 卡片4: 同比增长 -->+ <rect x="620" y="0" width="180" height="70" rx="8" fill="#FFF3E0" stroke="#FF9800" stroke-width="1"/>+ <text x="640" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#F57C00">+ <tspan>同比增长</tspan>+ </text>+ <text x="640" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#FF9800">+ <tspan>+23.5%</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 网站分析平台</tspan>+ </text>+</svg>+diff --git a/templates/charts/box_plot_chart.svg b/templates/charts/box_plot_chart.svgnew file mode 100644index 00000000..fda3d303--- /dev/null+++ b/templates/charts/box_plot_chart.svg@@ -0,0 +1,308 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 箱线图模板+ 用途: 数据分布可视化、统计分析+ 适用场景: 薪资分布、成绩分析、质量控制、异常值检测+ 支持: 5组箱线图对比+ -->++ <defs>+ <!-- 箱体渐变 -->+ <linearGradient id="boxGrad1" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#42A5F5;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="boxGrad2" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#66BB6A;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="boxGrad3" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#FFB74D;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#F57C00;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="boxGrad4" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#BA68C8;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#7B1FA2;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="boxGrad5" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#EF5350;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#D32F2F;stop-opacity:1" />+ </linearGradient>++ <!-- 阴影 -->+ <filter id="boxShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.2"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>各部门薪资分布分析</tspan>+ </text>++ <text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年度薪酬报告 · 单位:万元/年</tspan>+ </text>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- Y轴网格线 -->+ <line x1="140" y1="550" x2="1000" y2="550" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="480" x2="1000" y2="480" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="410" x2="1000" y2="410" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="340" x2="1000" y2="340" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="270" x2="1000" y2="270" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="200" x2="1000" y2="200" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="130" x2="1000" y2="130" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="125" y="555" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>0</tspan></text>+ <text x="125" y="485" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>10</tspan></text>+ <text x="125" y="415" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>20</tspan></text>+ <text x="125" y="345" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>30</tspan></text>+ <text x="125" y="275" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>40</tspan></text>+ <text x="125" y="205" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>50</tspan></text>+ <text x="125" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>60</tspan></text>++ <!-- Y轴标题 -->+ <text x="45" y="340" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E" text-anchor="middle" transform="rotate(-90, 45, 340)">+ <tspan>年薪(万元)</tspan>+ </text>++ <!-- 坐标轴 -->+ <line x1="140" y1="130" x2="140" y2="550" stroke="#95A5A6" stroke-width="2"/>+ <line x1="140" y1="550" x2="1000" y2="550" stroke="#95A5A6" stroke-width="2"/>++ <!--+ 箱线图说明:+ - 每个箱体宽度: 80px+ - 箱体间距: 100px+ - 每10万=70px++ 数据(最小值, Q1, 中位数, Q3, 最大值):+ 技术部: 15, 25, 35, 45, 58 + 异常值 8+ 产品部: 12, 22, 28, 38, 50+ 设计部: 10, 18, 24, 32, 42+ 市场部: 8, 15, 22, 30, 45 + 异常值 55+ 运营部: 8, 14, 20, 26, 38+ -->++ <!-- 箱线图1: 技术部 (蓝色) -->+ <g id="box1" transform="translate(230, 0)">+ <!-- 上须线 (max=58) -->+ <line x1="0" y1="143.4" x2="0" y2="235" stroke="#1976D2" stroke-width="2"/>+ <line x1="-20" y1="143.4" x2="20" y2="143.4" stroke="#1976D2" stroke-width="2"/>++ <!-- 箱体 (Q1=25到Q3=45) -->+ <rect x="-40" y="235" width="80" height="140" rx="4" fill="url(#boxGrad1)" filter="url(#boxShadow)"/>++ <!-- 中位数线 (median=35) -->+ <line x1="-40" y1="305" x2="40" y2="305" stroke="#FFFFFF" stroke-width="3"/>++ <!-- 下须线 (min=15) -->+ <line x1="0" y1="375" x2="0" y2="445" stroke="#1976D2" stroke-width="2"/>+ <line x1="-20" y1="445" x2="20" y2="445" stroke="#1976D2" stroke-width="2"/>++ <!-- 异常值 (outlier=8) -->+ <circle cx="0" cy="494" r="6" fill="#FFFFFF" stroke="#1976D2" stroke-width="2"/>++ <!-- 标签 -->+ <text x="0" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#1976D2" text-anchor="middle"><tspan>技术部</tspan></text>++ <!-- 数值标注 -->+ <text x="50" y="148" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>58</tspan></text>+ <text x="50" y="240" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>45</tspan></text>+ <text x="50" y="310" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#2196F3"><tspan>35</tspan></text>+ <text x="50" y="380" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>25</tspan></text>+ <text x="50" y="450" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>15</tspan></text>+ </g>++ <!-- 箱线图2: 产品部 (绿色) -->+ <g id="box2" transform="translate(400, 0)">+ <!-- 上须线 (max=50) -->+ <line x1="0" y1="200" x2="0" y2="284" stroke="#388E3C" stroke-width="2"/>+ <line x1="-20" y1="200" x2="20" y2="200" stroke="#388E3C" stroke-width="2"/>++ <!-- 箱体 (Q1=22到Q3=38) -->+ <rect x="-40" y="284" width="80" height="112" rx="4" fill="url(#boxGrad2)" filter="url(#boxShadow)"/>++ <!-- 中位数线 (median=28) -->+ <line x1="-40" y1="354" x2="40" y2="354" stroke="#FFFFFF" stroke-width="3"/>++ <!-- 下须线 (min=12) -->+ <line x1="0" y1="396" x2="0" y2="466" stroke="#388E3C" stroke-width="2"/>+ <line x1="-20" y1="466" x2="20" y2="466" stroke="#388E3C" stroke-width="2"/>++ <!-- 标签 -->+ <text x="0" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#388E3C" text-anchor="middle"><tspan>产品部</tspan></text>+ </g>++ <!-- 箱线图3: 设计部 (橙色) -->+ <g id="box3" transform="translate(570, 0)">+ <!-- 上须线 (max=42) -->+ <line x1="0" y1="256" x2="0" y2="326" stroke="#F57C00" stroke-width="2"/>+ <line x1="-20" y1="256" x2="20" y2="256" stroke="#F57C00" stroke-width="2"/>++ <!-- 箱体 (Q1=18到Q3=32) -->+ <rect x="-40" y="326" width="80" height="98" rx="4" fill="url(#boxGrad3)" filter="url(#boxShadow)"/>++ <!-- 中位数线 (median=24) -->+ <line x1="-40" y1="382" x2="40" y2="382" stroke="#FFFFFF" stroke-width="3"/>++ <!-- 下须线 (min=10) -->+ <line x1="0" y1="424" x2="0" y2="480" stroke="#F57C00" stroke-width="2"/>+ <line x1="-20" y1="480" x2="20" y2="480" stroke="#F57C00" stroke-width="2"/>++ <!-- 标签 -->+ <text x="0" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#F57C00" text-anchor="middle"><tspan>设计部</tspan></text>+ </g>++ <!-- 箱线图4: 市场部 (紫色) -->+ <g id="box4" transform="translate(740, 0)">+ <!-- 上须线 (max=45) -->+ <line x1="0" y1="235" x2="0" y2="340" stroke="#7B1FA2" stroke-width="2"/>+ <line x1="-20" y1="235" x2="20" y2="235" stroke="#7B1FA2" stroke-width="2"/>++ <!-- 箱体 (Q1=15到Q3=30) -->+ <rect x="-40" y="340" width="80" height="105" rx="4" fill="url(#boxGrad4)" filter="url(#boxShadow)"/>++ <!-- 中位数线 (median=22) -->+ <line x1="-40" y1="396" x2="40" y2="396" stroke="#FFFFFF" stroke-width="3"/>++ <!-- 下须线 (min=8) -->+ <line x1="0" y1="445" x2="0" y2="494" stroke="#7B1FA2" stroke-width="2"/>+ <line x1="-20" y1="494" x2="20" y2="494" stroke="#7B1FA2" stroke-width="2"/>++ <!-- 异常值 (outlier=55) -->+ <circle cx="0" cy="165" r="6" fill="#FFFFFF" stroke="#7B1FA2" stroke-width="2"/>++ <!-- 标签 -->+ <text x="0" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#7B1FA2" text-anchor="middle"><tspan>市场部</tspan></text>+ </g>++ <!-- 箱线图5: 运营部 (红色) -->+ <g id="box5" transform="translate(910, 0)">+ <!-- 上须线 (max=38) -->+ <line x1="0" y1="284" x2="0" y2="368" stroke="#D32F2F" stroke-width="2"/>+ <line x1="-20" y1="284" x2="20" y2="284" stroke="#D32F2F" stroke-width="2"/>++ <!-- 箱体 (Q1=14到Q3=26) -->+ <rect x="-40" y="368" width="80" height="84" rx="4" fill="url(#boxGrad5)" filter="url(#boxShadow)"/>++ <!-- 中位数线 (median=20) -->+ <line x1="-40" y1="410" x2="40" y2="410" stroke="#FFFFFF" stroke-width="3"/>++ <!-- 下须线 (min=8) -->+ <line x1="0" y1="452" x2="0" y2="494" stroke="#D32F2F" stroke-width="2"/>+ <line x1="-20" y1="494" x2="20" y2="494" stroke="#D32F2F" stroke-width="2"/>++ <!-- 标签 -->+ <text x="0" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#D32F2F" text-anchor="middle"><tspan>运营部</tspan></text>+ </g>+ </g>++ <!-- 箱线图说明 -->+ <g id="boxLegend" transform="translate(1040, 130)">+ <rect x="0" y="0" width="200" height="240" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="100" y="28" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>图例说明</tspan></text>++ <line x1="15" y1="42" x2="185" y2="42" stroke="#E0E0E0" stroke-width="1"/>++ <!-- 示意图 -->+ <g transform="translate(30, 60)">+ <!-- 上须线 -->+ <line x1="30" y1="0" x2="30" y2="25" stroke="#5D6D7E" stroke-width="2"/>+ <line x1="20" y1="0" x2="40" y2="0" stroke="#5D6D7E" stroke-width="2"/>+ <text x="70" y="5" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>最大值</tspan></text>++ <!-- 箱体 -->+ <rect x="10" y="25" width="40" height="60" rx="3" fill="#BDC3C7"/>+ <text x="70" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>Q3 (75%)</tspan></text>++ <!-- 中位数 -->+ <line x1="10" y1="55" x2="50" y2="55" stroke="#2C3E50" stroke-width="2"/>+ <text x="70" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#2C3E50"><tspan>中位数</tspan></text>++ <text x="70" y="85" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>Q1 (25%)</tspan></text>++ <!-- 下须线 -->+ <line x1="30" y1="85" x2="30" y2="110" stroke="#5D6D7E" stroke-width="2"/>+ <line x1="20" y1="110" x2="40" y2="110" stroke="#5D6D7E" stroke-width="2"/>+ <text x="70" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>最小值</tspan></text>++ <!-- 异常值 -->+ <circle cx="30" cy="135" r="5" fill="#FFFFFF" stroke="#5D6D7E" stroke-width="2"/>+ <text x="70" y="140" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#E91E63"><tspan>异常值</tspan></text>+ </g>++ <text x="15" y="220" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="10" fill="#95A5A6"><tspan>IQR = Q3 - Q1</tspan></text>+ <text x="15" y="232" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="10" fill="#95A5A6"><tspan>异常值 > Q3+1.5*IQR</tspan></text>+ </g>++ <!-- 统计摘要 -->+ <g id="statsSummary" transform="translate(1040, 390)">+ <rect x="0" y="0" width="200" height="160" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="1"/>++ <text x="15" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2E7D32"><tspan>📊 统计摘要</tspan></text>++ <text x="15" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>最高中位数: 技术部 35万</tspan></text>+ <text x="15" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>最低中位数: 运营部 20万</tspan></text>+ <text x="15" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>分布最广: 技术部</tspan></text>+ <text x="15" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>分布最集中: 运营部</tspan></text>+ <text x="15" y="140" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#E91E63"><tspan>发现异常值: 2个</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 人力资源部门薪酬统计</tspan>+ </text>+</svg>+diff --git a/templates/charts/bubble_chart.svg b/templates/charts/bubble_chart.svgnew file mode 100644index 00000000..8d1a75ec--- /dev/null+++ b/templates/charts/bubble_chart.svg@@ -0,0 +1,289 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 气泡图模板+ 用途: 三维数据展示(X轴、Y轴、气泡大小)+ 适用场景: 市场规模vs增长率vs份额、风险评估、竞品分析+ 支持: 多个气泡,大小代表第三维度数据+ -->++ <defs>+ <!-- 气泡渐变(蓝色) -->+ <radialGradient id="bubbleGrad1" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#64B5F6;stop-opacity:0.9" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:0.7" />+ </radialGradient>++ <!-- 气泡渐变(绿色) -->+ <radialGradient id="bubbleGrad2" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#81C784;stop-opacity:0.9" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:0.7" />+ </radialGradient>++ <!-- 气泡渐变(橙色) -->+ <radialGradient id="bubbleGrad3" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#FFB74D;stop-opacity:0.9" />+ <stop offset="100%" style="stop-color:#F57C00;stop-opacity:0.7" />+ </radialGradient>++ <!-- 气泡渐变(紫色) -->+ <radialGradient id="bubbleGrad4" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#BA68C8;stop-opacity:0.9" />+ <stop offset="100%" style="stop-color:#7B1FA2;stop-opacity:0.7" />+ </radialGradient>++ <!-- 气泡渐变(红色) -->+ <radialGradient id="bubbleGrad5" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#EF5350;stop-opacity:0.9" />+ <stop offset="100%" style="stop-color:#D32F2F;stop-opacity:0.7" />+ </radialGradient>++ <!-- 气泡阴影 -->+ <filter id="bubbleShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="4"/>+ <feOffset dx="0" dy="3"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.3"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>产品线市场定位分析</tspan>+ </text>++ <text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>市场规模 vs 增长率 vs 市场份额 · 气泡大小代表市场份额</tspan>+ </text>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- 象限背景 -->+ <rect x="160" y="130" width="440" height="215" fill="#FFEBEE" opacity="0.3"/>+ <rect x="600" y="130" width="440" height="215" fill="#E8F5E9" opacity="0.3"/>+ <rect x="160" y="345" width="440" height="215" fill="#FFF3E0" opacity="0.3"/>+ <rect x="600" y="345" width="440" height="215" fill="#E3F2FD" opacity="0.3"/>++ <!-- 象限标签 -->+ <text x="380" y="160" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#C62828" text-anchor="middle"><tspan>低规模 · 高增长</tspan></text>+ <text x="380" y="178" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#E57373" text-anchor="middle"><tspan>明星产品 ⭐</tspan></text>++ <text x="820" y="160" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2E7D32" text-anchor="middle"><tspan>高规模 · 高增长</tspan></text>+ <text x="820" y="178" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#81C784" text-anchor="middle"><tspan>金牛产品 🐂</tspan></text>++ <text x="380" y="530" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#EF6C00" text-anchor="middle"><tspan>低规模 · 低增长</tspan></text>+ <text x="380" y="548" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#FFB74D" text-anchor="middle"><tspan>问题产品 ❓</tspan></text>++ <text x="820" y="530" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#1565C0" text-anchor="middle"><tspan>高规模 · 低增长</tspan></text>+ <text x="820" y="548" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#64B5F6" text-anchor="middle"><tspan>现金牛 💰</tspan></text>++ <!-- 网格线 -->+ <line x1="160" y1="345" x2="1040" y2="345" stroke="#BDC3C7" stroke-width="2" stroke-dasharray="6,3"/>+ <line x1="600" y1="130" x2="600" y2="560" stroke="#BDC3C7" stroke-width="2" stroke-dasharray="6,3"/>++ <!-- Y轴网格线 -->+ <line x1="160" y1="200" x2="1040" y2="200" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="160" y1="270" x2="1040" y2="270" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="160" y1="420" x2="1040" y2="420" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="160" y1="490" x2="1040" y2="490" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- X轴网格线 -->+ <line x1="280" y1="130" x2="280" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="400" y1="130" x2="400" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="520" y1="130" x2="520" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="720" y1="130" x2="720" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="840" y1="130" x2="840" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="960" y1="130" x2="960" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="145" y="565" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>-10%</tspan></text>+ <text x="145" y="495" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>0%</tspan></text>+ <text x="145" y="425" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>10%</tspan></text>+ <text x="145" y="350" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#95A5A6" text-anchor="end"><tspan>20%</tspan></text>+ <text x="145" y="275" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>30%</tspan></text>+ <text x="145" y="205" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>40%</tspan></text>+ <text x="145" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>50%</tspan></text>++ <!-- Y轴标题 -->+ <text x="35" y="345" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E" text-anchor="middle" transform="rotate(-90, 35, 345)">+ <tspan>市场增长率 (%)</tspan>+ </text>++ <!-- X轴刻度标签 -->+ <text x="160" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>0</tspan></text>+ <text x="280" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>20</tspan></text>+ <text x="400" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>40</tspan></text>+ <text x="520" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>60</tspan></text>+ <text x="600" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#95A5A6" text-anchor="middle"><tspan>80</tspan></text>+ <text x="720" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>100</tspan></text>+ <text x="840" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>120</tspan></text>+ <text x="960" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>140</tspan></text>+ <text x="1040" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>160</tspan></text>++ <!-- X轴标题 -->+ <text x="600" y="625" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E" text-anchor="middle">+ <tspan>市场规模(亿元)</tspan>+ </text>++ <!-- 坐标轴 -->+ <line x1="160" y1="130" x2="160" y2="560" stroke="#95A5A6" stroke-width="2"/>+ <line x1="160" y1="560" x2="1040" y2="560" stroke="#95A5A6" stroke-width="2"/>++ <!--+ 气泡数据:+ X: 市场规模(亿元)0-160,每20亿=120px+ Y: 增长率 -10%到50%,每10%=70px,基线(0%)在y=490+ 气泡大小: 市场份额 5%-35%,半径15-60px++ 产品A: 规模120亿, 增长35%, 份额28% -> x=820, y=245, r=50+ 产品B: 规模85亿, 增长25%, 份额18% -> x=630, y=315, r=38+ 产品C: 规模45亿, 增长42%, 份额12% -> x=430, y=196, r=28+ 产品D: 规模130亿, 增长8%, 份额25% -> x=880, y=434, r=45+ 产品E: 规模30亿, 增长-5%, 份额8% -> x=340, y=525, r=22+ 产品F: 规模65亿, 增长15%, 份额9% -> x=550, y=385, r=24+ -->++ <!-- 气泡F: 产品F (绿色,中等位置) -->+ <circle cx="550" cy="385" r="24" fill="url(#bubbleGrad2)" filter="url(#bubbleShadow)"/>+ <text x="550" y="390" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>F</tspan></text>++ <!-- 气泡E: 产品E (红色,问题象限) -->+ <circle cx="340" cy="525" r="22" fill="url(#bubbleGrad5)" filter="url(#bubbleShadow)"/>+ <text x="340" y="530" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>E</tspan></text>++ <!-- 气泡C: 产品C (橙色,明星象限) -->+ <circle cx="430" cy="196" r="28" fill="url(#bubbleGrad3)" filter="url(#bubbleShadow)"/>+ <text x="430" y="201" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>C</tspan></text>++ <!-- 气泡B: 产品B (紫色,金牛象限边缘) -->+ <circle cx="630" cy="315" r="38" fill="url(#bubbleGrad4)" filter="url(#bubbleShadow)"/>+ <text x="630" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>B</tspan></text>++ <!-- 气泡D: 产品D (蓝色,现金牛象限) -->+ <circle cx="880" cy="434" r="45" fill="url(#bubbleGrad1)" filter="url(#bubbleShadow)"/>+ <text x="880" y="439" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>D</tspan></text>++ <!-- 气泡A: 产品A (绿色,最大,金牛象限) -->+ <circle cx="820" cy="245" r="50" fill="url(#bubbleGrad2)" filter="url(#bubbleShadow)"/>+ <text x="820" y="250" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>A</tspan></text>+ </g>++ <!-- 产品列表 -->+ <g id="productList" transform="translate(1060, 130)">+ <rect x="0" y="0" width="180" height="320" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="90" y="28" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>产品列表</tspan></text>++ <line x1="15" y1="42" x2="165" y2="42" stroke="#E0E0E0" stroke-width="1"/>++ <!-- 产品A -->+ <circle cx="30" cy="70" r="12" fill="url(#bubbleGrad2)"/>+ <text x="50" y="66" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品A</tspan></text>+ <text x="50" y="82" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>120亿 | +35% | 28%</tspan></text>++ <!-- 产品B -->+ <circle cx="30" cy="115" r="10" fill="url(#bubbleGrad4)"/>+ <text x="50" y="111" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品B</tspan></text>+ <text x="50" y="127" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>85亿 | +25% | 18%</tspan></text>++ <!-- 产品C -->+ <circle cx="30" cy="160" r="8" fill="url(#bubbleGrad3)"/>+ <text x="50" y="156" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品C</tspan></text>+ <text x="50" y="172" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>45亿 | +42% | 12%</tspan></text>++ <!-- 产品D -->+ <circle cx="30" cy="205" r="11" fill="url(#bubbleGrad1)"/>+ <text x="50" y="201" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品D</tspan></text>+ <text x="50" y="217" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>130亿 | +8% | 25%</tspan></text>++ <!-- 产品E -->+ <circle cx="30" cy="250" r="7" fill="url(#bubbleGrad5)"/>+ <text x="50" y="246" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品E</tspan></text>+ <text x="50" y="262" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>30亿 | -5% | 8%</tspan></text>++ <!-- 产品F -->+ <circle cx="30" cy="295" r="7" fill="url(#bubbleGrad2)"/>+ <text x="50" y="291" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#2C3E50"><tspan>产品F</tspan></text>+ <text x="50" y="307" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>65亿 | +15% | 9%</tspan></text>+ </g>++ <!-- 气泡大小图例 -->+ <g id="sizeLegend" transform="translate(1060, 470)">+ <rect x="0" y="0" width="180" height="90" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>+ <text x="90" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>气泡大小 = 市场份额</tspan></text>++ <circle cx="40" cy="60" r="10" fill="#BDC3C7"/>+ <text x="40" y="82" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="10" fill="#7F8C8D" text-anchor="middle"><tspan>10%</tspan></text>++ <circle cx="90" cy="55" r="18" fill="#BDC3C7"/>+ <text x="90" y="82" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="10" fill="#7F8C8D" text-anchor="middle"><tspan>20%</tspan></text>++ <circle cx="145" cy="48" r="25" fill="#BDC3C7"/>+ <text x="145" y="82" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="10" fill="#7F8C8D" text-anchor="middle"><tspan>30%</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 市场研究部门</tspan>+ </text>+</svg>+diff --git a/templates/charts/bullet_chart.svg b/templates/charts/bullet_chart.svgnew file mode 100644index 00000000..a787b9bc--- /dev/null+++ b/templates/charts/bullet_chart.svg@@ -0,0 +1,214 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ Bullet Chart Template+ Purpose: Target vs Actual comparison, more space-efficient than gauges+ Use cases: KPI achievement, sales targets, budget execution, performance evaluation+ Supports: 5 metrics displayed in parallel+ -->++ <defs>+ <linearGradient id="bulletExcellent" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E8F5E9;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#C8E6C9;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="bulletGood" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FFF8E1;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFE082;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="bulletFair" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FFEBEE;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFCDD2;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="actualBar" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#1976D2;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#2196F3;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="actualBarGreen" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#388E3C;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#4CAF50;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="actualBarOrange" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#F57C00;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FF9800;stop-opacity:1" />+ </linearGradient>+ </defs>++ <rect width="1280" height="720" fill="#FFFFFF"/>++ <text x="640" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>2025 Annual KPI Achievement Status</tspan>+ </text>++ <text x="640" y="85" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>Target vs Actual - As of Q4</tspan>+ </text>++ <!-- Legend -->+ <g id="legend" transform="translate(900, 100)">+ <rect x="0" y="0" width="20" height="12" fill="#FFCDD2" rx="2"/>+ <text x="28" y="10" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>Fair (0-60%)</tspan></text>++ <rect x="120" y="0" width="20" height="12" fill="#FFE082" rx="2"/>+ <text x="148" y="10" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>Good (60-80%)</tspan></text>++ <rect x="250" y="0" width="20" height="12" fill="#C8E6C9" rx="2"/>+ <text x="278" y="10" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>Excellent (80-100%+)</tspan></text>+ </g>++ <!-- Bullet 1: Sales Revenue 92% -->+ <g id="bullet1" transform="translate(80, 140)">+ <text x="0" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>Sales Revenue</tspan>+ </text>+ <text x="0" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Target: $100M</tspan>+ </text>++ <rect x="180" y="20" width="900" height="50" fill="url(#bulletFair)" rx="4"/>+ <rect x="180" y="20" width="720" height="50" fill="url(#bulletGood)" rx="4"/>+ <rect x="180" y="20" width="540" height="50" fill="url(#bulletExcellent)" rx="4"/>+ <rect x="180" y="32" width="828" height="26" fill="url(#actualBarGreen)" rx="3"/>+ <line x1="1080" y1="15" x2="1080" y2="75" stroke="#E74C3C" stroke-width="4"/>+ <text x="1020" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF">+ <tspan>$92M</tspan>+ </text>+ <text x="1120" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#4CAF50">+ <tspan>92%</tspan>+ </text>+ </g>++ <!-- Bullet 2: New Customers 97% -->+ <g id="bullet2" transform="translate(80, 240)">+ <text x="0" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>New Customers</tspan>+ </text>+ <text x="0" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Target: 500</tspan>+ </text>++ <rect x="180" y="20" width="900" height="50" fill="url(#bulletFair)" rx="4"/>+ <rect x="180" y="20" width="720" height="50" fill="url(#bulletGood)" rx="4"/>+ <rect x="180" y="20" width="540" height="50" fill="url(#bulletExcellent)" rx="4"/>+ <rect x="180" y="32" width="873" height="26" fill="url(#actualBarGreen)" rx="3"/>+ <line x1="1080" y1="15" x2="1080" y2="75" stroke="#E74C3C" stroke-width="4"/>+ <text x="1050" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF">+ <tspan>485</tspan>+ </text>+ <text x="1120" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#4CAF50">+ <tspan>97%</tspan>+ </text>+ </g>++ <!-- Bullet 3: Customer Satisfaction 98% -->+ <g id="bullet3" transform="translate(80, 340)">+ <text x="0" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>Customer Satisfaction</tspan>+ </text>+ <text x="0" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Target: 90%</tspan>+ </text>++ <rect x="180" y="20" width="900" height="50" fill="url(#bulletFair)" rx="4"/>+ <rect x="180" y="20" width="720" height="50" fill="url(#bulletGood)" rx="4"/>+ <rect x="180" y="20" width="540" height="50" fill="url(#bulletExcellent)" rx="4"/>+ <rect x="180" y="32" width="880" height="26" fill="url(#actualBarGreen)" rx="3"/>+ <line x1="990" y1="15" x2="990" y2="75" stroke="#E74C3C" stroke-width="4"/>+ <text x="1050" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF">+ <tspan>88%</tspan>+ </text>+ <text x="1120" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#4CAF50">+ <tspan>98%</tspan>+ </text>+ </g>++ <!-- Bullet 4: Market Share 72% -->+ <g id="bullet4" transform="translate(80, 440)">+ <text x="0" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>Market Share</tspan>+ </text>+ <text x="0" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Target: 25%</tspan>+ </text>++ <rect x="180" y="20" width="900" height="50" fill="url(#bulletFair)" rx="4"/>+ <rect x="180" y="20" width="720" height="50" fill="url(#bulletGood)" rx="4"/>+ <rect x="180" y="20" width="540" height="50" fill="url(#bulletExcellent)" rx="4"/>+ <rect x="180" y="32" width="648" height="26" fill="url(#actualBarOrange)" rx="3"/>+ <line x1="1080" y1="15" x2="1080" y2="75" stroke="#E74C3C" stroke-width="4"/>+ <text x="815" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF">+ <tspan>18%</tspan>+ </text>+ <text x="1120" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FF9800">+ <tspan>72%</tspan>+ </text>+ </g>++ <!-- Bullet 5: Cost Control 119% (Over budget) -->+ <g id="bullet5" transform="translate(80, 540)">+ <text x="0" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>Cost Control</tspan>+ </text>+ <text x="0" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Budget: $80M</tspan>+ </text>++ <rect x="180" y="20" width="900" height="50" fill="url(#bulletExcellent)" rx="4"/>+ <rect x="720" y="20" width="360" height="50" fill="url(#bulletGood)" rx="4"/>+ <rect x="900" y="20" width="180" height="50" fill="url(#bulletFair)" rx="4"/>+ <rect x="180" y="32" width="855" height="26" fill="#E74C3C" rx="3"/>+ <line x1="720" y1="15" x2="720" y2="75" stroke="#4CAF50" stroke-width="4"/>+ <text x="1020" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF">+ <tspan>$95M</tspan>+ </text>+ <text x="1120" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#E74C3C">+ <tspan>119%</tspan>+ </text>+ </g>++ <!-- Insight box -->+ <g id="insight">+ <rect x="80" y="630" width="1120" height="60" rx="6" fill="#E3F2FD" stroke="#2196F3" stroke-width="2"/>+ <text x="100" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>Summary:</tspan>+ </text>+ <text x="200" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>3 KPIs exceeded targets. Market share growth needs strengthening. Cost control requires attention.</tspan>+ </text>+ <text x="100" y="678" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>Recommendation: Prioritize cutting non-core project expenses while increasing marketing budget.</tspan>+ </text>+ </g>+</svg>diff --git a/templates/charts/butterfly_chart.svg b/templates/charts/butterfly_chart.svgnew file mode 100644index 00000000..891bc010--- /dev/null+++ b/templates/charts/butterfly_chart.svg@@ -0,0 +1,247 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 对比条形图(蝴蝶图)模板+ 用途: 左右对比、双向数据展示+ 适用场景: 人口金字塔、AB测试、男女对比、收支对比+ 支持: 8个类别,左右两组数据+ -->++ <defs>+ <!-- 左侧渐变(蓝色) -->+ <linearGradient id="leftGrad" x1="100%" y1="0%" x2="0%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </linearGradient>++ <!-- 右侧渐变(粉色) -->+ <linearGradient id="rightGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E91E63;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#F06292;stop-opacity:1" />+ </linearGradient>++ <!-- 阴影 -->+ <filter id="barShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.2"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="640" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>用户年龄分布对比</tspan>+ </text>++ <text x="640" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>2025年度用户画像分析 · 样本量 N=50,000</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(480, 115)">+ <rect x="0" y="0" width="20" height="20" rx="3" fill="url(#leftGrad)"/>+ <text x="28" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>男性用户</tspan>+ </text>++ <rect x="140" y="0" width="20" height="20" rx="3" fill="url(#rightGrad)"/>+ <text x="168" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>女性用户</tspan>+ </text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- 中轴线 -->+ <line x1="640" y1="160" x2="640" y2="620" stroke="#BDC3C7" stroke-width="2"/>++ <!-- 左侧X轴刻度 -->+ <text x="160" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>20%</tspan></text>+ <text x="280" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>15%</tspan></text>+ <text x="400" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>10%</tspan></text>+ <text x="520" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>5%</tspan></text>++ <!-- 右侧X轴刻度 -->+ <text x="760" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>5%</tspan></text>+ <text x="880" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>10%</tspan></text>+ <text x="1000" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>15%</tspan></text>+ <text x="1120" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>20%</tspan></text>++ <!-- 网格线 -->+ <line x1="160" y1="160" x2="160" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="280" y1="160" x2="280" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="400" y1="160" x2="400" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="520" y1="160" x2="520" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="760" y1="160" x2="760" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="880" y1="160" x2="880" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="1000" y1="160" x2="1000" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="1120" y1="160" x2="1120" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!--+ 数据说明:+ 每个年龄段的条形高度: 50px,间距: 6px+ 最大宽度: 480px (代表20%)+ 每1% = 24px++ 男性数据: 3%, 8%, 15%, 18%, 16%, 12%, 6%, 2%+ 女性数据: 4%, 10%, 17%, 15%, 14%, 10%, 5%, 3%+ -->++ <!-- 年龄段1: 60+ -->+ <g transform="translate(0, 168)">+ <!-- 左侧条形 (男性 3%) -->+ <rect x="568" y="0" width="72" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="555" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>3%</tspan></text>++ <!-- 中间标签 -->+ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>60+</tspan></text>++ <!-- 右侧条形 (女性 4%) -->+ <rect x="640" y="0" width="96" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="745" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>4%</tspan></text>+ </g>++ <!-- 年龄段2: 50-59 -->+ <g transform="translate(0, 224)">+ <rect x="448" y="0" width="192" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="435" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>8%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>50-59</tspan></text>++ <rect x="640" y="0" width="240" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="890" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>10%</tspan></text>+ </g>++ <!-- 年龄段3: 40-49 -->+ <g transform="translate(0, 280)">+ <rect x="280" y="0" width="360" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="267" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>15%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>40-49</tspan></text>++ <rect x="640" y="0" width="408" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="1058" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>17%</tspan></text>+ </g>++ <!-- 年龄段4: 30-39 (峰值) -->+ <g transform="translate(0, 336)">+ <rect x="208" y="0" width="432" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="195" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#2196F3" text-anchor="end"><tspan>18%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>30-39</tspan></text>++ <rect x="640" y="0" width="360" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="1010" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>15%</tspan></text>+ </g>++ <!-- 年龄段5: 25-29 -->+ <g transform="translate(0, 392)">+ <rect x="256" y="0" width="384" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="243" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>16%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>25-29</tspan></text>++ <rect x="640" y="0" width="336" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="986" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>14%</tspan></text>+ </g>++ <!-- 年龄段6: 20-24 -->+ <g transform="translate(0, 448)">+ <rect x="352" y="0" width="288" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="339" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>12%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>20-24</tspan></text>++ <rect x="640" y="0" width="240" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="890" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>10%</tspan></text>+ </g>++ <!-- 年龄段7: 18-19 -->+ <g transform="translate(0, 504)">+ <rect x="496" y="0" width="144" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="483" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>6%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>18-19</tspan></text>++ <rect x="640" y="0" width="120" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="770" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>5%</tspan></text>+ </g>++ <!-- 年龄段8: <18 -->+ <g transform="translate(0, 560)">+ <rect x="592" y="0" width="48" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>+ <text x="579" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#2196F3" text-anchor="end"><tspan>2%</tspan></text>++ <text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan><18</tspan></text>++ <rect x="640" y="0" width="72" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>+ <text x="722" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E91E63"><tspan>3%</tspan></text>+ </g>+ </g>++ <!-- 统计摘要 -->+ <g id="summary" transform="translate(60, 665)">+ <rect x="0" y="0" width="280" height="40" rx="8" fill="#E3F2FD" stroke="#2196F3" stroke-width="1"/>+ <text x="20" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#1976D2">+ <tspan>👨 男性用户: 52% | 平均年龄: 34岁</tspan>+ </text>++ <rect x="300" y="0" width="280" height="40" rx="8" fill="#FCE4EC" stroke="#E91E63" stroke-width="1"/>+ <text x="320" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#C2185B">+ <tspan>👩 女性用户: 48% | 平均年龄: 32岁</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 用户数据分析平台</tspan>+ </text>+</svg>+diff --git a/templates/charts/gauge_chart.svg b/templates/charts/gauge_chart.svgnew file mode 100644index 00000000..61877b60--- /dev/null+++ b/templates/charts/gauge_chart.svg@@ -0,0 +1,262 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 仪表盘图模板+ 用途: 单一指标达成度展示+ 适用场景: KPI完成率、健康指数、性能评分、目标达成+ 支持: 3个仪表盘并排展示+ -->++ <defs>+ <!-- 背景弧渐变 -->+ <linearGradient id="bgArcGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E0E0E0;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#EEEEEE;stop-opacity:1" />+ </linearGradient>++ <!-- 优秀区域渐变(绿色) -->+ <linearGradient id="excellentGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#8BC34A;stop-opacity:1" />+ </linearGradient>++ <!-- 良好区域渐变(蓝色) -->+ <linearGradient id="goodGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#03A9F4;stop-opacity:1" />+ </linearGradient>++ <!-- 警告区域渐变(橙色) -->+ <linearGradient id="warningGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFC107;stop-opacity:1" />+ </linearGradient>++ <!-- 危险区域渐变(红色) -->+ <linearGradient id="dangerGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#f44336;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#E91E63;stop-opacity:1" />+ </linearGradient>++ <!-- 指针阴影 -->+ <filter id="needleShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="3"/>+ <feOffset dx="0" dy="2"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.4"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="640" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>业务核心指标仪表盘</tspan>+ </text>++ <text x="640" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>2025年第四季度实时数据</tspan>+ </text>++ <!-- 仪表盘1: 销售完成率 85% -->+ <g id="gauge1" transform="translate(220, 380)">+ <!-- 背景弧 -->+ <path d="M -150,0 A 150,150 0 0,1 150,0" fill="none" stroke="#EEEEEE" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度区域 (0-60% 红色, 60-80% 橙色, 80-100% 绿色) -->+ <!-- 红色区域 0-60% (0° to 108°) -->+ <path d="M -150,0 A 150,150 0 0,1 -46.35,-142.65" fill="none" stroke="#FFCDD2" stroke-width="30" stroke-linecap="round"/>+ <!-- 橙色区域 60-80% (108° to 144°) -->+ <path d="M -46.35,-142.65 A 150,150 0 0,1 58.68,-138.05" fill="none" stroke="#FFE0B2" stroke-width="30" stroke-linecap="round"/>+ <!-- 绿色区域 80-100% (144° to 180°) -->+ <path d="M 58.68,-138.05 A 150,150 0 0,1 150,0" fill="none" stroke="#C8E6C9" stroke-width="30" stroke-linecap="round"/>++ <!-- 当前值弧 85% (从左到85%位置,约153°) -->+ <path d="M -150,0 A 150,150 0 0,1 103.95,-108.45" fill="none" stroke="url(#excellentGrad)" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度线 -->+ <line x1="-135" y1="0" x2="-120" y2="0" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="-95.5" y1="-95.5" x2="-84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="0" y1="-135" x2="0" y2="-120" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="95.5" y1="-95.5" x2="84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="135" y1="0" x2="120" y2="0" stroke="#7F8C8D" stroke-width="2"/>++ <!-- 刻度标签 -->+ <text x="-155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>0%</tspan></text>+ <text x="0" y="-155" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>50%</tspan></text>+ <text x="155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>100%</tspan></text>++ <!-- 指针 (85% = 153°, 从-90°开始) -->+ <g transform="rotate(63)">+ <path d="M 0,-100 L -8,0 L 0,15 L 8,0 Z" fill="#2C3E50" filter="url(#needleShadow)"/>+ </g>+ <circle cx="0" cy="0" r="15" fill="#2C3E50"/>+ <circle cx="0" cy="0" r="8" fill="#FFFFFF"/>++ <!-- 中心数值 -->+ <text x="0" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="48" font-weight="bold" fill="#4CAF50" text-anchor="middle">+ <tspan>85%</tspan>+ </text>++ <!-- 标题 -->+ <text x="0" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>销售完成率</tspan>+ </text>++ <!-- 状态标签 -->+ <rect x="-35" y="115" width="70" height="26" rx="13" fill="#E8F5E9"/>+ <text x="0" y="133" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#4CAF50" text-anchor="middle">+ <tspan>优秀</tspan>+ </text>+ </g>++ <!-- 仪表盘2: 客户满意度 72% -->+ <g id="gauge2" transform="translate(640, 380)">+ <!-- 背景弧 -->+ <path d="M -150,0 A 150,150 0 0,1 150,0" fill="none" stroke="#EEEEEE" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度区域 -->+ <path d="M -150,0 A 150,150 0 0,1 -46.35,-142.65" fill="none" stroke="#FFCDD2" stroke-width="30" stroke-linecap="round"/>+ <path d="M -46.35,-142.65 A 150,150 0 0,1 58.68,-138.05" fill="none" stroke="#FFE0B2" stroke-width="30" stroke-linecap="round"/>+ <path d="M 58.68,-138.05 A 150,150 0 0,1 150,0" fill="none" stroke="#C8E6C9" stroke-width="30" stroke-linecap="round"/>++ <!-- 当前值弧 72% (约129.6°) -->+ <path d="M -150,0 A 150,150 0 0,1 24.93,-147.91" fill="none" stroke="url(#goodGrad)" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度线 -->+ <line x1="-135" y1="0" x2="-120" y2="0" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="-95.5" y1="-95.5" x2="-84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="0" y1="-135" x2="0" y2="-120" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="95.5" y1="-95.5" x2="84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="135" y1="0" x2="120" y2="0" stroke="#7F8C8D" stroke-width="2"/>++ <!-- 刻度标签 -->+ <text x="-155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>0%</tspan></text>+ <text x="0" y="-155" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>50%</tspan></text>+ <text x="155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>100%</tspan></text>++ <!-- 指针 (72% = 129.6°, 从-90°开始,即39.6°) -->+ <g transform="rotate(39.6)">+ <path d="M 0,-100 L -8,0 L 0,15 L 8,0 Z" fill="#2C3E50" filter="url(#needleShadow)"/>+ </g>+ <circle cx="0" cy="0" r="15" fill="#2C3E50"/>+ <circle cx="0" cy="0" r="8" fill="#FFFFFF"/>++ <!-- 中心数值 -->+ <text x="0" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="48" font-weight="bold" fill="#2196F3" text-anchor="middle">+ <tspan>72%</tspan>+ </text>++ <!-- 标题 -->+ <text x="0" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>客户满意度</tspan>+ </text>++ <!-- 状态标签 -->+ <rect x="-35" y="115" width="70" height="26" rx="13" fill="#E3F2FD"/>+ <text x="0" y="133" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#2196F3" text-anchor="middle">+ <tspan>良好</tspan>+ </text>+ </g>++ <!-- 仪表盘3: 库存周转 58% -->+ <g id="gauge3" transform="translate(1060, 380)">+ <!-- 背景弧 -->+ <path d="M -150,0 A 150,150 0 0,1 150,0" fill="none" stroke="#EEEEEE" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度区域 -->+ <path d="M -150,0 A 150,150 0 0,1 -46.35,-142.65" fill="none" stroke="#FFCDD2" stroke-width="30" stroke-linecap="round"/>+ <path d="M -46.35,-142.65 A 150,150 0 0,1 58.68,-138.05" fill="none" stroke="#FFE0B2" stroke-width="30" stroke-linecap="round"/>+ <path d="M 58.68,-138.05 A 150,150 0 0,1 150,0" fill="none" stroke="#C8E6C9" stroke-width="30" stroke-linecap="round"/>++ <!-- 当前值弧 58% (约104.4°) -->+ <path d="M -150,0 A 150,150 0 0,1 -58.36,-138.17" fill="none" stroke="url(#warningGrad)" stroke-width="30" stroke-linecap="round"/>++ <!-- 刻度线 -->+ <line x1="-135" y1="0" x2="-120" y2="0" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="-95.5" y1="-95.5" x2="-84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="0" y1="-135" x2="0" y2="-120" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="95.5" y1="-95.5" x2="84.85" y2="-84.85" stroke="#7F8C8D" stroke-width="2"/>+ <line x1="135" y1="0" x2="120" y2="0" stroke="#7F8C8D" stroke-width="2"/>++ <!-- 刻度标签 -->+ <text x="-155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>0%</tspan></text>+ <text x="0" y="-155" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>50%</tspan></text>+ <text x="155" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>100%</tspan></text>++ <!-- 指针 (58% = 104.4°, 从-90°开始,即14.4°) -->+ <g transform="rotate(14.4)">+ <path d="M 0,-100 L -8,0 L 0,15 L 8,0 Z" fill="#2C3E50" filter="url(#needleShadow)"/>+ </g>+ <circle cx="0" cy="0" r="15" fill="#2C3E50"/>+ <circle cx="0" cy="0" r="8" fill="#FFFFFF"/>++ <!-- 中心数值 -->+ <text x="0" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="48" font-weight="bold" fill="#FF9800" text-anchor="middle">+ <tspan>58%</tspan>+ </text>++ <!-- 标题 -->+ <text x="0" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>库存周转率</tspan>+ </text>++ <!-- 状态标签 -->+ <rect x="-35" y="115" width="70" height="26" rx="13" fill="#FFF3E0"/>+ <text x="0" y="133" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#FF9800" text-anchor="middle">+ <tspan>需关注</tspan>+ </text>+ </g>++ <!-- 图例说明 -->+ <g id="legendBar" transform="translate(340, 600)">+ <rect x="0" y="0" width="600" height="40" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <rect x="30" y="12" width="16" height="16" rx="3" fill="#FFCDD2"/>+ <text x="55" y="24" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>危险 (0-60%)</tspan></text>++ <rect x="170" y="12" width="16" height="16" rx="3" fill="#FFE0B2"/>+ <text x="195" y="24" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>警告 (60-80%)</tspan></text>++ <rect x="320" y="12" width="16" height="16" rx="3" fill="#C8E6C9"/>+ <text x="345" y="24" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>优秀 (80-100%)</tspan></text>++ <text x="500" y="24" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#95A5A6"><tspan>目标: 80%</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="640" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="middle">+ <tspan>数据来源: 业务数据平台 · 实时更新</tspan>+ </text>+</svg>+diff --git a/templates/charts/grouped_bar_chart.svg b/templates/charts/grouped_bar_chart.svgnew file mode 100644index 00000000..d1cdda92--- /dev/null+++ b/templates/charts/grouped_bar_chart.svg@@ -0,0 +1,275 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 分组柱状图模板+ 用途: 多系列数据对比+ 适用场景: 多产品/时期/分类对比、同比环比分析+ 支持: 4组 × 3系列(可调整为3-6组,2-4系列)+ 与普通柱状图区别: 每个类别下有多个并排柱子,用于对比+ -->++ <defs>+ <!-- 系列1渐变(蓝色) -->+ <linearGradient id="groupGrad1" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </linearGradient>++ <!-- 系列2渐变(绿色) -->+ <linearGradient id="groupGrad2" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:1" />+ </linearGradient>++ <!-- 系列3渐变(橙色) -->+ <linearGradient id="groupGrad3" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#F57C00;stop-opacity:1" />+ </linearGradient>++ <!-- 阴影 -->+ <filter id="groupShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.25"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>各季度产品线销售对比</tspan>+ </text>++ <text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年度 · 单位:百万元</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(900, 70)">+ <rect x="0" y="0" width="20" height="20" rx="3" fill="url(#groupGrad1)"/>+ <text x="30" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>产品线A</tspan>+ </text>++ <rect x="120" y="0" width="20" height="20" rx="3" fill="url(#groupGrad2)"/>+ <text x="150" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>产品线B</tspan>+ </text>++ <rect x="240" y="0" width="20" height="20" rx="3" fill="url(#groupGrad3)"/>+ <text x="270" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>产品线C</tspan>+ </text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- Y轴网格线 -->+ <line x1="140" y1="570" x2="1180" y2="570" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="480" x2="1180" y2="480" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="390" x2="1180" y2="390" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="300" x2="1180" y2="300" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="210" x2="1180" y2="210" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="125" y="575" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>0</tspan>+ </text>+ <text x="125" y="485" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>50</tspan>+ </text>+ <text x="125" y="395" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>100</tspan>+ </text>+ <text x="125" y="305" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>150</tspan>+ </text>+ <text x="125" y="215" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end">+ <tspan>200</tspan>+ </text>++ <!-- 坐标轴 -->+ <line x1="140" y1="165" x2="140" y2="570" stroke="#95A5A6" stroke-width="2"/>+ <line x1="140" y1="570" x2="1180" y2="570" stroke="#95A5A6" stroke-width="2"/>++ <!--+ 分组说明:+ - 4个组(Q1-Q4),每组3个柱子+ - 组宽度:240px,组间距:20px+ - 柱宽:60px,柱间距:10px+ - 每组起始:170, 430, 690, 950+ - 每50单位=90px高度+ -->++ <!-- Q1 组 -->+ <!-- Q1 产品线A: 120M (高度216px) -->+ <rect x="170" y="354" width="60" height="216" rx="4" fill="url(#groupGrad1)" filter="url(#groupShadow)"/>+ <text x="200" y="342" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>120</tspan>+ </text>++ <!-- Q1 产品线B: 85M (高度153px) -->+ <rect x="240" y="417" width="60" height="153" rx="4" fill="url(#groupGrad2)" filter="url(#groupShadow)"/>+ <text x="270" y="405" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>85</tspan>+ </text>++ <!-- Q1 产品线C: 65M (高度117px) -->+ <rect x="310" y="453" width="60" height="117" rx="4" fill="url(#groupGrad3)" filter="url(#groupShadow)"/>+ <text x="340" y="441" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>65</tspan>+ </text>++ <!-- Q1 标签 -->+ <text x="255" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E" text-anchor="middle">+ <tspan>Q1</tspan>+ </text>++ <!-- Q2 组 -->+ <!-- Q2 产品线A: 145M (高度261px) -->+ <rect x="430" y="309" width="60" height="261" rx="4" fill="url(#groupGrad1)" filter="url(#groupShadow)"/>+ <text x="460" y="297" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>145</tspan>+ </text>++ <!-- Q2 产品线B: 98M (高度176px) -->+ <rect x="500" y="394" width="60" height="176" rx="4" fill="url(#groupGrad2)" filter="url(#groupShadow)"/>+ <text x="530" y="382" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>98</tspan>+ </text>++ <!-- Q2 产品线C: 78M (高度140px) -->+ <rect x="570" y="430" width="60" height="140" rx="4" fill="url(#groupGrad3)" filter="url(#groupShadow)"/>+ <text x="600" y="418" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>78</tspan>+ </text>++ <!-- Q2 标签 -->+ <text x="515" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E" text-anchor="middle">+ <tspan>Q2</tspan>+ </text>++ <!-- Q3 组 -->+ <!-- Q3 产品线A: 168M (高度302px) -->+ <rect x="690" y="268" width="60" height="302" rx="4" fill="url(#groupGrad1)" filter="url(#groupShadow)"/>+ <text x="720" y="256" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>168</tspan>+ </text>++ <!-- Q3 产品线B: 112M (高度202px) -->+ <rect x="760" y="368" width="60" height="202" rx="4" fill="url(#groupGrad2)" filter="url(#groupShadow)"/>+ <text x="790" y="356" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>112</tspan>+ </text>++ <!-- Q3 产品线C: 92M (高度166px) -->+ <rect x="830" y="404" width="60" height="166" rx="4" fill="url(#groupGrad3)" filter="url(#groupShadow)"/>+ <text x="860" y="392" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>92</tspan>+ </text>++ <!-- Q3 标签 -->+ <text x="775" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E" text-anchor="middle">+ <tspan>Q3</tspan>+ </text>++ <!-- Q4 组 -->+ <!-- Q4 产品线A: 185M (高度333px) -->+ <rect x="950" y="237" width="60" height="333" rx="4" fill="url(#groupGrad1)" filter="url(#groupShadow)"/>+ <text x="980" y="225" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>185</tspan>+ </text>++ <!-- Q4 产品线B: 125M (高度225px) -->+ <rect x="1020" y="345" width="60" height="225" rx="4" fill="url(#groupGrad2)" filter="url(#groupShadow)"/>+ <text x="1050" y="333" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>125</tspan>+ </text>++ <!-- Q4 产品线C: 108M (高度194px) -->+ <rect x="1090" y="376" width="60" height="194" rx="4" fill="url(#groupGrad3)" filter="url(#groupShadow)"/>+ <text x="1120" y="364" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>108</tspan>+ </text>++ <!-- Q4 标签 -->+ <text x="1035" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E" text-anchor="middle">+ <tspan>Q4</tspan>+ </text>+ </g>++ <!-- 趋势总结卡片 -->+ <g id="summaryCard">+ <rect x="60" y="630" width="400" height="60" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>+ <text x="80" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>年度总计:</tspan>+ </text>+ <text x="160" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#2196F3">+ <tspan>618M</tspan>+ </text>+ <text x="220" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>|</tspan>+ </text>+ <text x="240" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#4CAF50">+ <tspan>420M</tspan>+ </text>+ <text x="300" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>|</tspan>+ </text>+ <text x="320" y="655" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FF9800">+ <tspan>343M</tspan>+ </text>++ <text x="80" y="675" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#95A5A6">+ <tspan>同比增长: +15.2%</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 销售部门</tspan>+ </text>+</svg>+diff --git a/templates/charts/heatmap_chart.svg b/templates/charts/heatmap_chart.svgnew file mode 100644index 00000000..dc8ab83b--- /dev/null+++ b/templates/charts/heatmap_chart.svg@@ -0,0 +1,214 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 热力图模板+ 用途: 矩阵数据可视化、相关性分析+ 适用场景: 相关性矩阵、时间热力图、用户行为分析+ 支持: 7×7 矩阵格子+ -->++ <defs>+ <!-- 热力图色阶(从蓝到红) -->+ <linearGradient id="heatGradient" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#1565C0"/>+ <stop offset="25%" style="stop-color:#42A5F5"/>+ <stop offset="50%" style="stop-color:#FFEB3B"/>+ <stop offset="75%" style="stop-color:#FF9800"/>+ <stop offset="100%" style="stop-color:#D32F2F"/>+ </linearGradient>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>用户活跃度热力图</tspan>+ </text>++ <text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>按星期和时段统计 · 数值代表平均在线用户数(千人)</tspan>+ </text>++ <!-- 热力图区域 -->+ <g id="heatmapArea" transform="translate(180, 130)">+ <!--+ 格子大小: 80×60+ 列: 7列(周一到周日)+ 行: 8行(时段)+ 颜色映射: 0-100 -> 蓝到红+ -->++ <!-- 列标题(星期) -->+ <text x="40" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle"><tspan>周一</tspan></text>+ <text x="120" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle"><tspan>周二</tspan></text>+ <text x="200" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle"><tspan>周三</tspan></text>+ <text x="280" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle"><tspan>周四</tspan></text>+ <text x="360" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle"><tspan>周五</tspan></text>+ <text x="440" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#E91E63" text-anchor="middle"><tspan>周六</tspan></text>+ <text x="520" y="-15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#E91E63" text-anchor="middle"><tspan>周日</tspan></text>++ <!-- 行标题(时段) -->+ <text x="-15" y="35" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>6-9时</tspan></text>+ <text x="-15" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>9-12时</tspan></text>+ <text x="-15" y="155" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>12-14时</tspan></text>+ <text x="-15" y="215" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>14-17时</tspan></text>+ <text x="-15" y="275" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>17-19时</tspan></text>+ <text x="-15" y="335" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>19-21时</tspan></text>+ <text x="-15" y="395" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>21-23时</tspan></text>+ <text x="-15" y="455" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>23-6时</tspan></text>++ <!-- 热力图格子 -->+ <!-- 第1行: 6-9时 -->+ <rect x="0" y="5" width="78" height="58" rx="4" fill="#64B5F6"/><text x="40" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>35</tspan></text>+ <rect x="80" y="5" width="78" height="58" rx="4" fill="#42A5F5"/><text x="120" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>42</tspan></text>+ <rect x="160" y="5" width="78" height="58" rx="4" fill="#42A5F5"/><text x="200" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>40</tspan></text>+ <rect x="240" y="5" width="78" height="58" rx="4" fill="#64B5F6"/><text x="280" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>38</tspan></text>+ <rect x="320" y="5" width="78" height="58" rx="4" fill="#90CAF9"/><text x="360" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>28</tspan></text>+ <rect x="400" y="5" width="78" height="58" rx="4" fill="#BBDEFB"/><text x="440" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>15</tspan></text>+ <rect x="480" y="5" width="78" height="58" rx="4" fill="#E3F2FD"/><text x="520" y="40" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>10</tspan></text>++ <!-- 第2行: 9-12时 -->+ <rect x="0" y="65" width="78" height="58" rx="4" fill="#FFF176"/><text x="40" y="100" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>58</tspan></text>+ <rect x="80" y="65" width="78" height="58" rx="4" fill="#FFD54F"/><text x="120" y="100" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>65</tspan></text>+ <rect x="160" y="65" width="78" height="58" rx="4" fill="#FFC107"/><text x="200" y="100" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>72</tspan></text>+ <rect x="240" y="65" width="78" height="58" rx="4" fill="#FFD54F"/><text x="280" y="100" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>68</tspan></text>+ <rect x="320" y="65" width="78" height="58" rx="4" fill="#FFF176"/><text x="360" y="100" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>55</tspan></text>+ <rect x="400" y="65" width="78" height="58" rx="4" fill="#42A5F5"/><text x="440" y="100" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>45</tspan></text>+ <rect x="480" y="65" width="78" height="58" rx="4" fill="#64B5F6"/><text x="520" y="100" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>38</tspan></text>++ <!-- 第3行: 12-14时 -->+ <rect x="0" y="125" width="78" height="58" rx="4" fill="#FFB74D"/><text x="40" y="160" font-size="13" fill="#E65100" text-anchor="middle"><tspan>75</tspan></text>+ <rect x="80" y="125" width="78" height="58" rx="4" fill="#FFA726"/><text x="120" y="160" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>82</tspan></text>+ <rect x="160" y="125" width="78" height="58" rx="4" fill="#FF9800"/><text x="200" y="160" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>88</tspan></text>+ <rect x="240" y="125" width="78" height="58" rx="4" fill="#FFA726"/><text x="280" y="160" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>80</tspan></text>+ <rect x="320" y="125" width="78" height="58" rx="4" fill="#FFB74D"/><text x="360" y="160" font-size="13" fill="#E65100" text-anchor="middle"><tspan>70</tspan></text>+ <rect x="400" y="125" width="78" height="58" rx="4" fill="#FFF176"/><text x="440" y="160" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>60</tspan></text>+ <rect x="480" y="125" width="78" height="58" rx="4" fill="#FFD54F"/><text x="520" y="160" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>65</tspan></text>++ <!-- 第4行: 14-17时 -->+ <rect x="0" y="185" width="78" height="58" rx="4" fill="#FFF176"/><text x="40" y="220" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>55</tspan></text>+ <rect x="80" y="185" width="78" height="58" rx="4" fill="#FFD54F"/><text x="120" y="220" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>62</tspan></text>+ <rect x="160" y="185" width="78" height="58" rx="4" fill="#FFD54F"/><text x="200" y="220" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>68</tspan></text>+ <rect x="240" y="185" width="78" height="58" rx="4" fill="#FFF176"/><text x="280" y="220" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>60</tspan></text>+ <rect x="320" y="185" width="78" height="58" rx="4" fill="#42A5F5"/><text x="360" y="220" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>48</tspan></text>+ <rect x="400" y="185" width="78" height="58" rx="4" fill="#FFB74D"/><text x="440" y="220" font-size="13" fill="#E65100" text-anchor="middle"><tspan>72</tspan></text>+ <rect x="480" y="185" width="78" height="58" rx="4" fill="#FFA726"/><text x="520" y="220" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>78</tspan></text>++ <!-- 第5行: 17-19时 -->+ <rect x="0" y="245" width="78" height="58" rx="4" fill="#64B5F6"/><text x="40" y="280" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>32</tspan></text>+ <rect x="80" y="245" width="78" height="58" rx="4" fill="#64B5F6"/><text x="120" y="280" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>35</tspan></text>+ <rect x="160" y="245" width="78" height="58" rx="4" fill="#64B5F6"/><text x="200" y="280" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>38</tspan></text>+ <rect x="240" y="245" width="78" height="58" rx="4" fill="#64B5F6"/><text x="280" y="280" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>35</tspan></text>+ <rect x="320" y="245" width="78" height="58" rx="4" fill="#90CAF9"/><text x="360" y="280" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>28</tspan></text>+ <rect x="400" y="245" width="78" height="58" rx="4" fill="#FFD54F"/><text x="440" y="280" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>65</tspan></text>+ <rect x="480" y="245" width="78" height="58" rx="4" fill="#FFB74D"/><text x="520" y="280" font-size="13" fill="#E65100" text-anchor="middle"><tspan>70</tspan></text>++ <!-- 第6行: 19-21时 (高峰) -->+ <rect x="0" y="305" width="78" height="58" rx="4" fill="#FFA726"/><text x="40" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>78</tspan></text>+ <rect x="80" y="305" width="78" height="58" rx="4" fill="#FF9800"/><text x="120" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>85</tspan></text>+ <rect x="160" y="305" width="78" height="58" rx="4" fill="#FF9800"/><text x="200" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>88</tspan></text>+ <rect x="240" y="305" width="78" height="58" rx="4" fill="#FF9800"/><text x="280" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>86</tspan></text>+ <rect x="320" y="305" width="78" height="58" rx="4" fill="#FFA726"/><text x="360" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>80</tspan></text>+ <rect x="400" y="305" width="78" height="58" rx="4" fill="#EF5350"/><text x="440" y="340" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>95</tspan></text>+ <rect x="480" y="305" width="78" height="58" rx="4" fill="#D32F2F"/><text x="520" y="340" font-size="14" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>98</tspan></text>++ <!-- 第7行: 21-23时 -->+ <rect x="0" y="365" width="78" height="58" rx="4" fill="#FFD54F"/><text x="40" y="400" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>62</tspan></text>+ <rect x="80" y="365" width="78" height="58" rx="4" fill="#FFB74D"/><text x="120" y="400" font-size="13" fill="#E65100" text-anchor="middle"><tspan>70</tspan></text>+ <rect x="160" y="365" width="78" height="58" rx="4" fill="#FFB74D"/><text x="200" y="400" font-size="13" fill="#E65100" text-anchor="middle"><tspan>72</tspan></text>+ <rect x="240" y="365" width="78" height="58" rx="4" fill="#FFB74D"/><text x="280" y="400" font-size="13" fill="#E65100" text-anchor="middle"><tspan>68</tspan></text>+ <rect x="320" y="365" width="78" height="58" rx="4" fill="#FFD54F"/><text x="360" y="400" font-size="13" fill="#F57F17" text-anchor="middle"><tspan>65</tspan></text>+ <rect x="400" y="365" width="78" height="58" rx="4" fill="#FF9800"/><text x="440" y="400" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>85</tspan></text>+ <rect x="480" y="365" width="78" height="58" rx="4" fill="#FFA726"/><text x="520" y="400" font-size="13" fill="#FFFFFF" text-anchor="middle"><tspan>82</tspan></text>++ <!-- 第8行: 23-6时 -->+ <rect x="0" y="425" width="78" height="58" rx="4" fill="#BBDEFB"/><text x="40" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>18</tspan></text>+ <rect x="80" y="425" width="78" height="58" rx="4" fill="#BBDEFB"/><text x="120" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>15</tspan></text>+ <rect x="160" y="425" width="78" height="58" rx="4" fill="#BBDEFB"/><text x="200" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>12</tspan></text>+ <rect x="240" y="425" width="78" height="58" rx="4" fill="#BBDEFB"/><text x="280" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>15</tspan></text>+ <rect x="320" y="425" width="78" height="58" rx="4" fill="#90CAF9"/><text x="360" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>22</tspan></text>+ <rect x="400" y="425" width="78" height="58" rx="4" fill="#64B5F6"/><text x="440" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>35</tspan></text>+ <rect x="480" y="425" width="78" height="58" rx="4" fill="#90CAF9"/><text x="520" y="460" font-size="13" fill="#1565C0" text-anchor="middle"><tspan>28</tspan></text>+ </g>++ <!-- 色阶图例 -->+ <g id="colorLegend" transform="translate(780, 150)">+ <text x="0" y="0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50"><tspan>活跃度色阶</tspan></text>++ <rect x="0" y="15" width="200" height="20" rx="4" fill="url(#heatGradient)"/>++ <text x="0" y="52" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>低 (0)</tspan></text>+ <text x="90" y="52" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>中 (50)</tspan></text>+ <text x="200" y="52" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="end"><tspan>高 (100)</tspan></text>+ </g>++ <!-- 统计面板 -->+ <g id="statsPanel" transform="translate(780, 240)">+ <rect x="0" y="0" width="200" height="180" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="100" y="28" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>统计摘要</tspan></text>++ <line x1="15" y1="42" x2="185" y2="42" stroke="#E0E0E0" stroke-width="1"/>++ <text x="20" y="68" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>🔥 峰值时段</tspan></text>+ <text x="20" y="88" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#D32F2F"><tspan>周日 19-21时 (98K)</tspan></text>++ <text x="20" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>❄️ 低谷时段</tspan></text>+ <text x="20" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#1565C0"><tspan>周日 6-9时 (10K)</tspan></text>++ <text x="20" y="162" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>📊 日均在线</tspan></text>+ <text x="130" y="162" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#2C3E50"><tspan>54.2K</tspan></text>+ </g>++ <!-- 洞察卡片 -->+ <g id="insightCard" transform="translate(780, 440)">+ <rect x="0" y="0" width="200" height="120" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="1"/>++ <text x="20" y="28" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2E7D32"><tspan>💡 关键洞察</tspan></text>++ <text x="20" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>• 周末晚间活跃度最高</tspan></text>+ <text x="20" y="75" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>• 工作日午间有小高峰</tspan></text>+ <text x="20" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E"><tspan>• 凌晨时段流量最低</tspan></text>+ <text x="20" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="#7F8C8D"><tspan>建议: 周末晚间增加服务器</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 用户行为分析平台</tspan>+ </text>+</svg>+diff --git a/templates/charts/horizontal_bar_chart.svg b/templates/charts/horizontal_bar_chart.svgnew file mode 100644index 00000000..f872ebb1--- /dev/null+++ b/templates/charts/horizontal_bar_chart.svg@@ -0,0 +1,213 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 水平条形图模板+ 用途: 类别排名、数值对比(适合类别名称较长的场景)+ 适用场景: 销售排行榜、品牌认知度、满意度评分+ 支持: 8个条形(可调整为5-12个)+ 与柱状图区别: 水平展示,更适合排名和类别名较长的数据+ -->++ <defs>+ <!-- 条形渐变 -->+ <linearGradient id="hbarGrad1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#42A5F5;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="hbarGrad2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#66BB6A;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="hbarGrad3" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFB74D;stop-opacity:1" />+ </linearGradient>++ <!-- 阴影 -->+ <filter id="hbarShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="1" dy="0"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.2"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>品牌认知度排行榜</tspan>+ </text>++ <text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年消费者调研报告 · 样本量 N=5,000</tspan>+ </text>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- X轴网格线 -->+ <line x1="300" y1="140" x2="300" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="480" y1="140" x2="480" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="660" y1="140" x2="660" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="840" y1="140" x2="840" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="1020" y1="140" x2="1020" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="1200" y1="140" x2="1200" y2="620" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- X轴刻度标签 -->+ <text x="300" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>0%</tspan>+ </text>+ <text x="480" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>20%</tspan>+ </text>+ <text x="660" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>40%</tspan>+ </text>+ <text x="840" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>60%</tspan>+ </text>+ <text x="1020" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>80%</tspan>+ </text>+ <text x="1200" y="650" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle">+ <tspan>100%</tspan>+ </text>++ <!-- Y轴基线 -->+ <line x1="300" y1="140" x2="300" y2="620" stroke="#95A5A6" stroke-width="2"/>+ <line x1="300" y1="620" x2="1200" y2="620" stroke="#95A5A6" stroke-width="2"/>++ <!-- 条形数据 (条高36px, 间距24px, 总间距60px) -->++ <!-- 条形1: 品牌A - 92% (第1名,蓝色) -->+ <text x="290" y="175" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌A (市场领导者)</tspan>+ </text>+ <rect x="300" y="155" width="828" height="36" rx="4" fill="url(#hbarGrad1)" filter="url(#hbarShadow)"/>+ <text x="1138" y="179" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>92%</tspan>+ </text>++ <!-- 条形2: 品牌B - 78% (第2名,蓝色) -->+ <text x="290" y="235" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌B (新锐品牌)</tspan>+ </text>+ <rect x="300" y="215" width="702" height="36" rx="4" fill="url(#hbarGrad1)" filter="url(#hbarShadow)"/>+ <text x="1012" y="239" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>78%</tspan>+ </text>++ <!-- 条形3: 品牌C - 65% (第3名,蓝色) -->+ <text x="290" y="295" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌C (经典品牌)</tspan>+ </text>+ <rect x="300" y="275" width="585" height="36" rx="4" fill="url(#hbarGrad1)" filter="url(#hbarShadow)"/>+ <text x="895" y="299" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>65%</tspan>+ </text>++ <!-- 条形4: 品牌D - 52% (第4名,绿色) -->+ <text x="290" y="355" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌D (区域品牌)</tspan>+ </text>+ <rect x="300" y="335" width="468" height="36" rx="4" fill="url(#hbarGrad2)" filter="url(#hbarShadow)"/>+ <text x="778" y="359" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>52%</tspan>+ </text>++ <!-- 条形5: 品牌E - 45% (第5名,绿色) -->+ <text x="290" y="415" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌E (性价比品牌)</tspan>+ </text>+ <rect x="300" y="395" width="405" height="36" rx="4" fill="url(#hbarGrad2)" filter="url(#hbarShadow)"/>+ <text x="715" y="419" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>45%</tspan>+ </text>++ <!-- 条形6: 品牌F - 38% (第6名,绿色) -->+ <text x="290" y="475" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌F (高端品牌)</tspan>+ </text>+ <rect x="300" y="455" width="342" height="36" rx="4" fill="url(#hbarGrad2)" filter="url(#hbarShadow)"/>+ <text x="652" y="479" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>38%</tspan>+ </text>++ <!-- 条形7: 品牌G - 25% (第7名,橙色) -->+ <text x="290" y="535" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>品牌G (新进入者)</tspan>+ </text>+ <rect x="300" y="515" width="225" height="36" rx="4" fill="url(#hbarGrad3)" filter="url(#hbarShadow)"/>+ <text x="535" y="539" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>25%</tspan>+ </text>++ <!-- 条形8: 其他 - 12% (第8名,橙色) -->+ <text x="290" y="595" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50" text-anchor="end">+ <tspan>其他品牌</tspan>+ </text>+ <rect x="300" y="575" width="108" height="36" rx="4" fill="url(#hbarGrad3)" filter="url(#hbarShadow)"/>+ <text x="418" y="599" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50">+ <tspan>12%</tspan>+ </text>+ </g>++ <!-- 图例 -->+ <g id="legend">+ <rect x="60" y="660" width="16" height="16" rx="2" fill="url(#hbarGrad1)"/>+ <text x="85" y="673" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>高认知度 (≥50%)</tspan>+ </text>++ <rect x="240" y="660" width="16" height="16" rx="2" fill="url(#hbarGrad2)"/>+ <text x="265" y="673" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>中等认知度 (30-50%)</tspan>+ </text>++ <rect x="450" y="660" width="16" height="16" rx="2" fill="url(#hbarGrad3)"/>+ <text x="475" y="673" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>低认知度 (<30%)</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 市场研究部门</tspan>+ </text>+</svg>+diff --git a/templates/charts/pareto_chart.svg b/templates/charts/pareto_chart.svgnew file mode 100644index 00000000..85ec755d--- /dev/null+++ b/templates/charts/pareto_chart.svg@@ -0,0 +1,227 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ Pareto Chart Template+ Purpose: 80/20 analysis, identify key factors+ Use cases: Quality issue analysis, sales contribution, cost structure, defect attribution+ Supports: Bar chart + cumulative line chart combination+ -->++ <defs>+ <linearGradient id="paretoBarGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1565C0;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="paretoBarHighlight" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#F57C00;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="cumulativeLineGrad" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E74C3C;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#C0392B;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="areaFill80" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#FFF3E0;stop-opacity:0.8" />+ <stop offset="100%" style="stop-color:#FFE0B2;stop-opacity:0.3" />+ </linearGradient>+ </defs>++ <rect width="1280" height="720" fill="#FFFFFF"/>++ <text x="640" y="45" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>Product Quality Issue Pareto Analysis</tspan>+ </text>++ <text x="640" y="80" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>2025 Q4 - Customer Complaint Attribution (Total: 1,000 cases)</tspan>+ </text>++ <!-- Legend -->+ <g id="legend" transform="translate(150, 100)">+ <rect x="0" y="0" width="20" height="14" fill="url(#paretoBarHighlight)" rx="2"/>+ <text x="28" y="11" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>Key Factors (80%)</tspan></text>++ <rect x="170" y="0" width="20" height="14" fill="url(#paretoBarGrad)" rx="2"/>+ <text x="198" y="11" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>Minor Factors</tspan></text>++ <line x1="320" y1="7" x2="340" y2="7" stroke="#E74C3C" stroke-width="3"/>+ <circle cx="330" cy="7" r="5" fill="#E74C3C"/>+ <text x="348" y="11" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>Cumulative %</tspan></text>+ </g>++ <!-- Y-axis (Left - Count) -->+ <line x1="130" y1="130" x2="130" y2="580" stroke="#E0E0E0" stroke-width="2"/>+ <text x="70" y="360" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50" text-anchor="middle" transform="rotate(-90, 70, 360)">+ <tspan>Complaint Count</tspan>+ </text>++ <!-- Y-axis ticks (Left) -->+ <text x="120" y="585" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>0</tspan></text>+ <text x="120" y="490" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>100</tspan></text>+ <text x="120" y="395" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>200</tspan></text>+ <text x="120" y="300" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>300</tspan></text>+ <text x="120" y="205" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>400</tspan></text>+ <text x="120" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>450</tspan></text>++ <!-- Y-axis (Right - Percentage) -->+ <line x1="1150" y1="130" x2="1150" y2="580" stroke="#E0E0E0" stroke-width="2"/>+ <text x="1210" y="360" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#E74C3C" text-anchor="middle" transform="rotate(90, 1210, 360)">+ <tspan>Cumulative %</tspan>+ </text>++ <!-- Y-axis ticks (Right) -->+ <text x="1160" y="585" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E74C3C"><tspan>0%</tspan></text>+ <text x="1160" y="470" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E74C3C"><tspan>25%</tspan></text>+ <text x="1160" y="355" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E74C3C"><tspan>50%</tspan></text>+ <text x="1160" y="240" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E74C3C"><tspan>75%</tspan></text>+ <text x="1160" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E74C3C"><tspan>100%</tspan></text>++ <!-- X-axis -->+ <line x1="130" y1="580" x2="1150" y2="580" stroke="#E0E0E0" stroke-width="2"/>++ <!-- Grid lines -->+ <line x1="130" y1="490" x2="1150" y2="490" stroke="#F0F0F0" stroke-width="1" stroke-dasharray="5,5"/>+ <line x1="130" y1="395" x2="1150" y2="395" stroke="#F0F0F0" stroke-width="1" stroke-dasharray="5,5"/>+ <line x1="130" y1="300" x2="1150" y2="300" stroke="#F0F0F0" stroke-width="1" stroke-dasharray="5,5"/>+ <line x1="130" y1="205" x2="1150" y2="205" stroke="#F0F0F0" stroke-width="1" stroke-dasharray="5,5"/>++ <!-- 80% reference line -->+ <line x1="130" y1="220" x2="1150" y2="220" stroke="#FF9800" stroke-width="2" stroke-dasharray="10,5"/>+ <text x="145" y="215" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#FF9800"><tspan>80% Key Factor Line</tspan></text>++ <!-- 80% area fill -->+ <rect x="130" y="220" width="640" height="360" fill="url(#areaFill80)" opacity="0.3"/>++ <!-- Bar chart data (sorted by frequency high to low) -->+ <!-- 1. Function Error: 350 (35%) - Cumulative 35% -->+ <rect x="170" y="230" width="100" height="350" fill="url(#paretoBarHighlight)" rx="4"/>+ <text x="220" y="220" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#F57C00" text-anchor="middle"><tspan>350</tspan></text>+ <text x="220" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Function Error</tspan></text>+ <text x="220" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(35%)</tspan></text>++ <!-- 2. Appearance Defect: 220 (22%) - Cumulative 57% -->+ <rect x="300" y="360" width="100" height="220" fill="url(#paretoBarHighlight)" rx="4"/>+ <text x="350" y="350" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#F57C00" text-anchor="middle"><tspan>220</tspan></text>+ <text x="350" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Appearance</tspan></text>+ <text x="350" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(22%)</tspan></text>++ <!-- 3. Missing Parts: 150 (15%) - Cumulative 72% -->+ <rect x="430" y="430" width="100" height="150" fill="url(#paretoBarHighlight)" rx="4"/>+ <text x="480" y="420" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#F57C00" text-anchor="middle"><tspan>150</tspan></text>+ <text x="480" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Missing Parts</tspan></text>+ <text x="480" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(15%)</tspan></text>++ <!-- 4. Shipping Damage: 120 (12%) - Cumulative 84% -->+ <rect x="560" y="460" width="100" height="120" fill="url(#paretoBarHighlight)" rx="4"/>+ <text x="610" y="450" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#F57C00" text-anchor="middle"><tspan>120</tspan></text>+ <text x="610" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Ship Damage</tspan></text>+ <text x="610" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(12%)</tspan></text>++ <!-- 5. Manual Error: 70 (7%) - Cumulative 91% -->+ <rect x="690" y="510" width="100" height="70" fill="url(#paretoBarGrad)" rx="4"/>+ <text x="740" y="500" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#1565C0" text-anchor="middle"><tspan>70</tspan></text>+ <text x="740" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Manual Error</tspan></text>+ <text x="740" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(7%)</tspan></text>++ <!-- 6. Packaging Issue: 50 (5%) - Cumulative 96% -->+ <rect x="820" y="530" width="100" height="50" fill="url(#paretoBarGrad)" rx="4"/>+ <text x="870" y="520" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#1565C0" text-anchor="middle"><tspan>50</tspan></text>+ <text x="870" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Packaging</tspan></text>+ <text x="870" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(5%)</tspan></text>++ <!-- 7. Other Issues: 40 (4%) - Cumulative 100% -->+ <rect x="950" y="540" width="100" height="40" fill="url(#paretoBarGrad)" rx="4"/>+ <text x="1000" y="530" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#1565C0" text-anchor="middle"><tspan>40</tspan></text>+ <text x="1000" y="610" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#2C3E50" text-anchor="middle"><tspan>Other</tspan></text>+ <text x="1000" y="628" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>(4%)</tspan></text>++ <!-- Cumulative line chart -->+ <polyline points="220,420 350,322 480,254 610,205 740,170 870,151 1000,130"+ fill="none" stroke="#E74C3C" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>++ <!-- Cumulative line data points -->+ <circle cx="220" cy="420" r="8" fill="#E74C3C"/>+ <text x="220" y="445" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>35%</tspan></text>++ <circle cx="350" cy="322" r="8" fill="#E74C3C"/>+ <text x="350" y="310" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>57%</tspan></text>++ <circle cx="480" cy="254" r="8" fill="#E74C3C"/>+ <text x="480" y="242" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>72%</tspan></text>++ <circle cx="610" cy="205" r="8" fill="#FF9800"/>+ <text x="610" y="193" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" font-weight="bold" fill="#FF9800" text-anchor="middle"><tspan>84%</tspan></text>++ <circle cx="740" cy="170" r="6" fill="#E74C3C"/>+ <text x="740" y="158" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>91%</tspan></text>++ <circle cx="870" cy="151" r="6" fill="#E74C3C"/>+ <text x="870" y="139" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>96%</tspan></text>++ <circle cx="1000" cy="130" r="6" fill="#E74C3C"/>+ <text x="1000" y="118" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" font-weight="bold" fill="#E74C3C" text-anchor="middle"><tspan>100%</tspan></text>++ <!-- Insight box -->+ <rect x="130" y="655" width="1020" height="50" rx="6" fill="#FFF3E0" stroke="#FF9800" stroke-width="2"/>+ <text x="150" y="678" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#E65100">+ <tspan>Key Finding:</tspan>+ </text>+ <text x="270" y="678" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>Top 4 issues account for 84% of complaints - prioritize resolution</tspan>+ </text>+ <text x="150" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#7F8C8D">+ <tspan>Action: Enhance QC process, optimize logistics packaging, improve parts checklist verification</tspan>+ </text>+</svg>diff --git a/templates/charts/pie_chart.svg b/templates/charts/pie_chart.svgnew file mode 100644index 00000000..045ea10c--- /dev/null+++ b/templates/charts/pie_chart.svg@@ -0,0 +1,215 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 饼图模板+ 用途: 占比和构成分析(基础版)+ 适用场景: 市场份额、预算分配、结构分析+ 支持: 5个分块 (推荐3-6个)+ 与环形图区别: 无中心孔,更适合简单占比展示+ -->++ <defs>+ <!-- 扇区阴影 -->+ <filter id="pieShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="3"/>+ <feOffset dx="0" dy="2"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.25"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>++ <!-- 颜色定义 -->+ <linearGradient id="pieGrad1" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="pieGrad2" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="pieGrad3" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#F57C00;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="pieGrad4" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#9C27B0;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#7B1FA2;stop-opacity:1" />+ </linearGradient>+ <linearGradient id="pieGrad5" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#607D8B;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#455A64;stop-opacity:1" />+ </linearGradient>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="80" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>市场份额分布</tspan>+ </text>++ <text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年第三季度 · 行业整体市场规模 120亿</tspan>+ </text>++ <!-- 饼图中心 -->+ <g id="pieChart" transform="translate(420, 400)">+ <!--+ 圆心: (420, 400)+ 半径: 200px+ 起始角度: -90° (12点方向)++ 数据:+ 1. 公司A: 35% (蓝色) - 角度: 126°+ 2. 公司B: 25% (绿色) - 角度: 90°+ 3. 公司C: 20% (橙色) - 角度: 72°+ 4. 公司D: 12% (紫色) - 角度: 43.2°+ 5. 其他: 8% (灰色) - 角度: 28.8°+ -->++ <!-- 扇区1: 公司A 35% (从-90°到36°, 即126°) -->+ <path d="M 0,0 L 0,-200 A 200,200 0 0,1 173.2,100 Z"+ fill="url(#pieGrad1)" filter="url(#pieShadow)"/>++ <!-- 扇区2: 公司B 25% (从36°到126°, 即90°) -->+ <path d="M 0,0 L 173.2,100 A 200,200 0 0,1 -117.56,162.34 Z"+ fill="url(#pieGrad2)" filter="url(#pieShadow)"/>++ <!-- 扇区3: 公司C 20% (从126°到198°, 即72°) -->+ <path d="M 0,0 L -117.56,162.34 A 200,200 0 0,1 -195.63,-62.93 Z"+ fill="url(#pieGrad3)" filter="url(#pieShadow)"/>++ <!-- 扇区4: 公司D 12% (从198°到241.2°, 即43.2°) -->+ <path d="M 0,0 L -195.63,-62.93 A 200,200 0 0,1 -62.93,-189.87 Z"+ fill="url(#pieGrad4)" filter="url(#pieShadow)"/>++ <!-- 扇区5: 其他 8% (从241.2°到270°, 即28.8°) -->+ <path d="M 0,0 L -62.93,-189.87 A 200,200 0 0,1 0,-200 Z"+ fill="url(#pieGrad5)" filter="url(#pieShadow)"/>+ </g>++ <!-- 百分比标签(直接在扇区上显示) -->+ <!-- 标签1: 公司A 35% -->+ <text x="500" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>35%</tspan>+ </text>++ <!-- 标签2: 公司B 25% -->+ <text x="450" y="520" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>25%</tspan>+ </text>++ <!-- 标签3: 公司C 20% -->+ <text x="280" y="480" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>20%</tspan>+ </text>++ <!-- 标签4: 公司D 12% -->+ <text x="280" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>12%</tspan>+ </text>++ <!-- 标签5: 其他 8% (扇区较小,使用引线标签) -->+ <g>+ <line x1="380" y1="220" x2="340" y2="170" stroke="#607D8B" stroke-width="1.5"/>+ <circle cx="380" cy="220" r="3" fill="#607D8B"/>+ <text x="330" y="165" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#607D8B" text-anchor="end">+ <tspan>8%</tspan>+ </text>+ </g>++ <!-- 右侧图例 -->+ <g id="legend" transform="translate(720, 200)">+ <!-- 图例标题 -->+ <text x="0" y="0" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="20" font-weight="600" fill="#2C3E50">+ <tspan>市场份额</tspan>+ </text>++ <!-- 图例项1: 公司A -->+ <rect x="0" y="30" width="24" height="24" rx="4" fill="url(#pieGrad1)"/>+ <text x="40" y="48" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E">+ <tspan>公司A</tspan>+ </text>+ <text x="460" y="48" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="end">+ <tspan>42亿 (35%)</tspan>+ </text>++ <!-- 图例项2: 公司B -->+ <rect x="0" y="70" width="24" height="24" rx="4" fill="url(#pieGrad2)"/>+ <text x="40" y="88" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E">+ <tspan>公司B</tspan>+ </text>+ <text x="460" y="88" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="end">+ <tspan>30亿 (25%)</tspan>+ </text>++ <!-- 图例项3: 公司C -->+ <rect x="0" y="110" width="24" height="24" rx="4" fill="url(#pieGrad3)"/>+ <text x="40" y="128" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E">+ <tspan>公司C</tspan>+ </text>+ <text x="460" y="128" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="end">+ <tspan>24亿 (20%)</tspan>+ </text>++ <!-- 图例项4: 公司D -->+ <rect x="0" y="150" width="24" height="24" rx="4" fill="url(#pieGrad4)"/>+ <text x="40" y="168" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E">+ <tspan>公司D</tspan>+ </text>+ <text x="460" y="168" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="end">+ <tspan>14.4亿 (12%)</tspan>+ </text>++ <!-- 图例项5: 其他 -->+ <rect x="0" y="190" width="24" height="24" rx="4" fill="url(#pieGrad5)"/>+ <text x="40" y="208" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#5D6D7E">+ <tspan>其他</tspan>+ </text>+ <text x="460" y="208" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50" text-anchor="end">+ <tspan>9.6亿 (8%)</tspan>+ </text>++ <!-- 分隔线 -->+ <line x1="0" y1="240" x2="460" y2="240" stroke="#E0E0E0" stroke-width="2"/>++ <!-- 合计 -->+ <text x="0" y="270" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>市场总规模</tspan>+ </text>+ <text x="460" y="270" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#2C3E50" text-anchor="end">+ <tspan>120亿 (100%)</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 行业研究报告</tspan>+ </text>+</svg>+diff --git a/templates/charts/porter_five_forces.svg b/templates/charts/porter_five_forces.svgnew file mode 100644index 00000000..5a858c71--- /dev/null+++ b/templates/charts/porter_five_forces.svg@@ -0,0 +1,246 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ Porter's Five Forces Chart Template+ Purpose: Industry competitive analysis, strategic planning+ Use cases: Industry reports, market entry evaluation, competitive strategy, investment analysis+ Supports: Five forces radial layout+ -->++ <defs>+ <linearGradient id="centerGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#2C3E50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#34495E;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="forceGrad1" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#E74C3C;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#C0392B;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="forceGrad2" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#3498DB;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#2980B9;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="forceGrad3" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#2ECC71;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#27AE60;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="forceGrad4" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#9B59B6;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#8E44AD;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="forceGrad5" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#F39C12;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#E67E22;stop-opacity:1" />+ </linearGradient>++ <filter id="forceShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="4"/>+ <feOffset dx="0" dy="3"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.25"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>++ <marker id="arrowHead" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">+ <path d="M0,0 L0,6 L9,3 z" fill="#7F8C8D"/>+ </marker>+ </defs>++ <rect width="1280" height="720" fill="#FAFBFC"/>++ <text x="640" y="45" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>Porter's Five Forces - Industry Analysis</tspan>+ </text>++ <text x="640" y="80" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>Enterprise SaaS Market - Competitive Landscape Assessment 2025</tspan>+ </text>++ <!-- Center circle - Industry Competition -->+ <circle cx="640" cy="380" r="90" fill="url(#centerGrad)" filter="url(#forceShadow)"/>+ <text x="640" y="365" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Industry</tspan>+ </text>+ <text x="640" y="390" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Rivalry</tspan>+ </text>+ <text x="640" y="415" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#BDC3C7" text-anchor="middle">+ <tspan>High</tspan>+ </text>++ <!-- Force 1: Top - Threat of New Entrants -->+ <g id="force1" transform="translate(640, 150)">+ <rect x="-150" y="-55" width="300" height="90" rx="12" fill="url(#forceGrad1)" filter="url(#forceShadow)"/>+ <text x="0" y="-25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Threat of New Entrants</tspan>+ </text>+ <rect x="-120" y="-5" width="180" height="10" rx="5" fill="rgba(255,255,255,0.3)"/>+ <rect x="-120" y="-5" width="90" height="10" rx="5" fill="#FFFFFF"/>+ <text x="70" y="3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#FFFFFF">+ <tspan>Medium</tspan>+ </text>+ <text x="0" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="rgba(255,255,255,0.9)" text-anchor="middle">+ <tspan>Capital barriers, Tech accumulation needed</tspan>+ </text>+ </g>+ <line x1="640" y1="210" x2="640" y2="290" stroke="#7F8C8D" stroke-width="2" marker-end="url(#arrowHead)"/>++ <!-- Force 2: Right - Buyer Power -->+ <g id="force2" transform="translate(950, 380)">+ <rect x="-150" y="-55" width="300" height="90" rx="12" fill="url(#forceGrad2)" filter="url(#forceShadow)"/>+ <text x="0" y="-25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Bargaining Power of Buyers</tspan>+ </text>+ <rect x="-120" y="-5" width="180" height="10" rx="5" fill="rgba(255,255,255,0.3)"/>+ <rect x="-120" y="-5" width="135" height="10" rx="5" fill="#FFFFFF"/>+ <text x="70" y="3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#FFFFFF">+ <tspan>High</tspan>+ </text>+ <text x="0" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="rgba(255,255,255,0.9)" text-anchor="middle">+ <tspan>Many choices, Low switching costs</tspan>+ </text>+ </g>+ <line x1="730" y1="380" x2="785" y2="380" stroke="#7F8C8D" stroke-width="2" marker-end="url(#arrowHead)"/>++ <!-- Force 3: Bottom - Threat of Substitutes -->+ <g id="force3" transform="translate(640, 610)">+ <rect x="-150" y="-55" width="300" height="90" rx="12" fill="url(#forceGrad3)" filter="url(#forceShadow)"/>+ <text x="0" y="-25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Threat of Substitutes</tspan>+ </text>+ <rect x="-120" y="-5" width="180" height="10" rx="5" fill="rgba(255,255,255,0.3)"/>+ <rect x="-120" y="-5" width="54" height="10" rx="5" fill="#FFFFFF"/>+ <text x="70" y="3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#FFFFFF">+ <tspan>Low</tspan>+ </text>+ <text x="0" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="rgba(255,255,255,0.9)" text-anchor="middle">+ <tspan>Few effective alternatives</tspan>+ </text>+ </g>+ <line x1="640" y1="470" x2="640" y2="540" stroke="#7F8C8D" stroke-width="2" marker-end="url(#arrowHead)"/>++ <!-- Force 4: Left - Supplier Power -->+ <g id="force4" transform="translate(330, 380)">+ <rect x="-150" y="-55" width="300" height="90" rx="12" fill="url(#forceGrad4)" filter="url(#forceShadow)"/>+ <text x="0" y="-25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Bargaining Power of Suppliers</tspan>+ </text>+ <rect x="-120" y="-5" width="180" height="10" rx="5" fill="rgba(255,255,255,0.3)"/>+ <rect x="-120" y="-5" width="108" height="10" rx="5" fill="#FFFFFF"/>+ <text x="70" y="3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#FFFFFF">+ <tspan>Medium-High</tspan>+ </text>+ <text x="0" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="rgba(255,255,255,0.9)" text-anchor="middle">+ <tspan>Cloud vendors concentrated</tspan>+ </text>+ </g>+ <line x1="550" y1="380" x2="495" y2="380" stroke="#7F8C8D" stroke-width="2" marker-end="url(#arrowHead)"/>++ <!-- Force 5: Top Right Corner - Competitive Rivalry Detail -->+ <g id="force5" transform="translate(1050, 150)">+ <rect x="-150" y="-55" width="300" height="90" rx="12" fill="url(#forceGrad5)" filter="url(#forceShadow)"/>+ <text x="0" y="-25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Competitive Rivalry</tspan>+ </text>+ <rect x="-120" y="-5" width="180" height="10" rx="5" fill="rgba(255,255,255,0.3)"/>+ <rect x="-120" y="-5" width="162" height="10" rx="5" fill="#FFFFFF"/>+ <text x="70" y="3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="bold" fill="#FFFFFF">+ <tspan>Very High</tspan>+ </text>+ <text x="0" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="rgba(255,255,255,0.9)" text-anchor="middle">+ <tspan>Many competitors, Price wars common</tspan>+ </text>+ </g>++ <!-- Info panels -->+ <g id="infoPanel">+ <rect x="60" y="520" width="200" height="100" rx="8" fill="#FFFFFF" stroke="#E0E0E0" stroke-width="1" filter="url(#forceShadow)"/>+ <text x="160" y="545" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>Overall Assessment</tspan>+ </text>+ <text x="160" y="575" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="28" font-weight="bold" fill="#E74C3C" text-anchor="middle">+ <tspan>3.4 / 5</tspan>+ </text>+ <text x="160" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle">+ <tspan>High Competition Intensity</tspan>+ </text>+ </g>++ <!-- Strategy recommendations -->+ <g id="recommendations">+ <rect x="60" y="110" width="200" height="120" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="2"/>+ <text x="160" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="bold" fill="#2E7D32" text-anchor="middle">+ <tspan>Strategic Advice</tspan>+ </text>+ <text x="75" y="160" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>1. Build technical moats</tspan>+ </text>+ <text x="75" y="180" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>2. Improve customer stickiness</tspan>+ </text>+ <text x="75" y="200" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>3. Diversify supply chain</tspan>+ </text>+ <text x="75" y="220" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>4. Focus on differentiation</tspan>+ </text>+ </g>++ <!-- Legend -->+ <g id="legend" transform="translate(60, 635)">+ <text x="0" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" font-weight="600" fill="#5D6D7E">+ <tspan>Threat Level:</tspan>+ </text>+ <rect x="90" y="5" width="40" height="14" rx="7" fill="#4CAF50"/>+ <text x="138" y="16" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>Low</tspan></text>+ <rect x="165" y="5" width="60" height="14" rx="7" fill="#F39C12"/>+ <text x="233" y="16" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>Medium</tspan></text>+ <rect x="280" y="5" width="80" height="14" rx="7" fill="#E74C3C"/>+ <text x="368" y="16" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>High</tspan></text>+ </g>++ <text x="640" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#95A5A6" text-anchor="middle">+ <tspan>Data Source: Industry Research Department - 2025 Market Competition Analysis Report</tspan>+ </text>+</svg>diff --git a/templates/charts/preview.html b/templates/charts/preview.htmldeleted file mode 100644index d203da4e..00000000--- a/templates/charts/preview.html+++ /dev/null@@ -1,331 +0,0 @@-<!DOCTYPE html>-<html lang="zh-CN">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>图表模板预览 - PPT Master</title>- <style>- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }-- body {- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);- padding: 40px 20px;- }-- .container {- max-width: 1400px;- margin: 0 auto;- }-- header {- text-align: center;- margin-bottom: 50px;- color: white;- }-- h1 {- font-size: 48px;- font-weight: 700;- margin-bottom: 10px;- text-shadow: 2px 2px 4px rgba(0,0,0,0.2);- }-- .subtitle {- font-size: 18px;- opacity: 0.9;- }-- .charts-grid {- display: grid;- grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));- gap: 30px;- margin-bottom: 40px;- }-- .chart-card {- background: white;- border-radius: 12px;- overflow: hidden;- box-shadow: 0 10px 30px rgba(0,0,0,0.3);- transition: transform 0.3s ease, box-shadow 0.3s ease;- }-- .chart-card:hover {- transform: translateY(-5px);- box-shadow: 0 15px 40px rgba(0,0,0,0.4);- }-- .chart-header {- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);- padding: 20px;- color: white;- }-- .chart-title {- font-size: 24px;- font-weight: 600;- margin-bottom: 5px;- }-- .chart-description {- font-size: 14px;- opacity: 0.9;- }-- .chart-preview {- width: 100%;- height: 0;- padding-bottom: 56.25%; /* 16:9 aspect ratio */- position: relative;- background: #f5f5f5;- }-- .chart-preview object {- position: absolute;- top: 0;- left: 0;- width: 100%;- height: 100%;- }-- .chart-footer {- padding: 15px 20px;- background: #f8f9fa;- display: flex;- justify-content: space-between;- align-items: center;- }-- .chart-filename {- font-size: 14px;- color: #5d6d7e;- font-family: 'Monaco', 'Courier New', monospace;- }-- .view-button {- padding: 8px 16px;- background: #667eea;- color: white;- border: none;- border-radius: 6px;- font-size: 14px;- font-weight: 600;- cursor: pointer;- text-decoration: none;- transition: background 0.3s ease;- }-- .view-button:hover {- background: #5568d3;- }-- footer {- text-align: center;- color: white;- margin-top: 40px;- font-size: 14px;- opacity: 0.8;- }-- .info-box {- background: rgba(255, 255, 255, 0.95);- border-radius: 12px;- padding: 30px;- margin-bottom: 40px;- box-shadow: 0 10px 30px rgba(0,0,0,0.2);- }-- .info-box h2 {- color: #2c3e50;- font-size: 28px;- margin-bottom: 15px;- }-- .info-box p {- color: #5d6d7e;- font-size: 16px;- line-height: 1.6;- margin-bottom: 10px;- }-- .info-box ul {- margin-left: 25px;- color: #5d6d7e;- }-- .info-box li {- margin-bottom: 8px;- line-height: 1.5;- }-- .info-box code {- background: #f4f4f4;- padding: 2px 6px;- border-radius: 3px;- font-family: 'Monaco', 'Courier New', monospace;- font-size: 14px;- color: #e74c3c;- }-- @media (max-width: 768px) {- .charts-grid {- grid-template-columns: 1fr;- }-- h1 {- font-size: 32px;- }-- .chart-title {- font-size: 20px;- }- }- </style>-</head>-<body>- <div class="container">- <header>- <h1>📊 图表模板库</h1>- <p class="subtitle">PPT Master 标准化 SVG 图表模板</p>- </header>-- <div class="info-box">- <h2>💡 使用说明</h2>- <p>这些模板旨在提高 SVG 图表生成的质量和一致性,所有模板遵循以下规范:</p>- <ul>- <li>禁止使用 <code><foreignObject></code>,文本换行使用 <code><tspan></code></li>- <li>使用系统 UI 字体栈,确保跨平台一致性</li>- <li>配色符合通用灵活或高端咨询风格</li>- <li>遵循 CRAP 设计原则(对齐、对比、重复、亲密性)</li>- <li>默认画布:16:9 (1280×720),其他格式需按比例调整</li>- </ul>- <p style="margin-top: 15px;">详细文档请参阅 <code>README.md</code></p>- </div>-- <div class="charts-grid">- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">KPI 卡片</div>- <div class="chart-description">关键业绩指标展示 · 2×2 布局</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="kpi_cards.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">kpi_cards.svg</span>- <a href="kpi_cards.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">柱状图</div>- <div class="chart-description">类别数据对比 · 支持 3-8 个柱子</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="bar_chart.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">bar_chart.svg</span>- <a href="bar_chart.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">折线图</div>- <div class="chart-description">趋势分析 · 支持多条折线对比</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="line_chart.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">line_chart.svg</span>- <a href="line_chart.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">环形图</div>- <div class="chart-description">占比分析 · 支持 3-6 个分块</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="donut_chart.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">donut_chart.svg</span>- <a href="donut_chart.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">漏斗图</div>- <div class="chart-description">转化流程分析 · 支持 3-5 个阶段</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="funnel_chart.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">funnel_chart.svg</span>- <a href="funnel_chart.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">矩阵图 (2×2)</div>- <div class="chart-description">四象限分析 · 如波士顿矩阵</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="matrix_2x2.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">matrix_2x2.svg</span>- <a href="matrix_2x2.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">时间轴</div>- <div class="chart-description">时序事件展示 · 支持 3-8 个节点</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="timeline.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">timeline.svg</span>- <a href="timeline.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>-- <div class="chart-card">- <div class="chart-header">- <div class="chart-title">流程图</div>- <div class="chart-description">业务流程展示 · 支持决策节点和回环</div>- </div>- <div class="chart-preview">- <object type="image/svg+xml" data="process_flow.svg"></object>- </div>- <div class="chart-footer">- <span class="chart-filename">process_flow.svg</span>- <a href="process_flow.svg" class="view-button" target="_blank">查看源码</a>- </div>- </div>- </div>-- <footer>- <p>PPT Master · 图表模板库 v1.0</p>- <p>最后更新:2025-11-09</p>- </footer>- </div>-</body>-</html>-diff --git a/templates/charts/progress_bar_chart.svg b/templates/charts/progress_bar_chart.svgnew file mode 100644index 00000000..66e94437--- /dev/null+++ b/templates/charts/progress_bar_chart.svg@@ -0,0 +1,295 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 进度条图模板+ 用途: 目标完成进度、多项指标对比+ 适用场景: OKR进度、项目完成度、KPI达成、预算执行+ 支持: 6个进度条,带目标线和状态标签+ -->++ <defs>+ <!-- 进度条渐变(蓝色-默认) -->+ <linearGradient id="progressBlue" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#42A5F5;stop-opacity:1" />+ </linearGradient>++ <!-- 进度条渐变(绿色-完成/超额) -->+ <linearGradient id="progressGreen" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#66BB6A;stop-opacity:1" />+ </linearGradient>++ <!-- 进度条渐变(橙色-进行中) -->+ <linearGradient id="progressOrange" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFB74D;stop-opacity:1" />+ </linearGradient>++ <!-- 进度条渐变(红色-落后) -->+ <linearGradient id="progressRed" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#f44336;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#EF5350;stop-opacity:1" />+ </linearGradient>++ <!-- 进度条阴影 -->+ <filter id="progressShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.2"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>2025年Q4 OKR进度追踪</tspan>+ </text>++ <text x="60" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>截止日期: 2025年12月31日 · 剩余 20 天</tspan>+ </text>++ <!-- 总体进度概览 -->+ <g id="overallProgress" transform="translate(900, 50)">+ <rect x="0" y="0" width="320" height="60" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>+ <text x="20" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>整体完成度</tspan>+ </text>+ <text x="20" y="48" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#2196F3">+ <tspan>73.5%</tspan>+ </text>+ <text x="110" y="48" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>/ 目标 100%</tspan>+ </text>++ <!-- 迷你进度条 -->+ <rect x="200" y="20" width="100" height="24" rx="12" fill="#E0E0E0"/>+ <rect x="200" y="20" width="73.5" height="24" rx="12" fill="url(#progressBlue)"/>+ </g>++ <!-- 进度条区域 -->+ <g id="progressBars">+ <!--+ 每个进度条:+ - 总宽度: 700px (从x=360到x=1060)+ - 高度: 32px+ - 垂直间距: 85px+ -->++ <!-- 进度条1: 营收目标 92% (超额完成) -->+ <g transform="translate(60, 150)">+ <!-- 标签区 -->+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>营收目标</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 5000万 | 实际: 4600万</tspan>+ </text>++ <!-- 背景条 -->+ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>++ <!-- 进度条 92% -->+ <rect x="300" y="8" width="644" height="32" rx="16" fill="url(#progressGreen)" filter="url(#progressShadow)"/>++ <!-- 目标线 (100% = 700px) -->+ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>+ <text x="1000" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D" text-anchor="middle"><tspan>目标</tspan></text>++ <!-- 百分比 -->+ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#4CAF50">+ <tspan>92%</tspan>+ </text>++ <!-- 状态标签 -->+ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#E8F5E9"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#4CAF50" text-anchor="middle">+ <tspan>超前</tspan>+ </text>+ </g>++ <!-- 进度条2: 新客户获取 85% -->+ <g transform="translate(60, 235)">+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>新客户获取</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 200家 | 实际: 170家</tspan>+ </text>++ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>+ <rect x="300" y="8" width="595" height="32" rx="16" fill="url(#progressGreen)" filter="url(#progressShadow)"/>++ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>++ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#4CAF50">+ <tspan>85%</tspan>+ </text>++ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#E8F5E9"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#4CAF50" text-anchor="middle">+ <tspan>达标</tspan>+ </text>+ </g>++ <!-- 进度条3: 产品发布 75% -->+ <g transform="translate(60, 320)">+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>产品发布</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 4个功能 | 实际: 3个功能</tspan>+ </text>++ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>+ <rect x="300" y="8" width="525" height="32" rx="16" fill="url(#progressBlue)" filter="url(#progressShadow)"/>++ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>++ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#2196F3">+ <tspan>75%</tspan>+ </text>++ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#E3F2FD"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#2196F3" text-anchor="middle">+ <tspan>进行中</tspan>+ </text>+ </g>++ <!-- 进度条4: 团队扩张 68% -->+ <g transform="translate(60, 405)">+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>团队扩张</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 25人 | 实际: 17人</tspan>+ </text>++ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>+ <rect x="300" y="8" width="476" height="32" rx="16" fill="url(#progressOrange)" filter="url(#progressShadow)"/>++ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>++ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FF9800">+ <tspan>68%</tspan>+ </text>++ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#FFF3E0"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#FF9800" text-anchor="middle">+ <tspan>滞后</tspan>+ </text>+ </g>++ <!-- 进度条5: 成本控制 55% -->+ <g transform="translate(60, 490)">+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>成本控制</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 降低20% | 实际: 降低11%</tspan>+ </text>++ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>+ <rect x="300" y="8" width="385" height="32" rx="16" fill="url(#progressRed)" filter="url(#progressShadow)"/>++ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>++ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#f44336">+ <tspan>55%</tspan>+ </text>++ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#FFEBEE"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#f44336" text-anchor="middle">+ <tspan>风险</tspan>+ </text>+ </g>++ <!-- 进度条6: 品牌建设 66% -->+ <g transform="translate(60, 575)">+ <text x="0" y="20" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" font-weight="600" fill="#2C3E50">+ <tspan>品牌建设</tspan>+ </text>+ <text x="0" y="42" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#7F8C8D">+ <tspan>目标: 知名度+30% | 实际: +20%</tspan>+ </text>++ <rect x="300" y="8" width="700" height="32" rx="16" fill="#EEEEEE"/>+ <rect x="300" y="8" width="462" height="32" rx="16" fill="url(#progressOrange)" filter="url(#progressShadow)"/>++ <line x1="1000" y1="2" x2="1000" y2="46" stroke="#2C3E50" stroke-width="2" stroke-dasharray="4,2"/>++ <text x="1050" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FF9800">+ <tspan>66%</tspan>+ </text>++ <rect x="1110" y="8" width="70" height="32" rx="16" fill="#FFF3E0"/>+ <text x="1145" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#FF9800" text-anchor="middle">+ <tspan>滞后</tspan>+ </text>+ </g>+ </g>++ <!-- 图例 -->+ <g id="legend" transform="translate(60, 660)">+ <rect x="0" y="0" width="16" height="16" rx="4" fill="url(#progressGreen)"/>+ <text x="24" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>达标/超前 (≥80%)</tspan></text>++ <rect x="160" y="0" width="16" height="16" rx="4" fill="url(#progressBlue)"/>+ <text x="184" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>进行中 (70-80%)</tspan></text>++ <rect x="320" y="0" width="16" height="16" rx="4" fill="url(#progressOrange)"/>+ <text x="344" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>滞后 (60-70%)</tspan></text>++ <rect x="470" y="0" width="16" height="16" rx="4" fill="url(#progressRed)"/>+ <text x="494" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>风险 (<60%)</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: OKR管理系统</tspan>+ </text>+</svg>+diff --git a/templates/charts/sankey_chart.svg b/templates/charts/sankey_chart.svgnew file mode 100644index 00000000..52eab801--- /dev/null+++ b/templates/charts/sankey_chart.svg@@ -0,0 +1,303 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ Sankey Chart Template+ Purpose: Data flow visualization, budget allocation, energy flow+ Use cases: Budget distribution, energy consumption, resource allocation+ Feature: All flows are complete - input total = output total+ -->++ <defs>+ <!-- Flow gradients: Source to Department -->+ <linearGradient id="flowA1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#4CAF50;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowA2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#FF9800;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowA3" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#9C27B0;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowA4" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#607D8B;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowB1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#00BCD4;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#4CAF50;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowB2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#00BCD4;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#FF9800;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowB3" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#00BCD4;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#9C27B0;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowC1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E91E63;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#FF9800;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowC2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#E91E63;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#607D8B;stop-opacity:0.7" />+ </linearGradient>++ <!-- Flow gradients: Department to Expense -->+ <linearGradient id="flowD1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#3F51B5;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowD2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#009688;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowE1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#3F51B5;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowE2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#F44336;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowF1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#9C27B0;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#3F51B5;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowF2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#9C27B0;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#009688;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowG1" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#607D8B;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#3F51B5;stop-opacity:0.7" />+ </linearGradient>+ <linearGradient id="flowG2" x1="0%" y1="0%" x2="100%" y2="0%">+ <stop offset="0%" style="stop-color:#607D8B;stop-opacity:0.7" />+ <stop offset="100%" style="stop-color:#795548;stop-opacity:0.7" />+ </linearGradient>+ </defs>++ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- Title -->+ <text x="640" y="45" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="28" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>Annual Budget Allocation Flow</tspan>+ </text>+ <text x="640" y="75" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#7F8C8D" text-anchor="middle">+ <tspan>2025 FY - Total Budget: $100M (All flows complete)</tspan>+ </text>++ <!-- Column Labels -->+ <text x="120" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle">+ <tspan>Revenue Source</tspan>+ </text>+ <text x="640" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle">+ <tspan>Department</tspan>+ </text>+ <text x="1160" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle">+ <tspan>Expense Type</tspan>+ </text>++ <!-- ==================== LAYER 1: Revenue Sources ==================== -->+ <!-- Product Sales: $60M (height=270) -->+ <rect x="40" y="130" width="160" height="270" rx="4" fill="#2196F3"/>+ <text x="120" y="250" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Product Sales</tspan>+ </text>+ <text x="120" y="275" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$60M</tspan>+ </text>++ <!-- Service Revenue: $30M (height=135) -->+ <rect x="40" y="420" width="160" height="135" rx="4" fill="#00BCD4"/>+ <text x="120" y="480" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Service Revenue</tspan>+ </text>+ <text x="120" y="505" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$30M</tspan>+ </text>++ <!-- Investment Income: $10M (height=45) -->+ <rect x="40" y="575" width="160" height="45" rx="4" fill="#E91E63"/>+ <text x="120" y="603" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Investment $10M</tspan>+ </text>++ <!-- ==================== LAYER 2: Departments ==================== -->+ <!-- R&D: $35M (height=157.5) -->+ <rect x="560" y="130" width="160" height="157" rx="4" fill="#4CAF50"/>+ <text x="640" y="200" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>R&D</tspan>+ </text>+ <text x="640" y="225" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$35M</tspan>+ </text>++ <!-- Sales & Marketing: $30M (height=135) -->+ <rect x="560" y="307" width="160" height="135" rx="4" fill="#FF9800"/>+ <text x="640" y="365" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Sales & Marketing</tspan>+ </text>+ <text x="640" y="390" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$30M</tspan>+ </text>++ <!-- Operations: $25M (height=112.5) -->+ <rect x="560" y="462" width="160" height="112" rx="4" fill="#9C27B0"/>+ <text x="640" y="510" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Operations</tspan>+ </text>+ <text x="640" y="535" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$25M</tspan>+ </text>++ <!-- Admin: $10M (height=45) -->+ <rect x="560" y="594" width="160" height="45" rx="4" fill="#607D8B"/>+ <text x="640" y="622" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Admin $10M</tspan>+ </text>++ <!-- ==================== LAYER 3: Expense Types ==================== -->+ <!-- Personnel: $50M (height=225) -->+ <rect x="1080" y="130" width="160" height="225" rx="4" fill="#3F51B5"/>+ <text x="1160" y="230" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Personnel</tspan>+ </text>+ <text x="1160" y="255" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$50M</tspan>+ </text>++ <!-- Marketing Expense: $20M (height=90) -->+ <rect x="1080" y="375" width="160" height="90" rx="4" fill="#F44336"/>+ <text x="1160" y="415" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Marketing</tspan>+ </text>+ <text x="1160" y="440" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$20M</tspan>+ </text>++ <!-- Infrastructure: $20M (height=90) -->+ <rect x="1080" y="485" width="160" height="90" rx="4" fill="#009688"/>+ <text x="1160" y="525" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Infrastructure</tspan>+ </text>+ <text x="1160" y="550" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>$20M</tspan>+ </text>++ <!-- Other: $10M (height=45) -->+ <rect x="1080" y="595" width="160" height="45" rx="4" fill="#795548"/>+ <text x="1160" y="623" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>Other $10M</tspan>+ </text>++ <!-- ==================== FLOW PATHS: Source to Department ==================== -->+ <!-- Product Sales ($60M) flows to: R&D $25M, Sales $18M, Operations $12M, Admin $5M -->+ <path d="M 200,175 C 380,175 380,175 560,175" fill="none" stroke="url(#flowA1)" stroke-width="56" opacity="0.6"/>+ <path d="M 200,255 C 380,255 380,340 560,340" fill="none" stroke="url(#flowA2)" stroke-width="40" opacity="0.6"/>+ <path d="M 200,320 C 380,320 380,490 560,490" fill="none" stroke="url(#flowA3)" stroke-width="27" opacity="0.6"/>+ <path d="M 200,375 C 380,375 380,610 560,610" fill="none" stroke="url(#flowA4)" stroke-width="11" opacity="0.6"/>++ <!-- Service Revenue ($30M) flows to: R&D $10M, Sales $10M, Operations $10M -->+ <path d="M 200,450 C 380,450 380,255 560,255" fill="none" stroke="url(#flowB1)" stroke-width="23" opacity="0.6"/>+ <path d="M 200,490 C 380,490 380,400 560,400" fill="none" stroke="url(#flowB2)" stroke-width="23" opacity="0.6"/>+ <path d="M 200,530 C 380,530 380,545 560,545" fill="none" stroke="url(#flowB3)" stroke-width="23" opacity="0.6"/>++ <!-- Investment Income ($10M) flows to: Sales $2M, Admin $8M -->+ <path d="M 200,590 C 380,590 380,430 560,430" fill="none" stroke="url(#flowC1)" stroke-width="5" opacity="0.6"/>+ <path d="M 200,605 C 380,605 380,625 560,625" fill="none" stroke="url(#flowC2)" stroke-width="18" opacity="0.6"/>++ <!-- ==================== FLOW PATHS: Department to Expense ==================== -->+ <!-- R&D ($35M) flows to: Personnel $28M, Infrastructure $7M -->+ <path d="M 720,175 C 900,175 900,200 1080,200" fill="none" stroke="url(#flowD1)" stroke-width="63" opacity="0.6"/>+ <path d="M 720,250 C 900,250 900,515 1080,515" fill="none" stroke="url(#flowD2)" stroke-width="16" opacity="0.6"/>++ <!-- Sales & Marketing ($30M) flows to: Personnel $10M, Marketing $20M -->+ <path d="M 720,340 C 900,340 900,290 1080,290" fill="none" stroke="url(#flowE1)" stroke-width="23" opacity="0.6"/>+ <path d="M 720,400 C 900,400 900,415 1080,415" fill="none" stroke="url(#flowE2)" stroke-width="45" opacity="0.6"/>++ <!-- Operations ($25M) flows to: Personnel $10M, Infrastructure $15M -->+ <path d="M 720,490 C 900,490 900,330 1080,330" fill="none" stroke="url(#flowF1)" stroke-width="23" opacity="0.6"/>+ <path d="M 720,545 C 900,545 900,550 1080,550" fill="none" stroke="url(#flowF2)" stroke-width="34" opacity="0.6"/>++ <!-- Admin ($10M) flows to: Personnel $2M, Other $8M -->+ <path d="M 720,605 C 900,605 900,350 1080,350" fill="none" stroke="url(#flowG1)" stroke-width="5" opacity="0.6"/>+ <path d="M 720,625 C 900,625 900,615 1080,615" fill="none" stroke="url(#flowG2)" stroke-width="18" opacity="0.6"/>++ <!-- Summary Stats -->+ <g id="stats">+ <rect x="40" y="655" width="1200" height="50" rx="6" fill="#F5F7FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="160" y="680" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#5D6D7E" text-anchor="middle">+ <tspan>Total Revenue</tspan>+ </text>+ <text x="160" y="697" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#2196F3" text-anchor="middle">+ <tspan>$100M</tspan>+ </text>++ <text x="400" y="680" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#5D6D7E" text-anchor="middle">+ <tspan>Largest Dept</tspan>+ </text>+ <text x="400" y="697" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#4CAF50" text-anchor="middle">+ <tspan>R&D 35%</tspan>+ </text>++ <text x="640" y="680" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#5D6D7E" text-anchor="middle">+ <tspan>Personnel Cost</tspan>+ </text>+ <text x="640" y="697" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#3F51B5" text-anchor="middle">+ <tspan>50%</tspan>+ </text>++ <text x="880" y="680" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#5D6D7E" text-anchor="middle">+ <tspan>Marketing Spend</tspan>+ </text>+ <text x="880" y="697" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#F44336" text-anchor="middle">+ <tspan>20%</tspan>+ </text>++ <text x="1120" y="680" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#5D6D7E" text-anchor="middle">+ <tspan>Total Expense</tspan>+ </text>+ <text x="1120" y="697" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>$100M</tspan>+ </text>+ </g>+</svg>diff --git a/templates/charts/scatter_chart.svg b/templates/charts/scatter_chart.svgnew file mode 100644index 00000000..ad9fb26a--- /dev/null+++ b/templates/charts/scatter_chart.svg@@ -0,0 +1,235 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 散点图模板+ 用途: 相关性分析、数据分布展示+ 适用场景: 价格vs销量、投入vs产出、身高vs体重+ 支持: 2个系列,每系列多个数据点+ -->++ <defs>+ <!-- 数据点阴影 -->+ <filter id="scatterShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.3"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>++ <!-- 系列1渐变 -->+ <radialGradient id="dotGrad1" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#42A5F5;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </radialGradient>++ <!-- 系列2渐变 -->+ <radialGradient id="dotGrad2" cx="30%" cy="30%">+ <stop offset="0%" style="stop-color:#66BB6A;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:1" />+ </radialGradient>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>广告投入与销售额关系分析</tspan>+ </text>++ <text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年各区域数据 · 样本量 N=24</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(950, 70)">+ <circle cx="10" cy="10" r="8" fill="url(#dotGrad1)"/>+ <text x="28" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>线上渠道</tspan>+ </text>++ <circle cx="130" cy="10" r="8" fill="url(#dotGrad2)"/>+ <text x="148" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="15" fill="#5D6D7E">+ <tspan>线下渠道</tspan>+ </text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- 网格线 -->+ <!-- 水平网格线 -->+ <line x1="140" y1="560" x2="1100" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="470" x2="1100" y2="470" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="380" x2="1100" y2="380" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="290" x2="1100" y2="290" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="200" x2="1100" y2="200" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- 垂直网格线 -->+ <line x1="300" y1="160" x2="300" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="460" y1="160" x2="460" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="620" y1="160" x2="620" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="780" y1="160" x2="780" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="940" y1="160" x2="940" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="1100" y1="160" x2="1100" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="125" y="565" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>0</tspan></text>+ <text x="125" y="475" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>200</tspan></text>+ <text x="125" y="385" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>400</tspan></text>+ <text x="125" y="295" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>600</tspan></text>+ <text x="125" y="205" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>800</tspan></text>++ <!-- Y轴标题 -->+ <text x="45" y="360" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#5D6D7E" text-anchor="middle" transform="rotate(-90, 45, 360)">+ <tspan>销售额(万元)</tspan>+ </text>++ <!-- X轴刻度标签 -->+ <text x="140" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>0</tspan></text>+ <text x="300" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>20</tspan></text>+ <text x="460" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>40</tspan></text>+ <text x="620" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>60</tspan></text>+ <text x="780" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>80</tspan></text>+ <text x="940" y="590" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="middle"><tspan>100</tspan></text>++ <!-- X轴标题 -->+ <text x="620" y="625" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#5D6D7E" text-anchor="middle">+ <tspan>广告投入(万元)</tspan>+ </text>++ <!-- 坐标轴 -->+ <line x1="140" y1="160" x2="140" y2="560" stroke="#95A5A6" stroke-width="2"/>+ <line x1="140" y1="560" x2="1100" y2="560" stroke="#95A5A6" stroke-width="2"/>++ <!--+ 数据点计算:+ X: 140 + (value/100) * 960+ Y: 560 - (value/800) * 400+ -->++ <!-- 趋势线(线上渠道) -->+ <line x1="180" y1="505" x2="1020" y2="215" stroke="#2196F3" stroke-width="2" stroke-dasharray="8,4" opacity="0.5"/>++ <!-- 趋势线(线下渠道) -->+ <line x1="220" y1="515" x2="900" y2="295" stroke="#4CAF50" stroke-width="2" stroke-dasharray="8,4" opacity="0.5"/>++ <!-- 系列1: 线上渠道数据点(蓝色) -->+ <circle cx="220" cy="470" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="300" cy="425" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="340" cy="445" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="420" cy="380" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="500" cy="350" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="540" cy="320" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="620" cy="310" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="700" cy="270" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="780" cy="250" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="860" cy="230" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="940" cy="210" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>+ <circle cx="1000" cy="195" r="10" fill="url(#dotGrad1)" filter="url(#scatterShadow)"/>++ <!-- 系列2: 线下渠道数据点(绿色) -->+ <circle cx="260" cy="490" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="320" cy="460" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="400" cy="430" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="460" cy="400" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="540" cy="380" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="600" cy="365" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="680" cy="340" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="740" cy="325" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="820" cy="305" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="880" cy="290" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="920" cy="280" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ <circle cx="980" cy="265" r="10" fill="url(#dotGrad2)" filter="url(#scatterShadow)"/>+ </g>++ <!-- 统计信息卡片 -->+ <g id="statsPanel" transform="translate(1120, 160)">+ <rect x="0" y="0" width="140" height="200" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="70" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>统计摘要</tspan>+ </text>++ <line x1="15" y1="45" x2="125" y2="45" stroke="#E0E0E0" stroke-width="1"/>++ <!-- 线上渠道 -->+ <circle cx="25" cy="70" r="6" fill="url(#dotGrad1)"/>+ <text x="40" y="75" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E">+ <tspan>线上渠道</tspan>+ </text>+ <text x="25" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D">+ <tspan>R² = 0.94</tspan>+ </text>+ <text x="25" y="112" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D">+ <tspan>斜率 = 6.8</tspan>+ </text>++ <!-- 线下渠道 -->+ <circle cx="25" cy="140" r="6" fill="url(#dotGrad2)"/>+ <text x="40" y="145" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E">+ <tspan>线下渠道</tspan>+ </text>+ <text x="25" y="165" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D">+ <tspan>R² = 0.91</tspan>+ </text>+ <text x="25" y="182" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D">+ <tspan>斜率 = 5.2</tspan>+ </text>+ </g>++ <!-- 洞察卡片 -->+ <g id="insightCard" transform="translate(1120, 380)">+ <rect x="0" y="0" width="140" height="100" rx="8" fill="#E3F2FD" stroke="#2196F3" stroke-width="1"/>+ <text x="15" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#1976D2">+ <tspan>💡 洞察</tspan>+ </text>+ <text x="15" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>线上渠道ROI</tspan>+ </text>+ <text x="15" y="68" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#5D6D7E">+ <tspan>高于线下 31%</tspan>+ </text>+ <text x="15" y="88" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="11" fill="#7F8C8D">+ <tspan>建议增加线上投入</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 市场营销部门</tspan>+ </text>+</svg>+diff --git a/templates/charts/stacked_area_chart.svg b/templates/charts/stacked_area_chart.svgnew file mode 100644index 00000000..e3856783--- /dev/null+++ b/templates/charts/stacked_area_chart.svg@@ -0,0 +1,230 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 堆叠面积图模板+ 用途: 多系列累积趋势、构成变化+ 适用场景: 收入构成变化、流量来源趋势、市场份额演进+ 支持: 4个系列 × 12个时间点+ -->++ <defs>+ <!-- 系列1渐变(蓝色) -->+ <linearGradient id="stackGrad1" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:0.85" />+ <stop offset="100%" style="stop-color:#2196F3;stop-opacity:0.6" />+ </linearGradient>++ <!-- 系列2渐变(绿色) -->+ <linearGradient id="stackGrad2" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:0.85" />+ <stop offset="100%" style="stop-color:#4CAF50;stop-opacity:0.6" />+ </linearGradient>++ <!-- 系列3渐变(橙色) -->+ <linearGradient id="stackGrad3" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#FF9800;stop-opacity:0.85" />+ <stop offset="100%" style="stop-color:#FF9800;stop-opacity:0.6" />+ </linearGradient>++ <!-- 系列4渐变(紫色) -->+ <linearGradient id="stackGrad4" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#9C27B0;stop-opacity:0.85" />+ <stop offset="100%" style="stop-color:#9C27B0;stop-opacity:0.6" />+ </linearGradient>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="60" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>营收来源构成趋势</tspan>+ </text>++ <text x="60" y="95" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年度月度数据 · 单位:百万元</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(800, 60)">+ <rect x="0" y="0" width="16" height="16" rx="3" fill="#2196F3"/>+ <text x="24" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E"><tspan>订阅收入</tspan></text>++ <rect x="110" y="0" width="16" height="16" rx="3" fill="#4CAF50"/>+ <text x="134" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E"><tspan>广告收入</tspan></text>++ <rect x="220" y="0" width="16" height="16" rx="3" fill="#FF9800"/>+ <text x="244" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E"><tspan>增值服务</tspan></text>++ <rect x="330" y="0" width="16" height="16" rx="3" fill="#9C27B0"/>+ <text x="354" y="13" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E"><tspan>其他</tspan></text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- Y轴网格线 -->+ <line x1="100" y1="550" x2="1180" y2="550" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="100" y1="460" x2="1180" y2="460" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="100" y1="370" x2="1180" y2="370" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="100" y1="280" x2="1180" y2="280" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="100" y1="190" x2="1180" y2="190" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="85" y="555" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>0</tspan></text>+ <text x="85" y="465" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>50</tspan></text>+ <text x="85" y="375" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>100</tspan></text>+ <text x="85" y="285" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>150</tspan></text>+ <text x="85" y="195" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="end"><tspan>200</tspan></text>++ <!-- 坐标轴 -->+ <line x1="100" y1="150" x2="100" y2="550" stroke="#95A5A6" stroke-width="2"/>+ <line x1="100" y1="550" x2="1180" y2="550" stroke="#95A5A6" stroke-width="2"/>++ <!-- X轴标签(12个月) -->+ <!-- 每月间距: 90px -->+ <text x="145" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>1月</tspan></text>+ <text x="235" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>2月</tspan></text>+ <text x="325" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>3月</tspan></text>+ <text x="415" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>4月</tspan></text>+ <text x="505" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>5月</tspan></text>+ <text x="595" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>6月</tspan></text>+ <text x="685" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>7月</tspan></text>+ <text x="775" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>8月</tspan></text>+ <text x="865" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>9月</tspan></text>+ <text x="955" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>10月</tspan></text>+ <text x="1045" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>11月</tspan></text>+ <text x="1135" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#7F8C8D" text-anchor="middle"><tspan>12月</tspan></text>++ <!--+ 数据说明(从下到上堆叠):+ X坐标: 145, 235, 325, 415, 505, 595, 685, 775, 865, 955, 1045, 1135+ Y: 550 - value * 1.8++ 系列1 订阅收入: 45, 48, 52, 55, 58, 62, 68, 72, 70, 68, 75, 82+ 系列2 广告收入: 25, 28, 30, 32, 35, 38, 42, 45, 43, 40, 45, 50+ 系列3 增值服务: 15, 16, 18, 20, 22, 25, 28, 30, 28, 26, 30, 35+ 系列4 其他: 8, 8, 10, 10, 12, 12, 15, 15, 14, 14, 15, 18++ 累计:+ L1底: 0+ L1顶: 45, 48, 52, 55, 58, 62, 68, 72, 70, 68, 75, 82+ L2顶: 70, 76, 82, 87, 93, 100, 110, 117, 113, 108, 120, 132+ L3顶: 85, 92, 100, 107, 115, 125, 138, 147, 141, 134, 150, 167+ L4顶: 93, 100, 110, 117, 127, 137, 153, 162, 155, 148, 165, 185+ -->++ <!-- 系列4: 其他(最上层,紫色) -->+ <path d="M 145,550+ L 145,382.6 L 235,370 L 325,352 L 415,339.4 L 505,321.4 L 595,303.4 L 685,274.6 L 775,258.4 L 865,271 L 955,283.6 L 1045,253 L 1135,217+ L 1135,249.4 L 1045,280 L 955,308.8 L 865,296.2 L 775,285.4 L 685,301.6 L 595,325 L 505,343 L 415,357.4 L 325,370 L 235,384.4 L 145,397+ Z" fill="url(#stackGrad4)"/>++ <!-- 系列3: 增值服务(橙色) -->+ <path d="M 145,550+ L 145,397 L 235,384.4 L 325,370 L 415,357.4 L 505,343 L 595,325 L 685,301.6 L 775,285.4 L 865,296.2 L 955,308.8 L 1045,280 L 1135,249.4+ L 1135,312.4 L 1045,334 L 955,355.6 L 865,342.6 L 775,337 L 685,352.4 L 595,374 L 505,387 L 415,398.6 L 325,406 L 235,413.2 L 145,424+ Z" fill="url(#stackGrad3)"/>++ <!-- 系列2: 广告收入(绿色) -->+ <path d="M 145,550+ L 145,424 L 235,413.2 L 325,406 L 415,398.6 L 505,387 L 595,374 L 685,352.4 L 775,337 L 865,342.6 L 955,355.6 L 1045,334 L 1135,312.4+ L 1135,402.4 L 1045,415 L 955,427.6 L 865,424 L 775,418.6 L 685,424 L 595,436.6 L 505,445 L 415,451 L 325,456.4 L 235,463.6 L 145,469+ Z" fill="url(#stackGrad2)"/>++ <!-- 系列1: 订阅收入(蓝色,最底层) -->+ <path d="M 145,550+ L 145,469 L 235,463.6 L 325,456.4 L 415,451 L 505,445 L 595,436.6 L 685,424 L 775,418.6 L 865,424 L 955,427.6 L 1045,415 L 1135,402.4+ L 1135,550 Z" fill="url(#stackGrad1)"/>++ <!-- 顶部边线 -->+ <path d="M 145,382.6 L 235,370 L 325,352 L 415,339.4 L 505,321.4 L 595,303.4 L 685,274.6 L 775,258.4 L 865,271 L 955,283.6 L 1045,253 L 1135,217"+ fill="none" stroke="#9C27B0" stroke-width="2"/>+ </g>++ <!-- 标注(8月峰值) -->+ <g id="annotation">+ <rect x="730" y="195" width="90" height="50" rx="6" fill="#9C27B0"/>+ <text x="775" y="218" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>峰值月份</tspan></text>+ <text x="775" y="236" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#FFFFFF" text-anchor="middle"><tspan>162M</tspan></text>+ <path d="M 775,245 L 770,258.4 L 780,258.4 Z" fill="#9C27B0"/>+ </g>++ <!-- 统计卡片 -->+ <g id="statsCards" transform="translate(60, 610)">+ <!-- 卡片1 -->+ <rect x="0" y="0" width="200" height="80" rx="8" fill="#E3F2FD" stroke="#2196F3" stroke-width="1"/>+ <text x="20" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#1976D2"><tspan>订阅收入</tspan></text>+ <text x="20" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#2196F3"><tspan>755M</tspan></text>+ <text x="20" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>占比 48.5% ↑12%</tspan></text>++ <!-- 卡片2 -->+ <rect x="220" y="0" width="200" height="80" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="1"/>+ <text x="240" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#388E3C"><tspan>广告收入</tspan></text>+ <text x="240" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#4CAF50"><tspan>453M</tspan></text>+ <text x="240" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>占比 29.1% ↑8%</tspan></text>++ <!-- 卡片3 -->+ <rect x="440" y="0" width="200" height="80" rx="8" fill="#FFF3E0" stroke="#FF9800" stroke-width="1"/>+ <text x="460" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#F57C00"><tspan>增值服务</tspan></text>+ <text x="460" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#FF9800"><tspan>293M</tspan></text>+ <text x="460" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>占比 18.8% ↑15%</tspan></text>++ <!-- 卡片4 -->+ <rect x="660" y="0" width="200" height="80" rx="8" fill="#F3E5F5" stroke="#9C27B0" stroke-width="1"/>+ <text x="680" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#7B1FA2"><tspan>其他收入</tspan></text>+ <text x="680" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#9C27B0"><tspan>56M</tspan></text>+ <text x="680" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>占比 3.6% ↑5%</tspan></text>++ <!-- 总计 -->+ <rect x="880" y="0" width="200" height="80" rx="8" fill="#F8F9FA" stroke="#2C3E50" stroke-width="2"/>+ <text x="900" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>年度总营收</tspan></text>+ <text x="900" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#2C3E50"><tspan>1,557M</tspan></text>+ <text x="900" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#27AE60"><tspan>同比增长 +11.2%</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="700" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 财务部门</tspan>+ </text>+</svg>+diff --git a/templates/charts/swot_analysis.svg b/templates/charts/swot_analysis.svgnew file mode 100644index 00000000..f97947ee--- /dev/null+++ b/templates/charts/swot_analysis.svg@@ -0,0 +1,277 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ SWOT Analysis Chart Template+ Purpose: Strategic analysis, competitive assessment+ Use cases: Business plans, strategic planning, competitor analysis, project evaluation+ Supports: Four quadrant display (Strengths, Weaknesses, Opportunities, Threats)+ -->++ <defs>+ <linearGradient id="strengthsGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#E8F5E9;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#C8E6C9;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="weaknessesGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#FFEBEE;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFCDD2;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="opportunitiesGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#E3F2FD;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#BBDEFB;stop-opacity:1" />+ </linearGradient>++ <linearGradient id="threatsGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" style="stop-color:#FFF3E0;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#FFE0B2;stop-opacity:1" />+ </linearGradient>++ <filter id="cardShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="4"/>+ <feOffset dx="0" dy="2"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.2"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <rect width="1280" height="720" fill="#FAFBFC"/>++ <text x="640" y="50" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50" text-anchor="middle">+ <tspan>SWOT Strategic Analysis</tspan>+ </text>++ <text x="640" y="85" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D" text-anchor="middle">+ <tspan>ABC Tech Company - 2025 Market Competition Assessment</tspan>+ </text>++ <!-- Axis labels -->+ <text x="345" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#4CAF50" text-anchor="middle">+ <tspan>Helpful</tspan>+ </text>+ <text x="935" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#E74C3C" text-anchor="middle">+ <tspan>Harmful</tspan>+ </text>++ <text x="30" y="290" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle" transform="rotate(-90, 30, 290)">+ <tspan>Internal</tspan>+ </text>+ <text x="30" y="530" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" font-weight="600" fill="#5D6D7E" text-anchor="middle" transform="rotate(-90, 30, 530)">+ <tspan>External</tspan>+ </text>++ <!-- S - Strengths (Top Left) -->+ <g id="strengths">+ <rect x="60" y="130" width="570" height="240" rx="12" fill="url(#strengthsGrad)"+ stroke="#4CAF50" stroke-width="3" filter="url(#cardShadow)"/>++ <rect x="60" y="130" width="570" height="50" rx="12" fill="#4CAF50"/>+ <rect x="60" y="168" width="570" height="12" fill="#4CAF50"/>+ <text x="90" y="163" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="28" font-weight="bold" fill="#FFFFFF">+ <tspan>S</tspan>+ </text>+ <text x="125" y="163" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF">+ <tspan>Strengths</tspan>+ </text>++ <circle cx="85" cy="210" r="6" fill="#4CAF50"/>+ <text x="100" y="215" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Strong R&D team, 200+ tech patents</tspan>+ </text>++ <circle cx="85" cy="245" r="6" fill="#4CAF50"/>+ <text x="100" y="250" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>High brand recognition, 85% customer loyalty</tspan>+ </text>++ <circle cx="85" cy="280" r="6" fill="#4CAF50"/>+ <text x="100" y="285" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Complete supply chain, 15% cost advantage</tspan>+ </text>++ <circle cx="85" cy="315" r="6" fill="#4CAF50"/>+ <text x="100" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Strong cash flow, stable financials</tspan>+ </text>++ <circle cx="85" cy="350" r="6" fill="#4CAF50"/>+ <text x="100" y="355" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Efficient management team, strong execution</tspan>+ </text>+ </g>++ <!-- W - Weaknesses (Top Right) -->+ <g id="weaknesses">+ <rect x="650" y="130" width="570" height="240" rx="12" fill="url(#weaknessesGrad)"+ stroke="#E74C3C" stroke-width="3" filter="url(#cardShadow)"/>++ <rect x="650" y="130" width="570" height="50" rx="12" fill="#E74C3C"/>+ <rect x="650" y="168" width="570" height="12" fill="#E74C3C"/>+ <text x="680" y="163" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="28" font-weight="bold" fill="#FFFFFF">+ <tspan>W</tspan>+ </text>+ <text x="720" y="163" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF">+ <tspan>Weaknesses</tspan>+ </text>++ <circle cx="675" cy="210" r="6" fill="#E74C3C"/>+ <text x="690" y="215" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Insufficient marketing investment</tspan>+ </text>++ <circle cx="675" cy="245" r="6" fill="#E74C3C"/>+ <text x="690" y="250" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Single product line, core product dependency</tspan>+ </text>++ <circle cx="675" cy="280" r="6" fill="#E74C3C"/>+ <text x="690" y="285" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Lack of overseas market experience</tspan>+ </text>++ <circle cx="675" cy="315" r="6" fill="#E74C3C"/>+ <text x="690" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>High talent turnover rate (12%)</tspan>+ </text>++ <circle cx="675" cy="350" r="6" fill="#E74C3C"/>+ <text x="690" y="355" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>After-sales response needs improvement</tspan>+ </text>+ </g>++ <!-- O - Opportunities (Bottom Left) -->+ <g id="opportunities">+ <rect x="60" y="390" width="570" height="240" rx="12" fill="url(#opportunitiesGrad)"+ stroke="#2196F3" stroke-width="3" filter="url(#cardShadow)"/>++ <rect x="60" y="390" width="570" height="50" rx="12" fill="#2196F3"/>+ <rect x="60" y="428" width="570" height="12" fill="#2196F3"/>+ <text x="90" y="423" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="28" font-weight="bold" fill="#FFFFFF">+ <tspan>O</tspan>+ </text>+ <text x="125" y="423" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF">+ <tspan>Opportunities</tspan>+ </text>++ <circle cx="85" cy="470" r="6" fill="#2196F3"/>+ <text x="100" y="475" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>AI industry growing at 25% CAGR</tspan>+ </text>++ <circle cx="85" cy="505" r="6" fill="#2196F3"/>+ <text x="100" y="510" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Increased policy support and subsidies</tspan>+ </text>++ <circle cx="85" cy="540" r="6" fill="#2196F3"/>+ <text x="100" y="545" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Strong demand in emerging markets (SEA)</tspan>+ </text>++ <circle cx="85" cy="575" r="6" fill="#2196F3"/>+ <text x="100" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Competitors repositioning, market share available</tspan>+ </text>++ <circle cx="85" cy="610" r="6" fill="#2196F3"/>+ <text x="100" y="615" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Digital transformation driving enterprise demand</tspan>+ </text>+ </g>++ <!-- T - Threats (Bottom Right) -->+ <g id="threats">+ <rect x="650" y="390" width="570" height="240" rx="12" fill="url(#threatsGrad)"+ stroke="#FF9800" stroke-width="3" filter="url(#cardShadow)"/>++ <rect x="650" y="390" width="570" height="50" rx="12" fill="#FF9800"/>+ <rect x="650" y="428" width="570" height="12" fill="#FF9800"/>+ <text x="680" y="423" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="28" font-weight="bold" fill="#FFFFFF">+ <tspan>T</tspan>+ </text>+ <text x="715" y="423" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF">+ <tspan>Threats</tspan>+ </text>++ <circle cx="675" cy="470" r="6" fill="#FF9800"/>+ <text x="690" y="475" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Intensified competition, giants entering market</tspan>+ </text>++ <circle cx="675" cy="505" r="6" fill="#FF9800"/>+ <text x="690" y="510" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Rapid technology iterations, R&D pressure</tspan>+ </text>++ <circle cx="675" cy="540" r="6" fill="#FF9800"/>+ <text x="690" y="545" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Rising raw material costs, margin squeeze</tspan>+ </text>++ <circle cx="675" cy="575" r="6" fill="#FF9800"/>+ <text x="690" y="580" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Stricter regulations, compliance costs rising</tspan>+ </text>++ <circle cx="675" cy="610" r="6" fill="#FF9800"/>+ <text x="690" y="615" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" fill="#2C3E50">+ <tspan>Economic uncertainty, client budgets tightening</tspan>+ </text>+ </g>++ <!-- Center logo -->+ <circle cx="640" cy="370" r="40" fill="#2C3E50" filter="url(#cardShadow)"/>+ <text x="640" y="365" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle">+ <tspan>SWOT</tspan>+ </text>+ <text x="640" y="385" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#FFFFFF" text-anchor="middle">+ <tspan>Analysis</tspan>+ </text>++ <text x="640" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="middle">+ <tspan>Data Source: Strategic Planning Department - 2025 Annual Strategic Analysis Report</tspan>+ </text>+</svg>diff --git a/templates/charts/test_process_flow.html b/templates/charts/test_process_flow.htmldeleted file mode 100644index ca7125de..00000000--- a/templates/charts/test_process_flow.html+++ /dev/null@@ -1,89 +0,0 @@-<!DOCTYPE html>-<html lang="zh-CN">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>流程图测试</title>- <style>- body {- margin: 0;- padding: 20px;- background: #f5f5f5;- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;- }- .container {- max-width: 1400px;- margin: 0 auto;- background: white;- padding: 20px;- border-radius: 8px;- box-shadow: 0 2px 10px rgba(0,0,0,0.1);- }- h1 {- color: #333;- margin-bottom: 20px;- }- .svg-wrapper {- border: 1px solid #ddd;- border-radius: 4px;- overflow: hidden;- }- .info {- margin-top: 20px;- padding: 15px;- background: #e3f2fd;- border-left: 4px solid #2196F3;- border-radius: 4px;- }- .info h3 {- margin: 0 0 10px 0;- color: #1976D2;- }- .info ul {- margin: 0;- padding-left: 20px;- }- .info li {- margin: 5px 0;- color: #555;- }- </style>-</head>-<body>- <div class="container">- <h1>流程图显示测试</h1>-- <div class="svg-wrapper">- <object type="image/svg+xml" data="process_flow.svg" width="100%" height="auto">- 您的浏览器不支持 SVG- </object>- </div>-- <div class="info">- <h3>✅ 修复说明</h3>- <ul>- <li><strong>回环路径</strong>:从"重新评估"节点左侧出发 → 向左绕过 → 向上 → 向右 → 连接到"需求收集"节点底部中心</li>- <li><strong>"是"标签</strong>:上移至 y=185,避免与箭头重叠</li>- <li><strong>颜色方案</strong>:- <ul>- <li>蓝色:正常流程步骤</li>- <li>橙色:决策节点和异常流程</li>- <li>绿色:完成节点</li>- </ul>- </li>- <li><strong>箭头标签</strong>:是 Yes (绿色)、否 No (红色)、重新收集需求 (橙色)</li>- </ul>- </div>-- <div class="info" style="background: #fff3e0; border-left-color: #FF9800; margin-top: 10px;">- <h3 style="color: #F57C00;">🔧 如果看到黑色元素</h3>- <ul>- <li>请尝试 <strong>强制刷新</strong>:Ctrl+Shift+R (Windows) 或 Cmd+Shift+R (Mac)</li>- <li>或清除浏览器缓存后重新加载</li>- <li>确认在支持 SVG 的现代浏览器中查看(Chrome、Firefox、Safari、Edge)</li>- </ul>- </div>- </div>-</body>-</html>-diff --git a/templates/charts/treemap_chart.svg b/templates/charts/treemap_chart.svgnew file mode 100644index 00000000..c76fd8c6--- /dev/null+++ b/templates/charts/treemap_chart.svg@@ -0,0 +1,226 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 矩形树图模板+ 用途: 层级数据占比可视化+ 适用场景: 磁盘空间分析、预算分配、市场份额、组织结构+ 支持: 多层级矩形嵌套+ -->++ <defs>+ <!-- 阴影 -->+ <filter id="treemapShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.15"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>年度预算分配总览</tspan>+ </text>++ <text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2025年度预算 · 总额 1,200万元 · 面积代表预算占比</tspan>+ </text>++ <!-- 矩形树图区域 -->+ <g id="treemapArea" transform="translate(60, 120)">+ <!--+ 总面积: 1000×480++ 主要分类及占比:+ 1. 人力成本 40% (400×480 左侧)+ 2. 运营成本 25% (右上 600×200)+ 3. 营销费用 20% (右中 600×160)+ 4. 研发投入 10% (右下左 300×120)+ 5. 其他支出 5% (右下右 300×120)+ -->++ <!-- 1. 人力成本 40% - 蓝色系 -->+ <g id="hr_cost">+ <rect x="0" y="0" width="400" height="480" rx="6" fill="#1976D2" filter="url(#treemapShadow)"/>++ <!-- 子分类 -->+ <!-- 1.1 薪资福利 70% of 40% = 28% (400×336) -->+ <rect x="4" y="4" width="392" height="328" rx="4" fill="#2196F3"/>+ <text x="200" y="140" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>薪资福利</tspan></text>+ <text x="200" y="170" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="32" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>336万</tspan></text>+ <text x="200" y="200" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" fill="#BBDEFB" text-anchor="middle"><tspan>28%</tspan></text>++ <!-- 1.2 培训发展 15% of 40% = 6% (200×144) -->+ <rect x="4" y="336" width="194" height="140" rx="4" fill="#42A5F5"/>+ <text x="101" y="395" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>培训发展</tspan></text>+ <text x="101" y="420" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>72万</tspan></text>+ <text x="101" y="442" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#BBDEFB" text-anchor="middle"><tspan>6%</tspan></text>++ <!-- 1.3 招聘成本 15% of 40% = 6% (200×144) -->+ <rect x="202" y="336" width="194" height="140" rx="4" fill="#64B5F6"/>+ <text x="299" y="395" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>招聘成本</tspan></text>+ <text x="299" y="420" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="18" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>72万</tspan></text>+ <text x="299" y="442" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#BBDEFB" text-anchor="middle"><tspan>6%</tspan></text>++ <!-- 人力成本总标签 -->+ <text x="200" y="30" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#BBDEFB" text-anchor="middle"><tspan>人力成本 480万 (40%)</tspan></text>+ </g>++ <!-- 2. 运营成本 25% - 绿色系 -->+ <g id="operation_cost">+ <rect x="404" y="0" width="596" height="200" rx="6" fill="#388E3C" filter="url(#treemapShadow)"/>++ <!-- 2.1 办公场地 50% of 25% = 12.5% -->+ <rect x="408" y="4" width="290" height="192" rx="4" fill="#4CAF50"/>+ <text x="553" y="85" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>办公场地</tspan></text>+ <text x="553" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>150万</tspan></text>+ <text x="553" y="140" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#C8E6C9" text-anchor="middle"><tspan>12.5%</tspan></text>++ <!-- 2.2 设备采购 30% of 25% = 7.5% -->+ <rect x="702" y="4" width="175" height="192" rx="4" fill="#66BB6A"/>+ <text x="790" y="85" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>设备采购</tspan></text>+ <text x="790" y="112" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>90万</tspan></text>+ <text x="790" y="135" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#C8E6C9" text-anchor="middle"><tspan>7.5%</tspan></text>++ <!-- 2.3 日常运营 20% of 25% = 5% -->+ <rect x="881" y="4" width="115" height="192" rx="4" fill="#81C784"/>+ <text x="939" y="80" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>日常</tspan></text>+ <text x="939" y="97" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>运营</tspan></text>+ <text x="939" y="125" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>60万</tspan></text>+ <text x="939" y="145" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="12" fill="#C8E6C9" text-anchor="middle"><tspan>5%</tspan></text>+ </g>++ <!-- 3. 营销费用 20% - 橙色系 -->+ <g id="marketing_cost">+ <rect x="404" y="204" width="596" height="156" rx="6" fill="#F57C00" filter="url(#treemapShadow)"/>++ <!-- 3.1 广告投放 60% of 20% = 12% -->+ <rect x="408" y="208" width="350" height="148" rx="4" fill="#FF9800"/>+ <text x="583" y="270" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>广告投放</tspan></text>+ <text x="583" y="300" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="22" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>144万</tspan></text>+ <text x="583" y="325" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#FFE0B2" text-anchor="middle"><tspan>12%</tspan></text>++ <!-- 3.2 品牌活动 40% of 20% = 8% -->+ <rect x="762" y="208" width="234" height="148" rx="4" fill="#FFB74D"/>+ <text x="879" y="270" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#E65100" text-anchor="middle"><tspan>品牌活动</tspan></text>+ <text x="879" y="298" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="20" font-weight="bold" fill="#E65100" text-anchor="middle"><tspan>96万</tspan></text>+ <text x="879" y="322" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="13" fill="#E65100" text-anchor="middle"><tspan>8%</tspan></text>+ </g>++ <!-- 4. 研发投入 10% - 紫色系 -->+ <g id="rd_cost">+ <rect x="404" y="364" width="296" height="116" rx="6" fill="#7B1FA2" filter="url(#treemapShadow)"/>++ <rect x="408" y="368" width="288" height="108" rx="4" fill="#9C27B0"/>+ <text x="552" y="410" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>研发投入</tspan></text>+ <text x="552" y="440" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>120万</tspan></text>+ <text x="552" y="465" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#E1BEE7" text-anchor="middle"><tspan>10%</tspan></text>+ </g>++ <!-- 5. 其他支出 5% - 灰色系 -->+ <g id="other_cost">+ <rect x="704" y="364" width="296" height="116" rx="6" fill="#455A64" filter="url(#treemapShadow)"/>++ <rect x="708" y="368" width="288" height="108" rx="4" fill="#607D8B"/>+ <text x="852" y="410" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="16" font-weight="600" fill="#FFFFFF" text-anchor="middle"><tspan>其他支出</tspan></text>+ <text x="852" y="440" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="24" font-weight="bold" fill="#FFFFFF" text-anchor="middle"><tspan>60万</tspan></text>+ <text x="852" y="465" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#B0BEC5" text-anchor="middle"><tspan>5%</tspan></text>+ </g>+ </g>++ <!-- 图例 -->+ <g id="legend" transform="translate(1080, 130)">+ <rect x="0" y="0" width="160" height="240" rx="8" fill="#F8F9FA" stroke="#E0E0E0" stroke-width="1"/>++ <text x="80" y="28" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" font-weight="600" fill="#2C3E50" text-anchor="middle"><tspan>预算分类</tspan></text>++ <line x1="15" y1="42" x2="145" y2="42" stroke="#E0E0E0" stroke-width="1"/>++ <rect x="20" y="55" width="20" height="20" rx="3" fill="#2196F3"/>+ <text x="50" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>人力成本 40%</tspan></text>++ <rect x="20" y="85" width="20" height="20" rx="3" fill="#4CAF50"/>+ <text x="50" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>运营成本 25%</tspan></text>++ <rect x="20" y="115" width="20" height="20" rx="3" fill="#FF9800"/>+ <text x="50" y="130" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>营销费用 20%</tspan></text>++ <rect x="20" y="145" width="20" height="20" rx="3" fill="#9C27B0"/>+ <text x="50" y="160" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>研发投入 10%</tspan></text>++ <rect x="20" y="175" width="20" height="20" rx="3" fill="#607D8B"/>+ <text x="50" y="190" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E"><tspan>其他支出 5%</tspan></text>++ <line x1="15" y1="208" x2="145" y2="208" stroke="#E0E0E0" stroke-width="1"/>++ <text x="20" y="228" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" fill="#7F8C8D"><tspan>总预算: 1,200万</tspan></text>+ </g>++ <!-- 说明 -->+ <g id="note" transform="translate(1080, 390)">+ <rect x="0" y="0" width="160" height="80" rx="8" fill="#E3F2FD" stroke="#2196F3" stroke-width="1"/>+ <text x="15" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="12" font-weight="600" fill="#1976D2"><tspan>📊 图表说明</tspan></text>+ <text x="15" y="45" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>矩形面积代表预算</tspan></text>+ <text x="15" y="62" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>占比大小,颜色区</tspan></text>+ <text x="15" y="75" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="11" fill="#5D6D7E"><tspan>分不同预算类别</tspan></text>+ </g>++ <!-- 数据来源 -->+ <text x="60" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6">+ <tspan>数据来源: 财务部门年度预算报告</tspan>+ </text>+</svg>+diff --git a/templates/charts/waterfall_chart.svg b/templates/charts/waterfall_chart.svgnew file mode 100644index 00000000..06fe0e27--- /dev/null+++ b/templates/charts/waterfall_chart.svg@@ -0,0 +1,265 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">+ <!--+ 瀑布图模板+ 用途: 增减变化分析、财务分解+ 适用场景: 利润分解、预算变化、成本分析、收入构成+ 支持: 起始值 + 6个变化项 + 结束值+ -->++ <defs>+ <!-- 增加项渐变(绿色) -->+ <linearGradient id="increaseGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#4CAF50;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#388E3C;stop-opacity:1" />+ </linearGradient>++ <!-- 减少项渐变(红色) -->+ <linearGradient id="decreaseGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#EF5350;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#D32F2F;stop-opacity:1" />+ </linearGradient>++ <!-- 总计项渐变(蓝色) -->+ <linearGradient id="totalGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#2196F3;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#1976D2;stop-opacity:1" />+ </linearGradient>++ <!-- 阴影 -->+ <filter id="barShadow">+ <feGaussianBlur in="SourceAlpha" stdDeviation="2"/>+ <feOffset dx="0" dy="1"/>+ <feComponentTransfer>+ <feFuncA type="linear" slope="0.25"/>+ </feComponentTransfer>+ <feMerge>+ <feMergeNode/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- 背景 -->+ <rect width="1280" height="720" fill="#FFFFFF"/>++ <!-- 标题 -->+ <text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="32" font-weight="bold" fill="#2C3E50">+ <tspan>年度利润变化分析</tspan>+ </text>++ <text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="18" fill="#7F8C8D">+ <tspan>2024年 vs 2025年 · 单位:百万元</tspan>+ </text>++ <!-- 图例 -->+ <g id="legend" transform="translate(880, 70)">+ <rect x="0" y="0" width="20" height="20" rx="3" fill="url(#totalGrad)"/>+ <text x="28" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>起止值</tspan>+ </text>++ <rect x="100" y="0" width="20" height="20" rx="3" fill="url(#increaseGrad)"/>+ <text x="128" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>增加</tspan>+ </text>++ <rect x="190" y="0" width="20" height="20" rx="3" fill="url(#decreaseGrad)"/>+ <text x="218" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E">+ <tspan>减少</tspan>+ </text>+ </g>++ <!-- 图表区域 -->+ <g id="chartArea">+ <!-- Y轴网格线 -->+ <line x1="140" y1="560" x2="1200" y2="560" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="480" x2="1200" y2="480" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="400" x2="1200" y2="400" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="320" x2="1200" y2="320" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="240" x2="1200" y2="240" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>+ <line x1="140" y1="160" x2="1200" y2="160" stroke="#E0E0E0" stroke-width="1" stroke-dasharray="4,4"/>++ <!-- Y轴刻度标签 -->+ <text x="125" y="565" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>0</tspan></text>+ <text x="125" y="485" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>100</tspan></text>+ <text x="125" y="405" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>200</tspan></text>+ <text x="125" y="325" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>300</tspan></text>+ <text x="125" y="245" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>400</tspan></text>+ <text x="125" y="165" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="14" fill="#7F8C8D" text-anchor="end"><tspan>500</tspan></text>++ <!-- 坐标轴 -->+ <line x1="140" y1="130" x2="140" y2="560" stroke="#95A5A6" stroke-width="2"/>+ <line x1="140" y1="560" x2="1200" y2="560" stroke="#95A5A6" stroke-width="2"/>++ <!--+ 数据说明:+ - 2024年利润: 280M (起始)+ - 营收增长: +120M+ - 新产品: +65M+ - 原材料涨价: -45M+ - 人力成本: -35M+ - 营销投入: -25M+ - 运营优化: +40M+ - 2025年利润: 400M (结束)++ 每100M = 80px+ 柱宽: 90px, 间距: 40px+ -->++ <!-- 柱1: 2024年利润 280M(起始值,从0开始) -->+ <rect x="175" y="336" width="90" height="224" rx="4" fill="url(#totalGrad)" filter="url(#barShadow)"/>+ <text x="220" y="320" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>280</tspan>+ </text>+ <text x="220" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>2024年</tspan>+ </text>+ <text x="220" y="618" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>利润</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="265" y1="336" x2="305" y2="336" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱2: 营收增长 +120M(从280开始向上) -->+ <rect x="305" y="240" width="90" height="96" rx="4" fill="url(#increaseGrad)" filter="url(#barShadow)"/>+ <text x="350" y="225" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#4CAF50" text-anchor="middle">+ <tspan>+120</tspan>+ </text>+ <text x="350" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>营收增长</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="395" y1="240" x2="435" y2="240" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱3: 新产品 +65M(从400开始向上) -->+ <rect x="435" y="188" width="90" height="52" rx="4" fill="url(#increaseGrad)" filter="url(#barShadow)"/>+ <text x="480" y="173" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#4CAF50" text-anchor="middle">+ <tspan>+65</tspan>+ </text>+ <text x="480" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>新产品</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="525" y1="188" x2="565" y2="188" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱4: 原材料涨价 -45M(从465开始向下) -->+ <rect x="565" y="188" width="90" height="36" rx="4" fill="url(#decreaseGrad)" filter="url(#barShadow)"/>+ <text x="610" y="240" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#EF5350" text-anchor="middle">+ <tspan>-45</tspan>+ </text>+ <text x="610" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>原材料</tspan>+ </text>+ <text x="610" y="618" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>涨价</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="655" y1="224" x2="695" y2="224" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱5: 人力成本 -35M(从420开始向下) -->+ <rect x="695" y="224" width="90" height="28" rx="4" fill="url(#decreaseGrad)" filter="url(#barShadow)"/>+ <text x="740" y="268" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#EF5350" text-anchor="middle">+ <tspan>-35</tspan>+ </text>+ <text x="740" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>人力成本</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="785" y1="252" x2="825" y2="252" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱6: 营销投入 -25M(从385开始向下) -->+ <rect x="825" y="252" width="90" height="20" rx="4" fill="url(#decreaseGrad)" filter="url(#barShadow)"/>+ <text x="870" y="288" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#EF5350" text-anchor="middle">+ <tspan>-25</tspan>+ </text>+ <text x="870" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>营销投入</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="915" y1="272" x2="955" y2="272" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱7: 运营优化 +40M(从360开始向上) -->+ <rect x="955" y="240" width="90" height="32" rx="4" fill="url(#increaseGrad)" filter="url(#barShadow)"/>+ <text x="1000" y="225" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="15" font-weight="600" fill="#4CAF50" text-anchor="middle">+ <tspan>+40</tspan>+ </text>+ <text x="1000" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>运营优化</tspan>+ </text>++ <!-- 连接线 -->+ <line x1="1045" y1="240" x2="1085" y2="240" stroke="#BDC3C7" stroke-width="1.5" stroke-dasharray="4,2"/>++ <!-- 柱8: 2025年利润 400M(结束值,从0开始) -->+ <rect x="1085" y="240" width="90" height="320" rx="4" fill="url(#totalGrad)" filter="url(#barShadow)"/>+ <text x="1130" y="225" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="600" fill="#2C3E50" text-anchor="middle">+ <tspan>400</tspan>+ </text>+ <text x="1130" y="600" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>2025年</tspan>+ </text>+ <text x="1130" y="618" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#5D6D7E" text-anchor="middle">+ <tspan>利润</tspan>+ </text>+ </g>++ <!-- 总结卡片 -->+ <g id="summaryCard" transform="translate(60, 640)">+ <rect x="0" y="0" width="500" height="50" rx="8" fill="#E8F5E9" stroke="#4CAF50" stroke-width="1"/>+ <text x="20" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#388E3C">+ <tspan>📈 年度利润增长:</tspan>+ </text>+ <text x="150" y="22" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"+ font-size="16" font-weight="bold" fill="#2E7D32">+ <tspan>+120M (+42.9%)</tspan>+ </text>+ <text x="20" y="40" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="13" fill="#5D6D7E">+ <tspan>增加项合计: +225M | 减少项合计: -105M | 净增长: +120M</tspan>+ </text>+ </g>++ <!-- 数据来源 -->+ <text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"+ font-size="14" fill="#95A5A6" text-anchor="end">+ <tspan>数据来源: 财务部门</tspan>+ </text>+</svg>+