c3 0.0.2

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

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

Example

import "dart:html";
import "package:c3/c3.dart" as c3;

main() async {
  await c3.load();

  final container = document.querySelector("#chart");

  final data = new c3.Data()
    ..columns = [
      ['data1', 30, 200, 100, 400, 150, 250],
      ['data2', 50, 20, 10, 40, 15, 25]
    ];

  final configuration = new c3.ChartConfiguration()
    ..bindto = container
    ..data = data;

  final chart = c3.generate(configuration);
}

Changelog

0.0.2

  • dart 2 stable
  • some missing api
  • fix dart2js

0.0.1

  • Initial version, created by Stagehand

example/example.dart

import 'dart:html';
import "package:c3/c3.dart" as c3;

import "package:js/js_util.dart";

main() async {
  await c3.load();

  final container = document.querySelector("#chart");

  final data = new c3.Data()
    ..columns = [
      ['data1', 30, 200, 100, 400, 150, 250],
      ['data2', 50, 20, 10, 40, 15, 25]
    ]
    ..types = jsify({"data2": 'bar'})
    ..axes = jsify({"data2": 'y2'});

  final configuration = new c3.ChartConfiguration()
    ..bindto = container
    ..data = data
    ..axis = (new c3.Axis()
      ..y = (new c3.YAxisConfiguration()
        ..label = jsify({"text": 'Y Label', "position": 'outer-middle'}))
      ..y2 = (new c3.YAxisConfiguration()
        ..show = true
        ..label = jsify({"text": 'Y2 Label', "position": 'outer-middle'})));

  final chart = c3.generate(configuration);

  chart.load(new c3.Data()
    ..columns = [
      ['data1', 300, 100, 250, 150, 300, 150, 500],
      ['data2', 100, 200, 150, 50, 100, 250]
    ]);
}

Use this package as a library

1. Depend on it

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


dependencies:
  c3: ^0.0.2

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:c3/c3.dart';
  
Version Uploaded Documentation Archive
0.0.2 Aug 7, 2018 Go to the documentation of c3 0.0.2 Download c3 0.0.2 archive
0.0.1 Feb 4, 2018 Go to the documentation of c3 0.0.1 Download c3 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: web

Primary library: package:c3/c3.dart with components: html, js.

Maintenance suggestions

The description is too short. (-20 points)

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-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.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.20.1 <3.0.0
dart_browser_loader ^0.0.3 0.0.5
js ^0.6.1 0.6.1+1
Dev dependencies
test ^1.3.0