Chart element recognition

From aifinlab/FinClaw · View interactive version

Chart element recognition is an AI agent skill from the GitHub repository aifinlab/FinClaw. 用于图表理解的图表元素识别原子 skill,适用于通用行业文档解析场景。

How to use this skill

Skill file

图表元素识别 Skill

数据来源

本 Skill 支持多种图表输入格式,核心数据来源包括:

1. 图表文件类型

2. 图表类型

3. 图表特征

4. 数据格式要求

说明:本 Skill 不包含图表采集功能,需要用户提供图表文件。建议图表清晰且格式规范,以便进行准确的元素识别。


功能

本 Skill 提供全面的图表元素识别能力,涵盖多种识别功能:

1. 图表类型识别

2. 坐标轴识别

3. 数据系列识别

4. 文本信息提取

5. 数据值提取

6. 高级处理功能


使用示例

输出示例

{
  "chart_info": {
    "filename": "sales_chart.png",
    "file_size": 256000,
    "format": "png",
    "dimensions": [800, 600]
  },
  "chart_type": {
    "primary_type": "bar_chart",
    "sub_type": "grouped_bar_chart",
    "confidence": 0.95
  },
  "axes": {
    "x_axis": {
      "label": "季度",
      "type": "categorical",
      "categories": ["Q1", "Q2", "Q3", "Q4"],
      "unit": null
    },
    "y_axis": {
      "label": "销售额",
      "type": "numerical",
      "range": [0, 1000],
      "unit": "万元"
    }
  },
  "data_series": [
    {
      "series_name": "产品A",
      "series_type": "bar",
      "data_points": [
        {"x": "Q1", "y": 200},
        {"x": "Q2", "y": 250},
        {"x": "Q3", "y": 300},
        {"x": "Q4", "y": 280}
      ],
      "color": "#FF5733"
    },
    {
      "series_name": "产品B",
      "series_type": "bar",
      "data_points": [
        {"x": "Q1", "y": 150},
        {"x": "Q2", "y": 180},
        {"x": "Q3", "y": 220},
        {"x": "Q4", "y": 250}
      ],
      "color": "#33C3F0"
    }
  ],
  "text_elements": {
    "title": "2024年季度销售额对比",
    "subtitle": null,
    "legend": ["产品A", "产品B"],
    "annotations": []
  },
  "extracted_data": {
    "raw_data": [
      {"季度": "Q1", "产品A": 200, "产品B": 150},
      {"季度": "Q2", "产品A": 250, "产品B": 180},
      {"季度": "Q3", "产品A": 300, "产品B": 220},
      {"季度": "Q4", "产品A": 280, "产品B": 250}
    ],
    "data_format": "table"
  },
  "analysis": {
    "trend": "increasing",
    "key_insights": ["产品A销售额持续增长", "Q3达到峰值"],
    "description": "该图表展示了2024年四个季度产品A和产品B的销售额对比情况,整体呈现上升趋势。"
  }
}

注意事项与限制

1. 图表质量要求

2. 图表类型支持

3. 数据提取准确性

4. 语言和文字

5. 使用限制


参考资料

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.