feat: 替换 compare-tablelist-grid 并新增 compare-binary 示例

This commit is contained in:
fujie
2025-12-28 20:46:03 +08:00
parent 2f27267b42
commit 9ee3d495b6
2 changed files with 48 additions and 6 deletions

View File

@@ -60,8 +60,8 @@ Infographic syntax is a Mermaid-like declarative syntax for describing infograph
#### 3. Comparison & Analysis
- **Binary Comparison (A vs B)** -> `compare-binary`
- **SWOT Analysis** -> `compare-swot`
- **Multi-item Comparison Table** -> `compare-table`
- **Quadrant Analysis (Importance vs Urgency)** -> `quadrant-quarter`
- **Multi-item Grid Comparison** -> `list-grid` (use for comparing multiple items)
#### 4. Charts & Data (Metric-heavy)
- **Key Metrics / Data Cards** -> `statistic-card`
@@ -111,6 +111,26 @@ data
- label Mar
value 1800
#### Comparison (Binary Comparison)
infographic compare-binary
data
title Advantages vs Disadvantages
desc Compare two aspects side by side
items
- label Advantages
children
- label Strong R&D
desc Leading technology and innovation capability
- label High customer loyalty
desc Repurchase rate over 60%
- label Disadvantages
children
- label Weak brand exposure
desc Insufficient marketing, low awareness
- label Narrow channel coverage
desc Limited online channels
#### Comparison (SWOT)
infographic compare-swot
data
@@ -514,7 +534,6 @@ SCRIPT_TEMPLATE_INFOGRAPHIC = """
// 对比与分析
'compare-binary': 'compare-binary-horizontal-simple-vs',
'compare-swot': 'compare-swot',
'compare-table': 'compare-table-simple', // 暂无直接对应
'quadrant-quarter': 'quadrant-quarter-simple-card',
// 图表与数据