fcharts 0.0.10

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 90

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 Touch 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

0.0.8

  • Added more examples
  • Wrapped up automatic span calculation

0.0.7

  • New API for creating a line chart widget

0.0.5 - 0.0.6

  • Begin adding tests
  • dartfmt

0.0.2 - 0.0.4

Just dependency, documentation, and format fixes.

0.0.1

Started the project!

  • Chart, a widget for creating a viewable chart from meaningful params
  • ChartData for creating a drawable
  • ChartDrawable for drawing directly to a canvas

example/README.md

fcharts_example

Demonstrates how to use the fcharts plugin.

See lib/line for example charts.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fcharts: ^0.0.10

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fcharts/fcharts.dart';
  
Version Uploaded Documentation Archive
0.0.10 Nov 28, 2018 Go to the documentation of fcharts 0.0.10 Download fcharts 0.0.10 archive
0.0.9 May 5, 2018 Go to the documentation of fcharts 0.0.9 Download fcharts 0.0.9 archive
0.0.8 Apr 24, 2018 Go to the documentation of fcharts 0.0.8 Download fcharts 0.0.8 archive
0.0.7 Apr 24, 2018 Go to the documentation of fcharts 0.0.7 Download fcharts 0.0.7 archive
0.0.6 Apr 13, 2018 Go to the documentation of fcharts 0.0.6 Download fcharts 0.0.6 archive
0.0.5 Apr 2, 2018 Go to the documentation of fcharts 0.0.5 Download fcharts 0.0.5 archive
0.0.4 Mar 23, 2018 Go to the documentation of fcharts 0.0.4 Download fcharts 0.0.4 archive
0.0.3 Mar 23, 2018 Go to the documentation of fcharts 0.0.3 Download fcharts 0.0.3 archive
0.0.2 Mar 23, 2018 Go to the documentation of fcharts 0.0.2 Download fcharts 0.0.2 archive
0.0.1 Mar 23, 2018 Go to the documentation of fcharts 0.0.1 Download fcharts 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
85
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/widgets/bar_chart.dart. (-1.99 points)

Analysis of lib/src/widgets/bar_chart.dart reported 4 hints:

line 4 col 8: Unused import: 'package:fcharts/src/decor/axis.dart'.

line 5 col 8: Unused import: 'package:fcharts/src/decor/decor.dart'.

line 6 col 8: Unused import: 'package:fcharts/src/utils/chart_position.dart'.

line 13 col 8: Unused import: 'dart:math'.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
collection ^1.14.5 1.14.11
flutter 0.0.0
meta ^1.1.2 1.1.6
Transitive dependencies
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
test ^1.3.0