angular_modern_charts 0.2.0

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

0.2.0 #

  • Upgaraded angular to ^6.0.0-alpha

Use this package as a library

1. Depend on it

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


dependencies:
  angular_modern_charts: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter 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]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

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

Analysis of lib/models/linechart_data.dart reported 2 hints:

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

line 26 col 16: The value of the field '_name' isn't used.

Fix lib/models/piechart_data.dart. (-1 points)

Analysis of lib/models/piechart_data.dart reported 2 hints:

line 17 col 16: The value of the field '_name' isn't used.

line 18 col 16: The value of the field '_data' isn't used.

Fix lib/models/radarchart_data.dart. (-1 points)

Analysis of lib/models/radarchart_data.dart reported 2 hints:

line 17 col 16: The value of the field '_name' isn't used.

line 18 col 13: The value of the field '_data' isn't used.

Fix additional 3 files with analysis or formatting issues. (-1.50 points)

Additional issues in the following files:

  • lib/models/barchart_data.dart (1 hint)
  • lib/models/gaugechart_data.dart (1 hint)
  • lib/src/components/chart_component.dart (1 hint)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (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 ^6.0.0-alpha 6.0.0-alpha+1
json_annotation ^2.4.0 2.4.0 3.0.1
modern_charts ^0.1.17 0.1.19
sass_builder ^2.1.3 2.1.3
Transitive dependencies
analyzer 0.37.1+1 0.39.4
angular_ast 0.5.11
angular_compiler 0.4.5
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.2
built_collection 4.3.2
built_value 7.0.9
charcode 1.1.3
checked_yaml 1.0.2
cli_repl 0.2.0+1
code_builder 3.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
dart_style 1.2.10 1.3.3
fixnum 0.10.11
front_end 0.1.21+1 0.1.29
glob 1.2.0
html 0.14.0+3
http 0.12.0+4
http_parser 3.1.3
intl 0.15.8 0.16.1
js 0.6.1+1
kernel 0.3.21+1 0.3.29
logging 0.11.4
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.9.0
pub_semver 1.4.3
pubspec_parse 0.1.5
quiver 2.1.2+1
sass 1.25.0 1.26.0-test.3
source_gen 0.9.4+6 0.9.4+7
source_maps 0.10.9
source_span 1.6.0
stack_trace 1.9.3
stream_transform 1.1.0
string_scanner 1.0.5
term_glyph 1.1.0
tuple 1.0.3
typed_data 1.1.6
watcher 0.9.7+13
yaml 2.2.0
Dev dependencies
build_runner ^1.5.0
json_serializable ^3.0.0