当前位置:网站首页>Flutter Chart
Flutter Chart
2022-08-08 18:55:00 【51CTO】
最近要在一个flutter的应用上实现图表,在官方的库里找到了一个现成的chart library。
pub.dev的地址:
https://pub.flutter-io.cn/packages/charts_flutter
这个库应该是google官方自己实现的,github的地址是:
https://github.com/google/charts
他们有一个案例页面:
https://google.github.io/charts/flutter/gallery.html
使用前,请先在项目根目录下使用pub get进行安装:
接着在项目的pubspec.yaml中添加依赖:
之后,就可以在dart文件中使用了。
我在lib文件夹下新建了一个pie.dart 的文件:
这个文件实现了两个基本类,LinearSales是数据格式,SimplePieChart实现了一个简单的饼图。
在main.dart中引用了pie.dart,具体的实现使用了官方例子中的SimplePieChart的代码。
项目的git: https://gitee.com/stewart71/flutter_chart_example
以后如果用到其他chart,还会继续更新。
边栏推荐
猜你喜欢
几何g6将搭载harmonyos系统,产品竞争力全面升级
Dandelion R300A 4G router, remote monitoring PLC tutorial
分布式文件系统fastDFS
16. Learn Lua file I/O together
C language elementary - structure
数据库学习之表的操作
The difference between Redis' memory elimination strategy and expired deletion strategy
How to add F4 Value Help trial version to the input parameters of the report in the ABAP report
Build DG will increase the amount of lead to archive log problem
Redis之SDS数据结构
随机推荐
性能优化|从ping延时看CPU电源管理
Is there any function in MAXCOMPUTE SQL to judge whether the string is a number?
21天学习挑战赛——机器学习01
智驾科技完成C1轮融资,此前2轮已融4.5亿元
Performance optimization | CPU power management from the perspective of ping delay
JVM内存模型和结构详解(五大模型图解)
APICloud AVM wraps date and time selection components
一起了解分层架构&SOA架构
Excuse me, during the mongoshake synchronization process in the shake database, src_mongo hangs up, will the synchronization service not exit?
Vue program of web cache problem after packaging
This error is reported when the shake database is started. Is there a problem with the configuration?
flask基础知识:
LabVIEW报错“仪器IO助手未正确安装”
Redis之SDS数据结构
01. Preface
Is it safe to open an account with Qiniu Business School?Is it reliable to open an account?
ABAP 报表中如何给报表的输入参数增添 F4 Value Help 试读版
How to add F4 Value Help trial version to the input parameters of the report in the ABAP report
Leetcode 23.合并K个升序链表 链表归并合并
请问在MAXCOMPUTE SQL 里有没有函数判断string 是否为数字?