flarts 0.1.0

  • Readme
  • Changelog
  • Installing
  • 72

Flarts - Flutter Charts #

Flutter + Charts = Flarts

Flarts is a graphing/charting package for Flutter.

S&P 500 in red, Dow Jones Index in green

Features #

  • Multiple data sets and plot types on a single Flart

  • Auto-fit

    • By default Flarts will size each axis to fit the min and max of the data plotted on that axis.
  • Auto-labelling

    • Label values are be interpolated from the type of data on the axis.
  • Direction-agnostic axes

    • Your range axes don't have to be vertical and your domain axes don't have to be horizontal. Use what you want.
  • Customization

    • Axis Labels

      • The label text can be interpolated from the data on that axis, or it can be the index of the label.
      • Frequency: Label every gridline, every other gridline, none, or provide your own labels.
    • Axes Side/Direction

      • Any axis can be vertical or horizontal.
      • Any vertical axis can be on the left or right.
      • Any horizontal axis can be on the top or bottom.
    • Axes Gridlines

      • The number of gridlines on each axis can be specified.
    • Styling

      • Color can be specified for each data plot.
      • Styling customization is largely in progress. The first goals are:
        • Custom TextStyle on labels
        • Custom PaintStyle for gridlines, the chart background, and the chart border
    • Plot types

      • Line
      • Bar
      • More plot types are currently in development. The first goal is candlesticks (OHLC).

Examples #

Simple data, simple example #

This basic example uses a custom range axis (from 10-25), and doesn't provide a custom domain axis so the chart fits the domain data.

Spark chart #

The Spark Chart is a sleek pre-styled chart with no labels or gridlines.

Multiple data sets and plot type #

This chart plots the price of the S&P 500 and Dow Jones Indices, as well as the volume of the S&P 500 Index, from April 10 2018 to April 10 2019. The S&P price is drawn in red, the Dow Jones price in green, and the S&P volume in blue (the bars).

All three data plots share the same domain axis, which is derived from the dates in the price data. The labels on the left axis are interpolated from the S&P's volume data. The labels on the right axis are interpolated from the S&P's price data.

0.1.0 #

  • First public version

Use this package as a library

1. Depend on it

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

  flarts: ^0.1.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:flarts/example/lib/example_data.dart';
import 'package:flarts/example/lib/main.dart';
import 'package:flarts/flart.dart';
import 'package:flarts/flart_axis.dart';
import 'package:flarts/flart_data.dart';
import 'package:flarts/flart_paint.dart';
import 'package:flarts/flart_theme.dart';
import 'package:flarts/label_formatter.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 Apr 1, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/example/lib/example_data.dart.

Run flutter format to format lib/example/lib/example_data.dart.

Format lib/example/lib/main.dart.

Run flutter format to format lib/example/lib/main.dart.

Format lib/label_formatter.dart.

Run flutter format to format lib/label_formatter.dart.

Maintenance suggestions

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flarts.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cupertino_icons ^0.1.2 0.1.3
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies