当前位置:网站首页>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,还会继续更新。
边栏推荐
- 重读GPDB 和 TiDB 论文引发的 HTAP 数据库再思考
- Laravel 5.8 Notes
- WPF DataGrid 展示数据
- APICloud AVM wraps date and time selection components
- Dandelion R300A 4G router, remote monitoring PLC tutorial
- 数字化工厂建设的内容主要有哪三个方面
- 请问shake数据库中mongoshake同步过程中,src_mongo挂了,同步服务不会退出吗?
- 小白转行做3D游戏建模,有没有前途?
- Implementing Forward+ in Unity URP
- 几何g6将搭载harmonyos系统,产品竞争力全面升级
猜你喜欢
Lecture 4: Database Definition Language of DDL Type of SQL Statements
leetcode 240.搜索二维矩阵II 分治思想
小白转行做3D游戏建模,有没有前途?
How to add F4 Value Help to the input parameters of the report in the ABAP report
OpenInfra Days China 2022即将开启,与 openEuler 共话开源技术
ORACLE子查询 导致无法谓词推入的研究
SSM project integration, integrated case
Architecture Design Fundamentals
2022年美术生就业前景解析
量子力学奇妙之旅-铁磁性来由/双态系统
随机推荐
SSM项目整合——综合案例
21天学习挑战赛——机器学习03
Transsion Holdings: At present, there is no clear plan for the company's mobile phone products to enter the Chinese market
This error is reported when the shake database is started. Is there a problem with the configuration?
Goose Factory Robot Dog Fancy Crossing 10m Plum Blossom Pile: Front Flip, Single Pile Jump, Get Up and Bow... No stumble in the whole process
3D游戏建模教程:游戏角色制作——赏金猎人,超逼真
PG 之 huge page
OpenInfra Days China 2022即将开启,与 openEuler 共话开源技术
vue项目打包后的网页缓存问题
分布式文件系统fastDFS
Azure Neural TTS continues to be updated to help enterprises develop small language markets
十六、一起学习Lua 文件 I/O
uniapp parent component uses prop to pass asynchronous data to child components
shell九九乘法口诀表
nyoj 712 Exploring treasure
El - tree set radio, click finish after assemble
最长子串(长沙理工大学第十一届程序设计竞赛 离线 做了n天.....崩溃了)
关于求最小公倍数的三种常用方法
21天学习挑战赛——机器学习02
Securities account is better to choose which brokerage platform, which is more safe