v0.0.11
fcharts
一个用于 Flutter 的图表库。使用简单直观的 API 创建美观、动画和响应式图表。
37喜欢 223近 30 天下载35Pub 分数
平台暂无数据
📊 使用简单直观的 API 创建美观、响应式且带有动画效果的图表。
{"sdk":"flutter"}^1.1.2^1.14.5{"sdk":"flutter"}^1.3.0以下为英文项目原文快照,最新内容请访问 GitHub。
A work-in-progress chart library for Flutter. Until version 1.0.0 the API is subject to change
drastically. Needless to say, fcharts is not production ready.
The goal of this project is to allow for creating beautiful, responsive charts using a simple and intuitive API.
Inspired by Mikkel Ravn's tutorial on Flutter widgets and animations. If you have used Recharts (ReactJS library) you will find the high level API to be somewhat familiar.
Bar chart demo
class SimpleLineChart extends StatelessWidget {
// X value -> Y value
static const myData = [
["A", "✔"],
["B", "❓"],
["C", "✖"],
["D", "❓"],
["E", "✖"],
["F", "✖"],
["G", "✔"],
];
@override
Widget build(BuildContext context) {
return new LineChart(
lines: [
new Line<List<String>, String, String>(
data: myData,
xFn: (datum) => datum[0],
yFn: (datum) => datum[1],
),
],
chartPadding: new EdgeInsets.fromLTRB(30.0, 10.0, 10.0, 30.0),
);
}
}
The above code creates:
line chart