modern_charts 0.1.12

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 84

A package for creating simple yet modern looking charts.

Five chart types

  • Bar

  • Gauge

  • Line

  • Pie

  • Radar

Canvas + DOM

modern_charts combines Canvas and DOM to achieve the best performance and experience.

  • Canvas is used to render chart contents (axes, grids, and series)
  • DOM is used to create legends and tooltips

DataTable

Data are passed to a chart via a DataTable object. By using DataTable, you can flexibly modify the data even after the chart has been rendered.

Animations

Animations are supported for different types of data modifications:

  • New data table
  • Changes to data table values
  • Insertion and removal of rows (categories)
  • Insertion and removal of columns (series)
  • Series visibility toggle

Responsive

Charts automatically resize when the browser is resized.

Interactive

  • Shows tooltips on hover/tap
  • The visibility of a series is toggled when you click the corresponding legend item

Modular

Each chart type has its own class, so your final production code only contains the code of the chart types you use.

Usage

Please read the wiki for instructions on how to use these beautiful charts.

0.1.12

  • LineChart: fix a bug causing data labels not to be displayed even when enabled

0.1.11

  • LineChart: add series:markers:enabled option
  • RadarChart: add series:markers:enabled option

0.1.10

  • All: change the default background color of legend to transparent
  • BarChart: change bar group hover effect
  • BarChart: change tooltip offset
  • BarChart: change the positions of x-axis tick marks based on whether x-axis labels are skipped or not
  • BarChart, LineChart: hide x-axis tick marks whose corresponding labels are hidden
  • BarChart, LineChart: axis label baselines are adjusted with respect to font size
  • BarChart, LineChart: fix a bug in the calculation of hovered entity group

0.1.9

  • GaugeChart: fix a bug that causes the tooltip not to show when hovering the top left quadrant
  • LineChart: adjust the position of x-axis labels so they span the whole x-axis

0.1.8

  • BarChart: add xAxis:labels:maxRotation and xAxis:labels:minRotation
  • LineChart: add xAxis:labels:maxRotation and xAxis:labels:minRotation

0.1.7

  • Fix tooltip label formatter and value formatter
  • Update README.md

0.1.6

  • Fix #10
  • Fix broken links in CHANGELOG.md
  • Enable strong mode
  • Perform code cleanup
  • Improve performance
  • animation:easing now accepts a function
  • Add DataRow.toList
  • Rename degree to rad2deg and radian to deg2rad in utils.dart
  • PieChart: Add series:counterclockwise and series:startAngle options
  • PieChart: Pie labels, if enabled, are now displayed during animations
  • PieChart: Fix tooltip position when pieHole > 0

0.1.5

  • Change the semantics of yAxis:minValue and yAxis:maxValue
  • Add tooltip:labelFormatter and legend:labelFormatter

0.1.4

  • Add a 500ms delay before resizing all charts
  • Correct gauge center and outer radius

0.1.3

  • Fix #7
  • Fix #8
  • Add yAxis:minInterval setting to BarChart, LineChart, and RadarChart
  • Perform code cleanup

0.1.2

  • Fix #5
  • Fix #6
  • Format code using dartfmt

0.1.1

  • Fixed the legend-position-none bug

0.1.0

  • Initial version

1. Depend on it

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


dependencies:
  modern_charts: "^0.1.12"

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:modern_charts/modern_charts.dart';
        
Version Uploaded Documentation Archive
0.1.12 Sep 11, 2017 Go to the documentation of modern_charts 0.1.12 Download modern_charts 0.1.12 archive
0.1.11 Aug 24, 2017 Go to the documentation of modern_charts 0.1.11 Download modern_charts 0.1.11 archive
0.1.10 Aug 21, 2017 Go to the documentation of modern_charts 0.1.10 Download modern_charts 0.1.10 archive
0.1.9 Aug 20, 2017 Go to the documentation of modern_charts 0.1.9 Download modern_charts 0.1.9 archive
0.1.8 Aug 10, 2017 Go to the documentation of modern_charts 0.1.8 Download modern_charts 0.1.8 archive
0.1.7 Jun 9, 2017 Go to the documentation of modern_charts 0.1.7 Download modern_charts 0.1.7 archive
0.1.6 Jun 8, 2017 Go to the documentation of modern_charts 0.1.6 Download modern_charts 0.1.6 archive
0.1.5 Jun 6, 2017 Go to the documentation of modern_charts 0.1.5 Download modern_charts 0.1.5 archive
0.1.4 Jun 6, 2017 Go to the documentation of modern_charts 0.1.4 Download modern_charts 0.1.4 archive
0.1.3 Jun 5, 2017 Go to the documentation of modern_charts 0.1.3 Download modern_charts 0.1.3 archive

All 13 versions...

Analysis

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

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
74 / 100
Health:
Code health derived from static analysis. [more]
94 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
94 / 100
Overall score:
Weighted score of the above. [more]
84
Learn more about scoring.

Platforms

Detected platforms: web

Primary library: package:modern_charts/modern_charts.dart with components: html.

Suggestions

  • Use constrained dependencies.

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

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 warnings 28 hints.

    Strong-mode analysis of lib/src/base.dart gave the following warning:

    line: 665 col: 26
    A function of type '(MouseEvent) → void' can't be assigned to a location of type '(dynamic) → void'.

    Strong-mode analysis of lib/src/animation.dart gave the following hint:

    line: 86 col: 22
    'PI' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/gauge.dart (hint)
    • lib/src/pie.dart (hint)
    • lib/src/radar.dart (hint)
    • lib/src/utils.dart (hint)
  • 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.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use modern_charts.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
intl any 0.15.4
Transitive dependencies
path 1.5.1
Dev dependencies
browser any