chartjs 0.5.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 86

A generated Dart API for Chart.js using pkg/js and dart_js_facade_gen.

This project will be lightly maintained by the original author. Contributions are welcome.

To understand usage, see the example source code and the corresponding output.

Disclaimer #

This is not an official Google product.

0.5.1 #

  • Add missing constructors of ChartLegendOptions, ChartLegendLabelOptions, and ChartHoverOptions for ChartOptions.

0.5.0 #

  • Regenerated API for Chart.js 2.6.0

  • Support Dart 2.

0.4.0+1 #

  • Allow the latest release of package:func.

0.4.0 #

  • Renamed Chart toBase64 -> toBase64Image.

  • Fixed strong-mode issues.

0.3.2 #

  • Regenerated API from an updated ts.d.

0.3.1 #

  • Updated to Chart.js 2.4.0

0.3.0 #

0.2.0+1 #

  • Fixes for Dart 1.16 JS interop requirements.

  • Experimented with adding defaults value.

0.2.0 #

  • BREAKING Includes complete chartjs API.

  • Requires Dart v1.13.1.

0.1.0+2 #

  • Updated for Dart 1.13 release.

0.1.0+1 #

  • Updated and example.

0.1.0 #

  • Initial release


An example of using Chart.js.

This example is ported from this sample in the Chart.js repository.

To view the example, run pub serve example from the root directory of this project – the directory containing pubspec.yaml.

> pub serve example
Loading source assets...
Serving js example on http://localhost:8080
Build completed successfully

You can view it with Dartium or any other browser.

Use this package as a library

1. Depend on it

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

  chartjs: ^0.5.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:chartjs/chartjs.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 Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-0.76 points)

739 out of 745 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/chartjs.dart.

Run dartfmt to format lib/chartjs.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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
js ^0.6.0 0.6.1+1
Dev dependencies
build_runner ^0.10.0
build_web_compilers ^0.4.0