Overview
harmony-vchart is the HarmonyOS encapsulated version of VChart, providing a version of VChart encapsulated for the HarmonyOS environment.
- For more information about the HarmonyOS environment, please refer to the official documentation: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/application-dev-guide
Core Code Structure
The core implementation of the harmony-vchart package consists of two parts:
-
Harmony environment-related adaptation:
-
The component encapsulation logic for the Harmony environment is located in the
packages/harmony_vchart/library/src/main/ets/ChartComponent.etsdirectory, which includes components encapsulated based on the Harmony environment. -
Event compatibility logic is in the
packages/harmony_vchart/library/src/main/ets/event.etsdirectory. -
Animation Ticker logic is in the
packages/harmony_vchart/library/src/main/ets/ticker.etsdirectory. -
VChart products: The capabilities related to the vchart chart library directly reference the packaged products of VChart, and their content is stored in
packages/harmony_vchart/library/src/main/ets/index-harmony.es.min.js.
In the following chapters, we will analyze the encapsulation of the Harmony-VChart component in detail.