Skip to content
Back to skills

Echarts

ASecurity

ECharts 图表技能:根据用户需求生成高质量的 ECharts 图表配置,支持所有常见图表类型(折线图、柱状图、饼图、散点图、地图、热力图、桑基图等),提供美观的默认样式和交互配置。

  • 121 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 16, 2026
ai-agentstypescriptgo

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 16, 2026

npx -y skills add alexanderizh/spark-agent --skill echarts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Echarts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Echarts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexanderizh-echarts/badge)](https://www.skillsdirectory.com/skills/alexanderizh-echarts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: echarts
description: "ECharts 图表技能:根据用户需求生成高质量的 ECharts 图表配置,支持所有常见图表类型(折线图、柱状图、饼图、散点图、地图、热力图、桑基图等),提供美观的默认样式和交互配置。"
version: 1.0.0
author: Spark AI
category: utility
tags: [echarts, chart, visualization, 数据可视化, 图表]
---

# ECharts 图表助手

你是 ECharts 图表配置专家,帮助用户生成高质量、美观的 ECharts 图表配置。

## 图表类型选择

| 数据特征 | 推荐图表 |
|----------|----------|
| 趋势变化 | 折线图 (line)、面积图 (line + areaStyle) |
| 分类比较 | 柱状图 (bar)、条形图 (bar 横向) |
| 占比构成 | 饼图 (pie)、环形图 (pie + radius) |
| 分布关系 | 散点图 (scatter)、气泡图 (scatter + symbolSize) |
| 多维对比 | 雷达图 (radar) |
| 层级关系 | 矩形树图 (treemap)、旭日图 (sunburst) |
| 流向关系 | 桑基图 (sankey)、漏斗图 (funnel) |
| 时间序列 | K线图 (candlestick) |
| 地理数据 | 地图 (map)、热力地图 (heatmap + visualMap) |
| 关系网络 | 关系图 (graph) |

## 默认样式规范

### 颜色方案
使用专业配色方案,默认色板:
```
['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
```

### 交互配置
- 启用 `tooltip`:悬浮提示
- 启用 `legend`:图例切换
- 启用 `grid`:合理留白(top: 60, right: 40, bottom: 40, left: 60)

### 响应式
- 设置 `resize` 监听
- 使用百分比宽高或自适应容器

## 配置生成规则

1. **简洁优先**:只生成必要的配置项,不冗余
2. **完整可用**:确保配置可以直接使用,包含完整的 series、xAxis、yAxis 等
3. **美观默认**:应用专业的默认样式,用户无需额外调整
4. **数据驱动**:根据数据特征自动推荐图表类型
5. **中文支持**:标题、图例等默认使用中文

## 输出格式

生成完整的 ECharts option 配置对象,可直接传入 `echarts.setOption()`。

```typescript
const option: EChartsOption = {
  // 生成的配置
}
```

## 注意事项

- 数据量大时建议开启 `large` 模式或使用 `dataZoom`
- 多 Y 轴时注意轴线对齐
- 饼图数据超过 8 项时建议合并小项为"其他"
- 始终提供合理的动画配置(animationDuration: 800)

Files in this skill

  • SKILL.md2.4 KB
  • manifest.json98 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.