lime-echart

$npx mdskill add partme-ai/full-stack-skills/lime-echart

Integrates Apache ECharts into UniApp projects for cross-platform data visualization across H5, mini-programs, and native apps.

  • Helps developers create interactive charts like line, bar, and pie for mobile and web environments.
  • Depends on Apache ECharts and supports UniApp and UniAppX frameworks.
  • Recommends chart types based on user requirements and provides example files for customization.
  • Delivers results through Vue components with configurable options, themes, and event handling.

SKILL.md

.github/skills/lime-echartView on GitHub ↗
---
name: lime-echart
description: "Integrates Apache ECharts into UniApp and UniAppX projects for cross-platform data visualization (H5, mini-programs, native App). Supports line, bar, pie, scatter, radar, gauge, funnel, heatmap, and more chart types. Use when the user needs to create ECharts charts in UniApp/UniAppX or configure interactive data visualizations for mobile and web."
license: Complete terms in LICENSE.txt
---

## When to use this skill

Use this skill whenever the user wants to:
- Create ECharts charts (line, bar, pie, scatter, radar, gauge, etc.) in UniApp or UniAppX
- Display data visualizations in H5, mini-programs, or native App
- Handle chart events, dynamic data updates, or custom themes in UniApp
- Optimize chart performance for mobile environments

## How to use this skill

### Workflow

1. **Install** lime-echart - Load `examples/getting-started/installation.md`
2. **Choose chart type** - Match the requirement to the chart type below
3. **Load the example file** - Each chart type has a dedicated example in `examples/charts/`
4. **Customize** - Adjust options, theme, and data binding per the API docs

### Quick-Start Example: Line Chart in UniApp

```vue
<template>
  <view class="chart-container">
    <l-echart ref="chartRef" @bindinit="onInit" />
  </view>
</template>

<script>
import * as echarts from '@nicefan/lime-echart/echarts';

export default {
  methods: {
    onInit(chart) {
      chart.setOption({
        xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] },
        yAxis: { type: 'value' },
        series: [{
          type: 'line',
          data: [120, 200, 150, 80, 270],
          smooth: true,
          lineStyle: { color: '#5470c6' }
        }]
      });
    }
  }
};
</script>

<style>
.chart-container { width: 100%; height: 300px; }
</style>
```

### Chart Type Reference

| Chart | File | Use Case |
|-------|------|----------|
| Line | `examples/charts/line-chart.md` | Trends over time |
| Bar | `examples/charts/bar-chart.md` | Category comparison |
| Pie | `examples/charts/pie-chart.md` | Proportions |
| Scatter | `examples/charts/scatter-chart.md` | Correlation |
| Radar | `examples/charts/radar-chart.md` | Multi-dimension comparison |
| Gauge | `examples/charts/gauge-chart.md` | Single metric display |

### API Reference

- `api/component-api.md` - Component properties and attributes
- `api/methods-api.md` - Chart manipulation methods
- `api/events-api.md` - Event handling (click, hover, zoom)
- `api/options-api.md` - Full ECharts options reference

## Best Practices

1. **Dispose on unmount** - Call `chart.dispose()` in `onUnload` to prevent memory leaks
2. **Lazy load charts** - Initialize charts only when they scroll into view
3. **Test cross-platform** - Verify on H5, WeChat mini-program, and native App
4. **Optimize data volume** - Downsample large datasets before rendering on mobile
5. **Use CSS sizing** - Set chart container dimensions via CSS, not inline styles

## Resources

- **Official Plugin**: https://ext.dcloud.net.cn/plugin?id=4899
- **ECharts Docs**: https://echarts.apache.org/

## Keywords

lime-echart, echarts, uniapp, uniappx, chart, visualization, 图表, 折线图, 柱状图, 饼图, data visualization, mobile chart

More from partme-ai/full-stack-skills

SkillDescription
adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."