rikulo_highcharts 1.0.0+2

  • Readme
  • Changelog
  • Installing
  • 59

highcharts #

highcharts is a wrapper of Highcharts in Dart.

Install from Dart Pub Repository #

Include the following in your pubspec.yaml:

dependencies:
  rikulo_highcharts: any

Then run the Pub Package Manager in Dart Editor (Tool > Pub Install). If you are using a different editor, run the command (comes with the Dart SDK):

pub install

Usage #

Add this lines to the main html of your application (index.html) in the head section.

<script src="your-js-lib/highcharts.js"></script>

You can create a chart object and chart model.

  import 'dart:html';
import 'package:rikulo_highcharts/highcharts.dart';

main() {
  ColumnChart chart = new ColumnChart();
  querySelector('#cnt').append(chart.element);

  CategoryModel<String, String> model = new DefaultCategoryModel<String, String>();
  model.setValue('Tokyo', 'Jan', 16);
  model.setValue('Tokyo', 'Feb', 6);
  model.setValue('Tokyo', 'Mar', 6);
  model.setValue('Tokyo', 'Apr', 3);

  model.setValue('New York', 'Jan', 18);
  model.setValue('New York', 'Feb', 12);
  model.setValue('New York', 'Mar', 9);
  model.setValue('New York', 'Apr', 14);

  chart.model = model;
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Who Uses #

  • Quire - a simple, collaborative, multi-level task management tool.

CHANGES #

1.0.1

  • Fixed type _CompactIterable
  • Support zoomKey, zoomType

1.0.0

  • Dart 2 required

0.1.1

  • Add implementation of DonutChart, AreaChart, PieChart
  • Add DefaultSingleValueCategoryModel, DonutModel
  • Fixed dart2js error when using formatter
  • Added setSize reflow APIs

0.1.0

  • Add ColumnChart, DonutChart, AreaChart
  • Add DefaultCategoryModel

Use this package as a library

1. Depend on it

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


dependencies:
  rikulo_highcharts: ^1.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:rikulo_highcharts/highcharts.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
61
Health:
Code health derived from static analysis. [more]
65
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
46
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: web

Platform components identified in package: html, js.

Health suggestions

Fix lib/src/chart.dart. (-28.88 points)

Analysis of lib/src/chart.dart reported 68 hints, including:

line 24 col 3: Prefer using /// for doc comments.

line 29 col 3: Prefer using /// for doc comments.

line 32 col 3: Avoid return types on setters.

line 34 col 3: Prefer using /// for doc comments.

line 38 col 3: Prefer using /// for doc comments.

Fix lib/src/chart_model.dart. (-8.63 points)

Analysis of lib/src/chart_model.dart reported 18 hints, including:

line 13 col 3: Prefer using /// for doc comments.

line 18 col 3: Prefer using /// for doc comments.

line 28 col 3: Prefer using /// for doc comments.

line 50 col 3: Prefer using /// for doc comments.

line 62 col 3: Prefer using /// for doc comments.

Format lib/highcharts.dart.

Run dartfmt to format lib/highcharts.dart.

Format lib/src/highcharts_js.dart.

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

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: js.

Documentation URL doesn't exist. (-10 points)

At the time of the analysis the documentation field http://www.dartdocs.org/documentation/rikulo_highcharts/1.0.0/index.html was unreachable.

The package description is too short. (-14 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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and rikulo_highcharts.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
js any 0.6.1+1