taro-vchart is the Taro mini program encapsulation version of VChart, providing an encapsulation of the VChart React version in the Taro environment.
For more information about the Taro mini program host environment, please refer to the official documentation: https://docs.taro.zone/docs/
Core Code Structure
taro-vchart's directory and architecture correspond to:
Chart Factory Layer: charts directory
Using the factory pattern to uniformly generate chart components (such as BoxPlotChart), which includes all available chart type components. Each chart is created through the createChart method with standardized parameters:
Cross-platform adaptation layer: The components directory implements the core logic for cross-platform rendering, including a general chart component and a browser chart component, with consistent functionality mainly to address different platforms.
TTCanvas is responsible for managing specific VChart instances, receiving props passed by GeneralChart, and implements the chart capabilities for seamless integration into the mini-program ecosystem through an abstract general interface.
In the following chapters, we will analyze the encapsulation of the WX-VChart component in detail.
This document was revised and organized by the following person