FLUTTER ECOSYSTEM

thekeenant/fcharts

📊 使用簡單直覺的 API 建立美觀、響應式且帶有動畫效果的圖表。

fcharts 專案封面
Stars
326
Forks
43
最近推送(UTC)
2020年6月22日
專案狀態
未封存
Keenan GitHub avatar
GITHUB User

Keenan ↗

Senior Software Engineer

語言DartObjective-CJava

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 5 項
  • flutter{"sdk":"flutter"}
  • meta^1.1.2
  • collection^1.14.5
  • flutter_test開發依賴{"sdk":"flutter"}
  • test開發依賴^1.3.0

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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

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