angular_modern_charts 0.1.1

  • Readme
  • Changelog
  • Installing
  • 80

Angular wrapper for modern_charts by jolleekin@gmail.com

Includes chart components and models for building data and properties #

Example #

app_component.dart

import 'package:angular/angular.dart';
import 'package:angular_modern_charts/angular_modern_charts.dart';

@Component(
    selector: 'app-component',
    templateUrl: 'app_component.html',
    directives: const [BarChartComponent])
class AppComponent {
  // Create some data (required)
  final barData = BarChartData([
    'Expected',
    'Result'
  ], [
    BarChartColumnData('2016', [350, 415]),
    BarChartColumnData('2017', [450, 489]),
    BarChartColumnData('2018', [500, 581])
  ]);

  // Set some properties (optional)
  final barProperties = BarChartProperties()
    ..height = '600px'
    ..xAxis.title.text = 'Year'
    ..yAxis.title.text = 'Million dollars'
    ..yAxis.minValue = 0;
}

app_component.html

<h1>BARCHART EXAMPLE</h1>
<div>
  <barchart [chartData]="barData"
            [chartProperties]="barProperties"></barchart>
</div>

Output Output

Changelog #

0.0.1 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: web

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

Health issues and suggestions

Document public APIs. (-0.50 points)

117 out of 119 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/models/barchart_data.dart. (-0.50 points)

Analysis of lib/models/barchart_data.dart reported 1 hint:

line 13 col 9: DO use curly braces for all flow control structures.

Fix lib/models/linechart_data.dart. (-0.50 points)

Analysis of lib/models/linechart_data.dart reported 1 hint:

line 16 col 9: DO use curly braces for all flow control structures.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (angular, json_annotation).

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and angular_modern_charts.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
angular ^5.2.0 5.3.1 6.0.0-alpha+1
json_annotation ^2.0.0 2.4.0 3.0.0
modern_charts ^0.1.17 0.1.17 0.1.18
sass_builder ^2.1.2 2.1.3
Transitive dependencies
analyzer 0.35.4 0.39.1
analyzer_plugin 0.2.1
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.4.0
build 1.2.1
build_config 0.4.1+1
built_collection 4.2.2
built_value 6.8.2 7.0.0
built_value_generator 6.8.2 7.0.0
charcode 1.1.2
checked_yaml 1.0.2
cli_repl 0.2.0+1
code_builder 3.2.0
collection 1.14.12
convert 2.1.1
crypto 2.1.3
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.3.3
fixnum 0.10.11
front_end 0.1.14 0.1.29
glob 1.2.0
html 0.14.0+3
http 0.12.0+2
http_parser 3.1.3
intl 0.15.8 0.16.0
js 0.6.1+1
kernel 0.3.14 0.3.29
logging 0.11.3+2
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
package_resolver 1.0.10
path 1.6.4
pedantic 1.8.0+1
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.1.1
sass 1.23.3
source_gen 0.9.4+4 0.9.4+6
source_maps 0.10.8
source_span 1.5.5
stack_trace 1.9.3
stream_transform 0.0.19
string_scanner 1.0.5
term_glyph 1.1.0
tuple 1.0.3
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.2.0
Dev dependencies
build_runner ^1.1.3
json_serializable ^2.0.1