echarts-tools
v1.2.1
Published
Simplified ECharts utilities for Vue2 and HTML
Maintainers
Readme
echarts-tools Basic Guide
🚀 Quick Start
Environment Setup
- Install Node.js 14.18+
- Official Download
- Verify installation:
node -v # Should display v14.18 or higher npm -v # Should display 6.x+
Clone Project
git clone https://github.com/Geoffwo/echarts-tools.git
Or use China mirror:
git clone https://gitee.com/Geoffwo/echarts-tools.git
cd echarts-toolsInstall Dependencies
npm installBuild Project
npm run buildAfter building, you'll get:
dist/
├── cjs/ # For Vue2 projects
└── iife/ # For direct HTML usage📂 Directory Structure
echarts-tools/
├── dist/ # Build output (DO NOT modify manually)
├── src/ # Source code (unobfuscated)
├── page/ # Code examples
├── config/ # Build configurations
│ ├── esbuild.mjs # ESBuild config
│ └── obfuscator.config.js # Obfuscation config
├── package.json # Project config
├── README.md # Documentation (English)
└── README-zh.md # Documentation (Chinese)🛠️ Usage
For Vue2 Projects
Install dependencies
npm install echarts-tools echarts@5 --saveComponent usage example:
vue2Demo.vue
For HTML Direct Usage
Example:
htmlDemo.html
🔧 Common Commands
| Command | Description |
|----------------------|----------------------------------|
| npm install | Install development dependencies |
| npm run build | Build production version (with obfuscation) |
| npm run es5build | Build without obfuscation (for debugging) |
⚠️ Important Notes
echarts Peer Dependency
This library requires echarts 5+:npm install echarts@5 --saveCode Protection
Files indist/are obfuscated:- Use
npm run es5buildfor unobfuscated debug builds - Obfuscation config:
config/obfuscator.config.js
- Use
Browser Compatibility
IIFE version requirements:<!-- Load echarts first --> <script src="echarts.min.js"></script> <!-- Then load this library --> <script src="echarts-tools.js"></script>
📜 View Documentation
Access API docs programmatically:
import { printDoc } from 'echarts-tools';
printDoc(); // Prints all available methods and configs💖 Project Support
If this project helps you, consider supporting maintenance:
• 🚀 Any amount - General support
• ☕ 5 CNY - Buy me a coffee
• 📚 10 CNY - Documentation improvements
| Alipay | WeChat Pay |
|----------------------------------|-------------------------------------|
|
|
|
Donation Terms
- All donations are voluntary gifts
- No services or obligations are implied
- No contractual relationship established
- Minors must obtain guardian consent
Technical Support
Contact: [email protected]
