charts_flutter 0.2.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 86

Flutter Charting library

pub package

Material Design data visualization library written natively in Dart.

Supported charts

See the online gallery.

Using the library

The /example/ folder inside charts_flutter in the GitHub repo contains a full Flutter app with many demo examples.

0.2.0

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

0.1.0

Initial release.

example/lib/main.dart

// Copyright 2018 the Charts project authors. Please see the AUTHORS file
// for details.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import 'package:flutter/material.dart';
import 'app_config.dart';
import 'home.dart';

/// The main gallery app widget.
class GalleryApp extends StatefulWidget {
  GalleryApp({Key key}) : super(key: key);

  @override
  GalleryAppState createState() => new GalleryAppState();
}

/// The main gallery app state.
///
/// Controls performance overlay, and instantiates a [Home] widget.
class GalleryAppState extends State<GalleryApp> {
  // Initialize app settings from the default configuration.
  bool _showPerformanceOverlay = defaultConfig.showPerformanceOverlay;

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
        title: defaultConfig.appName,
        theme: defaultConfig.theme,
        showPerformanceOverlay: _showPerformanceOverlay,
        home: new Home(
          showPerformanceOverlay: _showPerformanceOverlay,
          onShowPerformanceOverlayChanged: (bool value) {
            setState(() {
              _showPerformanceOverlay = value;
            });
          },
        ));
  }
}

void main() {
  runApp(new GalleryApp());
}

1. Depend on it

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


dependencies:
  charts_flutter: "^0.2.0"

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:charts_flutter/flutter.dart';
        
Version Uploaded Documentation Archive
0.2.0 Apr 16, 2018 Go to the documentation of charts_flutter 0.2.0 Download charts_flutter 0.2.0 archive
0.0.1+1 Mar 23, 2018 Go to the documentation of charts_flutter 0.0.1+1 Download charts_flutter 0.0.1+1 archive
0.0.1 Mar 23, 2018 Go to the documentation of charts_flutter 0.0.1 Download charts_flutter 0.0.1 archive

Analysis

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

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6
  • Flutter: 0.3.2

Scores

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

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

  • 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.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 4 hints.

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

    line: 119 col: 63
    'ZERO' is deprecated and shouldn't be used.

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

    line: 130 col: 62
    'ZERO' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/behaviors/range_annotation.dart (hint)
    • lib/src/text_element.dart (hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0
charts_common 0.2.0 0.2.0
collection ^1.14.5 1.14.6 1.14.9
flutter 0.0.0
meta ^1.1.1 1.1.2
Transitive dependencies
intl 0.15.6
path 1.5.1
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6
Dev dependencies
flutter_test
mockito
test ^0.12.0