ucharts
Original:🇺🇸 English
Not Translated
Provides comprehensive guidance for uCharts chart library including chart types, data formats, chart configuration, and platform support. Use when the user asks about uCharts, needs to create charts, configure chart options, or work with uCharts in applications.
1installs
Added on
NPX Install
npx skill4agent add teachingai/full-stack-skills uchartsSKILL.md Content
When to use this skill
Use this skill whenever the user wants to:
- Install and set up uCharts in a project
- Create charts in uni-app applications
- Use uCharts in WeChat Mini Program
- Use uCharts in H5 applications
- Configure chart options
- Use different chart types
- Handle chart events
- Customize chart appearance
- Understand uCharts API and methods
- Troubleshoot uCharts issues
How to use this skill
This skill is organized to match the uCharts official documentation structure (https://www.ucharts.cn/v2/#/, https://www.ucharts.cn/v2/#/guide/index, https://www.ucharts.cn/v2/#/document/index). When working with uCharts:
-
Identify the topic from the user's request:
- Installation/安装 →
examples/guide/installation.md - Quick Start/快速开始 →
examples/guide/quick-start.md - Chart Types/图表类型 →
examples/charts/ - Features/功能特性 →
examples/features/ - API/API 文档 →
api/
- Installation/安装 →
-
Load the appropriate example file from thedirectory:
examples/Guide (使用指南):- - Introduction to uCharts
examples/guide/intro.md - - Installation guide
examples/guide/installation.md - - Quick start guide
examples/guide/quick-start.md - - Configuration
examples/guide/configuration.md - - Platform support
examples/guide/platform-support.md
Charts (图表类型):- - Line chart
examples/charts/line.md - - Column chart
examples/charts/column.md - - Area chart
examples/charts/area.md - - Pie chart
examples/charts/pie.md - - Ring chart
examples/charts/ring.md - - Radar chart
examples/charts/radar.md - - Funnel chart
examples/charts/funnel.md - - Gauge chart
examples/charts/gauge.md - - Candle chart
examples/charts/candle.md - - Mixed chart
examples/charts/mix.md
Features (功能特性):- - Data format
examples/features/data-format.md - - Chart events
examples/features/chart-events.md - - Chart methods
examples/features/chart-methods.md - - Chart update
examples/features/chart-update.md - - Chart customization
examples/features/chart-customization.md
-
Follow the specific instructions in that example file for syntax, structure, and best practicesImportant Notes:
- uCharts supports multiple platforms (uni-app, WeChat Mini Program, H5, APP)
- Charts use canvas for rendering
- Configuration through options object
- Each example file includes key concepts, code examples, and key points
-
Reference API documentation in thedirectory when needed:
api/- - Chart component API
api/chart-api.md - - Options API
api/options-api.md - - Data API
api/data-api.md - - Events API
api/events-api.md - - Methods API
api/methods-api.md
-
Use templates from thedirectory:
templates/- - Installation templates
templates/installation.md - - Basic chart templates
templates/basic-chart.md - - Configuration templates
templates/configuration.md
1. Understanding uCharts
uCharts is a high-performance cross-platform charting library that supports uni-app, WeChat Mini Program, H5, APP and more.
Key Concepts:
- Chart Component: Main chart component
- Options: Chart configuration options
- Data: Chart data format
- Events: Chart events
- Methods: Chart methods
- Platform Support: Multi-platform compatibility
2. Installation
Using npm:
bash
npm install @qiun/uchartsUsing yarn:
bash
yarn add @qiun/uchartsUsing pnpm:
bash
pnpm add @qiun/ucharts3. Basic Setup
vue
<template>
<qiun-data-chart type="line" :chartData="chartData" :opts="opts" />
</template>
<script>
export default {
data() {
return {
chartData: {
categories: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
series: [
{
name: 'Sales',
data: [35, 36, 31, 33, 13]
}
]
},
opts: {}
}
}
}
</script>Doc mapping (one-to-one with official documentation)
- or
examples/guide/→ https://www.ucharts.cn/v2/#/guide/indexexamples/getting-started/ - → https://www.ucharts.cn/v2/#/document/index
examples/
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the directory (see mapping above).
examples/To use examples:
- Identify the topic from the user's request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in directory for common scaffolding
templates/ - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the directory, organized to match the official uCharts API documentation structure (https://www.ucharts.cn/v2/#/document/index):
api/Chart Component API (api/chart-api.md
)
api/chart-api.md- Chart component props
- Chart component events
- Chart component methods
Options API (api/options-api.md
)
api/options-api.md- Chart options configuration
- Option properties
- Option methods
Data API (api/data-api.md
)
api/data-api.md- Data format
- Data structure
- Data transformation
Events API (api/events-api.md
)
api/events-api.md- Chart events
- Event handlers
- Event parameters
Methods API (api/methods-api.md
)
api/methods-api.md- Chart methods
- Method parameters
- Method return values
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the directory
api/ - Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the directory
examples/
Best Practices
- Configure options properly: Set up chart options correctly
- Format data correctly: Use proper data format
- Handle events: Use chart events for interactions
- Use methods: Leverage chart methods for operations
- Optimize performance: Optimize chart rendering performance
- Customize appearance: Customize chart appearance when needed
- Follow platform patterns: Follow platform-specific best practices
Resources
- Official Documentation: https://www.ucharts.cn/v2/#/
- Guide: https://www.ucharts.cn/v2/#/guide/index
- Documentation: https://www.ucharts.cn/v2/#/document/index
Keywords
uCharts, @qiun/ucharts, chart, 图表, 折线图, 柱状图, 饼图, 环形图, 雷达图, 漏斗图, 仪表盘, K线图, 混合图, line chart, column chart, area chart, pie chart, ring chart, radar chart, funnel chart, gauge chart, candle chart, mixed chart, uni-app, WeChat Mini Program, H5, APP, canvas, chart options, chart data, chart events, chart methods