c3 0.0.1

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

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.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.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:c3/c3.dart';
  
Version Uploaded Documentation Archive
0.0.1 Feb 4, 2018 Go to the documentation of c3 0.0.1 Download c3 0.0.1 archive

Analysis

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

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 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]
50
Learn more about scoring.

Platforms

Detected platforms: web

Primary library: package:c3/c3.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 API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 hints.

    Run dartfmt to format lib/src/c3_generated.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
dart_browser_loader ^0.0.3 0.0.4
func >=1.0.0 <2.0.0 1.0.0
js ^0.6.1 0.6.1
Transitive dependencies
browser 0.10.0+3
Dev dependencies
test ^0.12.0