modern_charts 0.1.15

  • Installing
  • Versions
  • 88

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.15 #

  • Chart: fix a bug that happens when options is not provided to draw
  • Chart: fix an animation bug when clicking a legend item
  • test: use package test

0.1.14 #

  • BREAKING CHANGE: This version requires Dart 2.0.0 or later

0.1.13 #

  • base: charts no longer resize automatically on window resize
  • base: fixed a bug that happens when Chart.resize and Chart.update is called while the width or height of the chart is zero
  • RadarChart: fixed a bug where the tooltip is still shown when all series are hidden

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

0.1.6 #

  • Fix #10
  • Fix broken links in
  • 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

Use this package as a library

1. Depend on it

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

  modern_charts: ^0.1.15

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.17 Jan 6, 2019 Go to the documentation of modern_charts 0.1.17 Download modern_charts 0.1.17 archive
0.1.16 Dec 3, 2018 Go to the documentation of modern_charts 0.1.16 Download modern_charts 0.1.16 archive
0.1.15 Nov 29, 2018 Go to the documentation of modern_charts 0.1.15 Download modern_charts 0.1.15 archive
0.1.14 Nov 28, 2018 Go to the documentation of modern_charts 0.1.14 Download modern_charts 0.1.14 archive
0.1.13 Jul 9, 2018 Go to the documentation of modern_charts 0.1.13 Download modern_charts 0.1.13 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

All 18 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.17


Detected platforms: web

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

Health suggestions

Fix lib/src/datatable.dart. (-1 points)

Analysis of lib/src/datatable.dart reported 2 hints:

line 73 col 29: Use = to separate a named parameter from its default value.

line 157 col 3: Avoid return types on setters.

Fix lib/src/line.dart. (-0.50 points)

Analysis of lib/src/line.dart reported 1 hint:

line 338 col 62: DO use curly braces for all flow control structures.

Fix lib/src/radar.dart. (-0.50 points)

Analysis of lib/src/radar.dart reported 1 hint:

line 424 col 7: DO use curly braces for all flow control structures.

Format lib/src/pie.dart.

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

Format lib/src/utils.dart.

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

Maintenance issues and suggestions

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

At the time of the analysis the documentation field was unreachable.

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

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

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

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
intl ^0.15.7 0.15.8
Transitive dependencies
path 1.6.2
Dev dependencies
build_runner ^1.1.2
build_web_compilers ^0.4.4
test ^1.5.1