|
|
8 mesi fa | |
|---|---|---|
| .. | ||
| design | 8 mesi fa | |
| docs | 8 mesi fa | |
| idl | 8 mesi fa | |
| scripts | 8 mesi fa | |
| src | 8 mesi fa | |
| .clang-format | 8 mesi fa | |
| .gitignore | 8 mesi fa | |
| .remote_aw_plugin | 8 mesi fa | |
| LICENSE | 8 mesi fa | |
| README.md | 8 mesi fa | |
| SConstruct | 8 mesi fa | |
| gen.sh | 8 mesi fa | |
| project.json | 8 mesi fa | |
chart_view图表控件,包含:曲线图、柱状图和饼图。源码位于src目录,示例位于demos目录。
| 控件类型 | 说明 |
|---|---|
| x_axis | X轴控件 |
| y_axis | Y轴控件 |
| tooltip | 提示信息框控件 |
| line_series | 曲线图控件 |
| line_series_colorful | 彩色曲线图控件 |
| bar_series | 柱状图控件 |
| bar_series_minmax | 柱状图控件(同时显示最大最小值) |
| pie_slice | 饼图控件 |
获取 awtk 并编译
git clone https://github.com/zlgopen/awtk.git
cd awtk; scons; cd -
生成示例代码的资源
python scripts/update_res.py all
也可以使用 Designer 打开项目,之后点击 “打包” 按钮进行生成; 如果资源发生修改,则需要重新生成资源。
如果 PIL 没有安装,执行上述脚本可能会出现如下错误:
Traceback (most recent call last):
...
ModuleNotFoundError: No module named 'PIL'
请用 pip 安装:
pip install Pillow
编译
scons
注意: 编译前先确认 SConstruct 文件中的 awtk_root 是否为 awtk 所在目录,不是则修改。 默认使用动态库的形式,如果需要使用静态库,修改 SConstruct 文件中的 BUILD_SHARED = 'false' 即可。
运行
./bin/demo