chartjs 0.4.0+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 96

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.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 README.md and example.

0.1.0

  • Initial release

example/example.dart

// Copyright (c) 2015, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

import 'dart:html';
import 'dart:math' as math;

import 'package:chartjs/chartjs.dart';

void main() {
  var rnd = new math.Random();
  var months = <String>['January', 'February', 'March', 'April', 'May', 'June'];

  var data = new LinearChartData(labels: months, datasets: <ChartDataSets>[
    new ChartDataSets(
        label: 'My First dataset',
        backgroundColor: 'rgba(220,220,220,0.2)',
        data: months.map((_) => rnd.nextInt(100)).toList()),
    new ChartDataSets(
        label: 'My Second dataset',
        backgroundColor: 'rgba(151,187,205,0.2)',
        data: months.map((_) => rnd.nextInt(100)).toList())
  ]);

  var config = new ChartConfiguration(
      type: 'line', data: data, options: new ChartOptions(responsive: true));

  new Chart(querySelector('#canvas') as CanvasElement, config);
}

1. Depend on it

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


dependencies:
  chartjs: "^0.4.0+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:chartjs/chartjs.dart';
        
Version Uploaded Documentation Archive
0.4.0+1 Oct 10, 2017 Go to the documentation of chartjs 0.4.0+1 Download chartjs 0.4.0+1 archive
0.4.0 Jun 8, 2017 Go to the documentation of chartjs 0.4.0 Download chartjs 0.4.0 archive
0.3.2 Mar 27, 2017 Go to the documentation of chartjs 0.3.2 Download chartjs 0.3.2 archive
0.3.1 Dec 20, 2016 Go to the documentation of chartjs 0.3.1 Download chartjs 0.3.1 archive
0.3.0 Oct 14, 2016 Go to the documentation of chartjs 0.3.0 Download chartjs 0.3.0 archive
0.2.0+1 Apr 25, 2016 Go to the documentation of chartjs 0.2.0+1 Download chartjs 0.2.0+1 archive
0.2.0 Dec 17, 2015 Go to the documentation of chartjs 0.2.0 Download chartjs 0.2.0 archive
0.1.0+2 Nov 18, 2015 Go to the documentation of chartjs 0.1.0+2 Download chartjs 0.1.0+2 archive
0.1.0+1 Nov 17, 2015 Go to the documentation of chartjs 0.1.0+1 Download chartjs 0.1.0+1 archive
0.1.0 Nov 16, 2015 Go to the documentation of chartjs 0.1.0 Download chartjs 0.1.0 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
91 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
96

Platforms

Detected platforms: web, other

Primary library: package:chartjs/chartjs.dart with components: js.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.1 <2.0.0
func >=0.1.0 <2.0.0 1.0.0
js ^0.6.0 0.6.1
Dev dependencies
browser ^0.10.0+2