项目作者: thekeenant

项目描述 :
:bar_chart: [wip] Create beautiful, responsive, animated charts using a simple and intuitive API.
高级语言: Dart
项目地址: git://github.com/thekeenant/fcharts.git
创建时间: 2018-03-20T03:34:34Z
项目社区:https://github.com/thekeenant/fcharts

开源协议:MIT License

下载


fcharts

Build Status
Pub Status

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.

Demo

Bar chart demo

Example Usage

  1. class SimpleLineChart extends StatelessWidget {
  2. // X value -> Y value
  3. static const myData = [
  4. ["A", "✔"],
  5. ["B", "❓"],
  6. ["C", "✖"],
  7. ["D", "❓"],
  8. ["E", "✖"],
  9. ["F", "✖"],
  10. ["G", "✔"],
  11. ];
  12. @override
  13. Widget build(BuildContext context) {
  14. return new LineChart(
  15. lines: [
  16. new Line<List<String>, String, String>(
  17. data: myData,
  18. xFn: (datum) => datum[0],
  19. yFn: (datum) => datum[1],
  20. ),
  21. ],
  22. chartPadding: new EdgeInsets.fromLTRB(30.0, 10.0, 10.0, 30.0),
  23. );
  24. }
  25. }

The above code creates:

line chart