Initial commit
This commit is contained in:
28
uni_modules/ak-charts/README.md
Normal file
28
uni_modules/ak-charts/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# ak-charts
|
||||
|
||||
一个简单的 uni_modules 图表插件,支持基础柱状图和折线图,UTS 插件规范。
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. 在页面中引用组件:
|
||||
````vue
|
||||
<ak-charts :option="option" canvas-id="my-canvas"></ak-charts>
|
||||
````
|
||||
|
||||
2. 通过 AkCharts.render(option, canvasId) 进行全局渲染调用。
|
||||
|
||||
option 示例:
|
||||
```js
|
||||
{
|
||||
type: 'bar', // 或 'line'
|
||||
data: [10, 20, 30],
|
||||
labels: ['A', 'B', 'C'],
|
||||
color: '#2196f3'
|
||||
}
|
||||
```
|
||||
|
||||
## 目录结构
|
||||
- index.uts 插件主入口
|
||||
- components/ak-charts/ak-charts.vue 图表组件
|
||||
- package.json 插件描述
|
||||
- README.md 插件说明
|
||||
Reference in New Issue
Block a user