charts_common 0.4.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 56

Common Charting library

pub package

Common componnets for charting libraries.

0.4.0

  • Declare compatibility with Dart 2.
  • BasicNumericTickFormatterSpec now takes in a callback instead of NumberFormat as the default constructor. Use named constructor withNumberFormat instead. This is a breaking change.
  • BarRendererConfig is no longer default of type String, please change current usage to BarRendererConfig<String>. This is a breaking change.
  • BarTargetLineRendererConfig is no longer default of type String, please change current usage to BarTargetLineRendererConfig<String>. This is a breaking change.

0.3.0

  • Simplified API by removing the requirement for specifying the datum type when creating a chart. For example, previously to construct a bar chart the syntax was 'new BarChart<MyDatumType>()'. The syntax is now cleaned up to be 'new BarChart()'. Please refer to the online gallery for the correct syntax.
  • Added scatter plot charts
  • Added tap to hide for legends
  • Added support for rendering area skirts to line charts
  • Added support for configurable fill colors to bar charts

0.2.0

  • Update color palette. Please use MaterialPalette instead of QuantumPalette.
  • Dart2 fixes

0.1.0

Initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  charts_common: ^0.4.0

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:charts_common/common.dart';
  
Version Uploaded Documentation Archive
0.4.0 Aug 6, 2018 Go to the documentation of charts_common 0.4.0 Download charts_common 0.4.0 archive
0.3.0 May 10, 2018 Go to the documentation of charts_common 0.3.0 Download charts_common 0.3.0 archive
0.2.0 Apr 16, 2018 Go to the documentation of charts_common 0.2.0 Download charts_common 0.2.0 archive
0.0.1 Mar 23, 2018 Go to the documentation of charts_common 0.0.1 Download charts_common 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
81
Health:
Code health derived from static analysis. [more]
31
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
30
Overall:
Weighted score of the above. [more]
56
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: unsure

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/common/math.dart. (-57.81 points)

Analysis of lib/src/common/math.dart failed with 3 errors:

line 17 col 8: Target of URI doesn't exist: 'package:vector_math/vector_math.dart'.

line 55 col 8: Couldn't infer type parameter 'T'.\n\nTried to infer 'dynamic' for 'T' which doesn't work:\n Type parameter 'T' declared to extend 'num'.\nThe type 'dynamic' was inferred from:\n Parameter 'a' declared as 'T'\n but argument is 'double'.\n Parameter 'b' declared as 'T'\n but argument is 'dynamic'.\n\nConsider passing explicit type argument(s) to the generic.\n\n

line 55 col 17: Couldn't infer type parameter 'T'.\n\nTried to infer 'dynamic' for 'T' which doesn't work:\n Type parameter 'T' declared to extend 'num'.\nThe type 'dynamic' was inferred from:\n Parameter 'a' declared as 'T'\n but argument is 'double'.\n Parameter 'b' declared as 'T'\n but argument is 'dynamic'.\n\nConsider passing explicit type argument(s) to the generic.\n\n

Fix lib/src/chart/scatter_plot/point_renderer.dart. (-25 points)

Analysis of lib/src/chart/scatter_plot/point_renderer.dart failed with 1 error:

line 20 col 8: Target of URI doesn't exist: 'package:vector_math/vector_math.dart'.

Fix lib/src/chart/bar/base_bar_renderer_config.dart. (-0.50 points)

Analysis of lib/src/chart/bar/base_bar_renderer_config.dart reported 1 hint:

line 110 col 17: Always override hashCode if overriding ==.

Fix additional 4 files with analysis or formatting issues. (-2 points)

Additional issues in the following files:

  • lib/src/chart/cartesian/axis/spec/percent_axis_spec.dart (1 hint)
  • lib/src/chart/common/behavior/a11y/domain_a11y_explore_behavior.dart (1 hint)
  • lib/src/chart/common/behavior/slider/slider.dart (1 hint)
  • lib/src/chart/scatter_plot/symbol_annotation_renderer.dart (1 hint)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Use constrained dependencies. (-20 points)

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

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use charts_common.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
collection ^1.14.5 1.14.11
intl ^0.15.2 0.15.7
logging any 0.11.3+2
meta ^1.1.1 1.1.6
Transitive dependencies
path 1.6.2
Dev dependencies
mockito 3.0.0-alpha
test ^0.12.0