chartjs 0.5.0

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

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.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 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);
}

Use this package as a library

1. Depend on it

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


dependencies:
  chartjs: ^0.5.0

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.5.0 Aug 6, 2018 Go to the documentation of chartjs 0.5.0 Download chartjs 0.5.0 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

All 11 versions...

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

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: web

Primary library: package:chartjs/chartjs.dart with components: html, 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 of the API.

Dependencies

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