# PieChart **Repository Path**: ark-ui/PieChart ## Basic Information - **Project Name**: PieChart - **Description**: OpenHarmony上基于MiniCanvas组件实现的饼状图组件,简单好用 - **Primary Language**: TypeScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 4 - **Created**: 2022-05-01 - **Last Updated**: 2024-11-06 ## Categories & Tags **Categories**: harmonyos-chart **Tags**: OpenHarmony组件, Canvas, PieChart, HarmonyOS组件 ## README # PieChart #### 介绍 基于[MiniCanvas](https://gitee.com/ark-ui/MiniCanvas)组件实现的饼状图 #### 使用说明 1. **引入PieChart** ```typescript import { PieChart } from './../commons/widgets/pie_chart' ``` 2. **使用PieChart** ```typescript import { PieChart } from './../commons/widgets/pie_chart' @Entry @Component struct Index { @State message: string = 'Hello World' build() { Column() { Stack() { PieChart() } .size({width: 150, height: 150}) Text(this.message) .fontSize(50) .fontWeight(FontWeight.Bold) } .padding(10) .size({width: "100%", height: "100%"}) } } ``` 3. **运行效果** ![test](test.gif) #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request