charted 0.6.1

  • Readme
  • Changelog
  • Installing
  • 3

Visualization toolkit for Dart #

Charted provides

  • A selection API similar to D3.js
  • Visualization utilities ported from D3.js
  • An easy-to-use API to create charts including an SVG implementation based on the Selection API.
  • An interactive demo

Screenshot of Charted interactive demo #

Screenshot of Charted interactive demo

Get started with the interactive demo #

Get started with Charted by trying out the interactive demo provided with the package. Follow these instructions and get it running locally on your machine (Git and the Dart SDK has to be installed first):

git clone
cd charted
pub get
pub serve examples

Changelog #

All notable changes to this project will be documented in this file.

This log starts from version 0.5.0. Older versions are omitted, but this should be kept up-to-date when a version update happens in the future.

The format is based on Keep a Changelog

0.6.0 - 2018-07-09 #

Changed #

  • Internal changes to make charted Dart 2.0 compatible.

  • Several typedef signatures have changed: CompareFunc, InterpolatorGenerator:

    Breaking typedef signature changes
    OLDtypedef int CompareFunc(dynamic a, dynamic b);
    NEWtypedef int CompareFunc(Comparable a, Comparable b);
    OLDtypedef Interpolator InterpolatorGenerator(a, b);
    NEWtypedef Interpolator InterpolatorGenerator<T>(T a, T b);
  • Several member signatures have changed: Extent.items, LinearScale.interpolator, OrdinalScale.rangePoints, OrdinalScale.rangeBands, OrdinalScale.rangeRoundBands, ScaleUtils.extent, TimeFormat.multi:

    Breaking member signature changes
    Class Extent
    OLDfactory Extent.items(Iterable<T> items, [Comparator compare =]);
    NEWfactory Extent.items(Iterable<T> items, [Comparator<T> compare =]);
    Class LinearScale
    OLDInterpolatorGenerator interpolator;
    NEWInterpolatorGenerator<num> interpolator;
    Class OrdinalScale
    OLDvoid rangePoints(Iterable range, [double padding]);
    NEWvoid rangePoints(Iterable<num> range, [double padding]);
    OLDvoid rangeBands(Iterable range, [double padding, double outerPadding]);
    NEWvoid rangeBands(Iterable<num> range, [double padding, double outerPadding]);
    OLDvoid rangeRoundBands(Iterable range, [double padding, double outerPadding]);
    NEWvoid rangeRoundBands(Iterable<num> range, [double padding, double outerPadding]);
    Class ScaleUtils
    OLDstatic Extent extent(Iterable<num> values)
    NEWstatic Extent<num> extent(Iterable<num> values)
    Class TimeFormat
    OLDTimeFormatFunction multi(List<List> formats)
    NEWFormatFunction multi(List<List> formats)
  • The charted.core.utils library's sum function's signature changed:

    Breaking library member signature changes
    Library charted.core.utils
    OLDnum sum(List values)
    NEWnum sum(List<num> values)
  • The signature of the Extent class changed:

    Breaking class signature changes
    Class Extent
    OLDclass Extent<T> extends Pair<T, T>
    NEWclass Extent<T extends Comparable> extends Pair<T, T>

0.5.0 - 2017-11-16 #

Added #

  • Stacked line renderer for rendering stacked line.

Changed #

  • Add type and explicit casting to enable strong mode.

0.0.10 - 2015-03-28 #

Added #

  • First release of charted.

Use this package as a library

1. Depend on it

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

  charted: ^0.6.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:charted/charted.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.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.8.4.
 Because charted depends on browser any which requires SDK version <2.0.0, version solving failed.

Health suggestions

Format lib/charts/src/cartesian_area_impl.dart.

Run dartfmt to format lib/charts/src/cartesian_area_impl.dart.

Format lib/core/utils/lists.dart.

Run dartfmt to format lib/core/utils/lists.dart.

Format lib/svg/shapes/arc.dart.

Run dartfmt to format lib/svg/shapes/arc.dart.

Format lib/svg/shapes/rect.dart.

Run dartfmt to format lib/svg/shapes/rect.dart.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Package is getting outdated. (-98.36 points)

The package was last published 103 weeks ago.

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 charted.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

The description is too long. (-3 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.55.0 <3.0.0