vchart-svg-plugin is a vchart plugin used to convert the rendered content of vchart into svg, making it convenient for use in printing, SSR, and other environments.
# Clone the repository
git clone https://github.com/visactor/vchart-svg-plugin.git
cd vchart-svg-plugin
# Install dependencies
yarn install
# Start development server
yarn dev
# Build for production
yarn build
# Run linting
yarn lint
vchart-svg-plugin
English| 简体中文
Introduction
VChart is a chart component library in the VisActor visualization system, based on vchart-svg-plugin, which can easily convert charts into SVG files.
🔨 Usage
📦 Installation
Usage Notes
animation: false) when converting to ensure accurate SVG output📊 A Simple Chart
render on node
�️ Development
Environment Setup
Project Structure
Core Modules
SVG Conversion Modules
The plugin converts VChart rendered graphics to SVG through specialized modules:
Development Workflow
Local Development
Code Style
Building
Testing
API Reference
Main Function
convertVChartToSvg(vchart: VChart): stringConverts a rendered VChart instance to SVG string.
Parameters:
vchart: A rendered VChart instanceReturns:
string: SVG content as stringmode: "node"and provide canvas implementationrenderAsync()for complex visualizationsEnvironment Support
canvaspackage)Contributing
For detailed contribution guidelines, see CONTRIBUTING.md
�🔗 Related Links
🤝 Contribution
If you would like to contribute, please read the Code of Conduct and Contribution Guidelines.
Small streams make a river, and rivers flow into the sea!