fl_animated_linechart 0.1.2

fl_animated_linechart #

Codemagic build status

An animated linechart library for flutter.

  • Support for datetime xaxis
  • highlight selection
  • animation the chart

Getting Started #

Try the sample project or include in your project.

Chart exammple with highlight

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)),

[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


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:

  fl_animated_linechart: ^0.1.2

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';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.16 points)

101 out of 104 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/chart_point.dart.

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

Format lib/chart/datetime_chart_point.dart.

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

Fix additional 9 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/chart/datetime_series_converter.dart (Run flutter format to format lib/chart/datetime_series_converter.dart.)
  • lib/chart/highlight_point.dart (Run flutter format to format lib/chart/highlight_point.dart.)
  • lib/chart/line_chart.dart (Run flutter format to format lib/chart/line_chart.dart.)
  • lib/common/animated_path_util.dart (Run flutter format to format lib/common/animated_path_util.dart.)
  • lib/common/dates.dart (Run flutter format to format lib/common/dates.dart.)
  • lib/common/pair.dart (Run flutter format to format lib/common/pair.dart.)
  • lib/common/text_direction_helper.dart (Run flutter format to format lib/common/text_direction_helper.dart.)
  • lib/fl_animated_linechart.dart (Run flutter format to format lib/fl_animated_linechart.dart.)
  • lib/main.dart (Run flutter format to format lib/main.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).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


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
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies