fl_animated_linechart 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 84

fl_animated_linechart #

Codemagic build status

Animations

An animated chart library for flutter.

  • Support for datetime axis
  • Multiple y axis, supporting different units
  • Highlight selection
  • Animation of the chart
  • Tested with more than 3000 points and still performing

There are currently two different charts:

  • line chart
  • area chart

Getting Started #

Try the sample project or include in your project.

Highlight for the line chart: Chart example with highlight

Area chart: Area Chart example Area Chart example

Example code:

LineChart lineChart = LineChart.fromDateTimeMaps([line1, line2], [Colors.green, Colors.blue]);

return Scaffold(
  appBar: AppBar(
    title: Text(widget.title),
  ),
  body: Container(
    child: Column(
        mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          Expanded(child: AnimatedLineChart(lineChart)),
        ]
    ),
  ),
);

The example app, can toggle between line chart and area chart. Example app

[0.0.1] - 22 august 2019

  • Very initial release, to include the library in our project

[0.0.2] - 22 august 2019

  • Added screenshots
  • Fixed warnings

[0.0.3] - 22 august 2019

  • Added codemagic CI

[0.0.4] - 22 august 2019

  • Style tooltip
  • Paint unit
  • Make sure tooltip paints within chart area
  • Formatted dynamic datetime axisvalues

[0.0.5] - 23 august 2019

  • Restyled tooltip
  • Finish testing

[0.0.6] - 30 august 2019

  • Change animations, to be really cool, now the animations draws the chart lines.
  • secondary Y axis support, to support 1-2 units.

[0.0.7] - 2 september 2019

  • show tooltip on tap
  • coverage back to 100

[0.0.8] - 3 september 2019

  • reduce margins

[0.1.0] - 5 september 2019

  • fix drawing series with all values being the same

[0.1.1] - 6 september 2019

  • Calculate axis width, to make the chart paint full width

[0.1.2] - 12 september 2019

  • Improve performance

[0.1.3] - 24 september 2019

  • Formatting axis values dynamic depending on the tick size

[0.1.4] - 25 september 2019

  • Adding support for area chart

[0.1.5] - 25 september 2019

  • Updated readme

[0.1.6] - 25 september 2019

  • Updated readme

[0.1.7] - 25 september 2019

  • More detailed description

[0.1.8] - 25 september 2019

  • Added gradient option to the area chart

[0.1.9] - 26 september 2019

  • Fixed small offset issue between yaxis and line/point drawing

[1.0.0] - 26 september 2019

  • We consider the library as stable

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  fl_animated_linechart: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:fl_animated_linechart/fl_animated_linechart.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on Nov 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.12 points)

96 out of 99 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/chart/animated_line_chart.dart.

Run flutter format to format lib/chart/animated_line_chart.dart.

Format lib/chart/area_line_chart.dart.

Run flutter format to format lib/chart/area_line_chart.dart.

Format lib/chart/line_chart.dart.

Run flutter format to format lib/chart/line_chart.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (intl).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
flutter 0.0.0
intl ^0.15.8 0.15.8 0.16.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test