Charts [2148⭐] - By Google Team.

Last update: Aug 11, 2022

Charts is a general charting library, currently enabled for the Flutter mobile UI framework.

See the online gallery for supported chart types and examples of how to custom components of the chart.

Note: This is not an official Google product.

Travis CI Build Status

charts_common

charts_common pub package

A common library for charting packages.

charts_flutter

charts_flutter pub package

A charting package for Flutter, supporting both Android and iOS.

All charts packages are licensed under the Apache 2 license, see the LICENSE and AUTHORS files for details.

Development

This project is developed internally at Google and published for external consumption, external contributions unfortunately cannot be taken at this time.

GitHub

https://github.com/google/charts
Comments
  • 1. GitHub Sync (nullability support sync)

    This is an automatically generated pull request.

    Finally syncing out after someone internal generously went through and marked everything with null safety.

    Reviewed by cbbraun at 2021-06-25 23:30
  • 2. Is it possible to add marker/tooltip on line chart and bar chart?

    I have intention on looking for a specific point in a line chart of charts_flutter and then display the the marker to highlight the point after a points or bar is hit.

    My question is, Is it possible to create a widget or add some label to the line chart and bar chart?

    below is based on the my line chart example, on android apps screen shot 2018-05-21 at 15 06 20

    Reviewed by oneeall at 2018-05-21 08:12
  • 3. Error: The getter 'body1' isn't defined for the class 'TextTheme'.

    Hi,

    Please check out the most recent flutter version. body1 is deprecated and now removed. Please change to bodyText1 and make a new Version. The package is completly broken at the moment.

    Reviewed by Wissperwind at 2021-07-09 08:20
  • 4. Security Policy violation Binary Artifacts

    This issue was automatically created by Allstar.

    Security Policy Violation Project is out of compliance with Binary Artifacts policy: binaries present in source code

    Rule Description Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

    Remediation Steps To remediate, remove the generated executable artifacts from the repository.

    Artifacts Found

    • charts_flutter/example/android/gradle/wrapper/gradle-wrapper.jar

    Additional Information This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


    Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

    This issue will auto resolve when the policy is in compliance.

    Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

    Reviewed by allstar-app[bot] at 2022-04-22 23:44
  • 5. Flutter 2.5+: `The getter 'body1' isn't defined for the class 'TextTheme'`

    Hello i update my flutter version to 2.5 and there is a problem happening on this package:

    2 warnings generated.
        ../../../.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
         - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
        Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
              color ??= Theme.of(context).textTheme.body1!.color;
                                                    ^^^^^
    
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.5.0, on macOS 11.5.1 20G80 darwin-arm, locale en-BR)
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        ✗ cmdline-tools component is missing
          Run `path/to/sdkmanager --install "cmdline-tools;latest"`
          See https://developer.android.com/studio/command-line for more details.
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
    [✓] Xcode - develop for iOS and macOS
    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    [✓] Android Studio (version 2020.3)
    [✓] VS Code (version 1.60.0)
    [✓] Connected device (1 available)
    
    ! Doctor found issues in 2 categories.
    

    Seems that you are using a attr that does not exists anymore

    Reviewed by Rodrigolmti at 2021-09-09 17:39
  • 6. Error: The getter 'body1' isn't defined for the class 'TextTheme'.

    Bug thrown by the Flutter Debug Console: 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../snap/flutter/common/flutter/packages/flutter/lib/src/material/text_theme.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'. color ??= Theme.of(context).textTheme.body1!.color;

    Reviewed by SamuelMauricioL at 2021-08-14 23:41
  • 7. charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart(134,45): error GD65BB2B6: The getter 'body1' isn't defined for the class 'TextTheme'.

    charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart(134,45): error GD65BB2B6: The getter 'body1' isn't defined for the class 'TextTheme'.

    Reviewed by jinfagang at 2021-09-07 12:56
  • 8. 0.4.0 mismatched

    The published version pulled through pubspec.yaml does not contain the same code as in master? Is there something I need to do on my end, or is it just waiting for a version bump. Specifically I was trying to get the "Gauge" chart.

    Thanks

    Reviewed by bagintz at 2018-10-20 21:15
  • 9. Can't compile the app

    I get the following error when I compile my app:

    ../../../../flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.

    • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.

    FAILURE: Build failed with an exception.


    charts_flutter: ^0.11.0


    flutter --version: Flutter 2.5.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision ffb2ecea52 (7 days ago) • 2021-09-17 15:26:33 -0400 Engine • revision b3af521a05 Tools • Dart 2.14.2

    Reviewed by acx70 at 2021-09-24 14:22
  • 10. Error on TextTheme class

    I updated my flutter/dart sdk to 2.5.1... i have the latest chart library (charts_flutter: ^0.11.0) tried to run my app, got the following error:

    'TextTheme'.

    • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/Users/Probook/AppData/Local/FlutterSDK/flutter/packages/flutter/lib/src/material/text_theme.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'. color ??= Theme.of(context).textTheme.body1!.color;
    Reviewed by mkeyyy at 2021-09-23 20:39
  • 11. Update dependency on intl package

    When using the new flutter 2.0.0 version I get the following error: Because charts_flutter 0.9.0 depends on intl >=0.15.2 <0.17.0 and no versions of charts_flutter match >0.9.0 <0.10.0, charts_flutter ^0.9.0 requires intl >=0.15.2 <0.17.0.

    Is it possible to update the dependency of charts_flutter to a newer version of the intl package (>=0.17.0)?

    Reviewed by sebastianbuechler at 2021-03-04 11:07
  • 12. Negative series points are drawn outside the bounds of the domain axis

    Expected Behaviour Any series that has a point which would cross the domain axis should stop drawing the line between points at the point where it crosses the axis line.

    Actual Behaviour The line between the positive point and the negative point continues for a bit underneath the domain axis line for a few pixels which is unusual for the user when they are expecting the line to stop on the axis.

    You can see this between points 2 and 3 and then from 3 to 4: image

    Steps to Reproduce Example code

    ...
    
    @override
    Widget build(BuildContext context) {
        return charts.LineChart(
            [
                charts.Series<_Test, num>(
                    id: 'Test',
                    data: [
                        _Test(0, 1),
                        _Test(1, 3),
                        _Test(2, -1),
                        _Test(3, 5),
                        _Test(4, 2),
                    ],
                    domainFn: (_Test test, _) => test.x,
                    measureFn: (_Test test, _) => test.y,
                    measureLowerBoundFn: (_, __) => 0,
                    measureOffsetFn: (_, __) => 0,
                ),
            ],
            primaryMeasureAxis: const charts.NumericAxisSpec(
                showAxisLine: true,
                viewport: charts.NumericExtents(0, 10),
            ),
        );
    }
    
    ...
    
    class _Test {
      final int x;
    
      final int y;
    
      _Test(this.x, this.y);
    }
    

    I can't see if there is an offset that is being applied to the domain axis line. If someone is able to show a method of stopping this happening it would be appreciated.

    Reviewed by Stephen-Ross at 2022-08-03 13:21
  • 13. Bump tzinfo from 1.2.5 to 1.2.10 in /docs

    Bumps tzinfo from 1.2.5 to 1.2.10.

    Release notes

    Sourced from tzinfo's releases.

    v1.2.10

    TZInfo v1.2.10 on RubyGems.org

    v1.2.9

    • Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.

    TZInfo v1.2.9 on RubyGems.org

    v1.2.8

    • Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. The 64-bit section is now always used regardless of whether Time has support for 64-bit times. #120.
    • Rubinius is no longer supported.

    TZInfo v1.2.8 on RubyGems.org

    v1.2.7

    • Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
    • Fixed warnings when running on Ruby 2.8. #112.

    TZInfo v1.2.7 on RubyGems.org

    v1.2.6

    • Timezone#strftime('%s', time) will now return the correct number of seconds since the epoch. #91.
    • Removed the unused TZInfo::RubyDataSource::REQUIRE_PATH constant.
    • Fixed "SecurityError: Insecure operation - require" exceptions when loading data with recent Ruby releases in safe mode.
    • Fixed warnings when running on Ruby 2.7. #106 and #111.

    TZInfo v1.2.6 on RubyGems.org

    Changelog

    Sourced from tzinfo's changelog.

    Version 1.2.10 - 19-Jul-2022

    Version 1.2.9 - 16-Dec-2020

    • Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.

    Version 1.2.8 - 8-Nov-2020

    • Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. The 64-bit section is now always used regardless of whether Time has support for 64-bit times. #120.
    • Rubinius is no longer supported.

    Version 1.2.7 - 2-Apr-2020

    • Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
    • Fixed warnings when running on Ruby 2.8. #112.

    Version 1.2.6 - 24-Dec-2019

    • Timezone#strftime('%s', time) will now return the correct number of seconds since the epoch. #91.
    • Removed the unused TZInfo::RubyDataSource::REQUIRE_PATH constant.
    • Fixed "SecurityError: Insecure operation - require" exceptions when loading data with recent Ruby releases in safe mode.
    • Fixed warnings when running on Ruby 2.7. #106 and #111.
    Commits
    • 0814dcd Fix the release date.
    • fd05e2a Preparing v1.2.10.
    • b98c32e Merge branch 'fix-directory-traversal-1.2' into 1.2
    • ac3ee68 Remove unnecessary escaping of + within regex character classes.
    • 9d49bf9 Fix relative path loading tests.
    • 394c381 Remove private_constant for consistency and compatibility.
    • 5e9f990 Exclude Arch Linux's SECURITY file from the time zone index.
    • 17fc9e1 Workaround for 'Permission denied - NUL' errors with JRuby on Windows.
    • 6bd7a51 Update copyright years.
    • 9905ca9 Fix directory traversal in Timezone.get when using Ruby data source
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Reviewed by dependabot[bot] at 2022-07-22 01:27
  • 14. "Null check operator used on a null value" on legend with measures

    When we set legendDefaultMesaure different than none and we want to toggle show\hide series on legend we got this error : bar-chart-on-tap bug-hide-series-on-legend

    Here is the code of my graph :

    class GroupedBarChart extends StatelessWidget {
      final List<charts.Series<dynamic, String>> seriesList;
    
      const GroupedBarChart({Key? key, required this.seriesList}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return charts.BarChart(seriesList,
            animate: true,
            barGroupingType: charts.BarGroupingType.grouped,
            behaviors: [
              charts.SeriesLegend(
                  position: charts.BehaviorPosition.top,
                  horizontalFirst: true,
                  cellPadding: const EdgeInsets.only(right: 16),
                  showMeasures: true,
                  legendDefaultMeasure: charts.LegendDefaultMeasure.sum,
                  measureFormatter: (num? value) {
                    return value == null ? '-' : value.round().toString();
                  }),
            ]);
      }
    }
    
    Reviewed by LamsaLL at 2022-07-21 13:58
  • 15. StaticOrdinalTickProviderSpec should have a desiredTickCount.

    There should be a way to statically define how many ticks you can show. Right now you can only create OrdinalAxisSpec that dynamically chooses the number of ticks based on the extents of the data.

    Reviewed by madz at 2022-07-03 14:48

Related

Animated radial and pie charts for Flutter
Animated radial and pie charts for Flutter

Flutter Circular Chart A library for creating animated circular chart widgets with Flutter, inspired by Zero to One with Flutter. Overview Create easi

Aug 6, 2022
Beautiful sparkline charts for Flutter
Beautiful sparkline charts for Flutter

flutter_sparkline Beautiful sparkline charts for Flutter. Installation Install the latest version from pub. Quick Start Import the package, create a S

Jul 31, 2022
Elegant OHLC Candlestick and Trade Volume charts for @Flutter
Elegant OHLC Candlestick and Trade Volume charts for @Flutter

flutter_candlesticks Elegant OHLC Candlestick and Trade Volume charts for Flutter Usage Install for Flutter with pub. Property Description data Requir

Aug 7, 2022
:bar_chart: [wip] Create beautiful, responsive, animated charts using a simple and intuitive API.
:bar_chart: [wip] Create beautiful, responsive, animated charts using a simple and intuitive API.

fcharts A work-in-progress chart library for Flutter. Until version 1.0.0 the API is subject to change drastically. Needless to say, fcharts is not pr

Jul 14, 2022
A library to draw fantastic bar charts race in Flutter
A library to draw fantastic bar charts race in Flutter

bar_chart_race The first library to draw fantastic bar charts race in Flutter Usage Let's get started add the dependencies to your app: dependencies:

Jun 24, 2022
Flutter chart library contains depth charts supporting various indicators and zooming
Flutter chart library contains depth charts supporting various indicators and zooming

flutter_k_chart 介绍 一个仿火币的flutter图表库包含深度图,支持各种指标及放大缩小、平移等操作 webdemo演示 Demo v0.1.0:下载 APK 演示 简单用例 1.在 pubspec.yaml 中添加依赖 本项目数据来自火币openApi,火币的接口可能需要翻墙,接口

Aug 1, 2022
A flutter package which makes it easier to plot different types of charts with lots of customization, made purely in dart
A flutter package which makes it easier to plot different types of charts with lots of customization, made purely in dart

multi_charts It is a library that provides different types of charts to plot data points. Currently it supports only Radar Chart, but will support mor

Mar 29, 2022
Flutter package for creating simple yet modern looking charts
Flutter package for creating simple yet modern looking charts

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

May 2, 2022
Charts Library for Flutter, written in Dart with Flutter.
Charts Library for Flutter, written in Dart with Flutter.

Table of Contents New in the current release Illustration of the new "iterative auto layout" feature Autolayout step 1 Autolayout step 2 Autolayout st

Aug 6, 2022
In this project you will see how to generate charts with the data from the Firestore.
In this project you will see how to generate charts with the data from the Firestore.

FlutterChartFirestore Flutter Tutorial - Flutter Charts+Firestore Video series can be watched here https://youtu.be/HGkbPrTSndM Getting Started In thi

Jun 1, 2022
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

⚡ A powerful & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat

Aug 11, 2022
Flutter Cryptocurrency Charts application based on Clean Architecture.
Flutter Cryptocurrency Charts application based on Clean Architecture.

About the project The purpose of this project is to develop the best Cryptocurrency, markets data and charts experience. This project has been built u

Jul 21, 2022
kg_charts icon library. At present, there are only radar charts
kg_charts icon library. At present, there are only radar charts

kg_charts icon library. At present, there are only radar charts. Other types of charts may be added later

May 22, 2022
Tiny charts 🤏 - Sparkline charts for fast data visualization on Flutter apps

Tiny charts ?? - Sparkline charts for fast data visualization on Flutter apps

Aug 3, 2022
Various Flutter widgets that are developed by Google but not by the core Flutter team

Flutter widgets This repository contains the source code for various Flutter widgets that are developed by Google but not by the core Flutter team. Is

Aug 17, 2022
A Flutter example to use Google Maps in iOS and Android apps via the embedded Google Maps plugin Google Maps Plugin
A Flutter example to use Google Maps in iOS and Android apps via the embedded Google Maps plugin Google Maps Plugin

maps_demo A Flutter example to use Google Maps in iOS and Android apps via the embedded Google Maps plugin Google Maps Plugin Getting Started Get an A

Feb 14, 2022
A note-taking app powered by Google services such as Google Sign In, Google Drive, and Firebase ML Vision.
A note-taking app powered by Google services such as Google Sign In, Google Drive, and Firebase ML Vision.

Smart Notes A note-taking app powered by Google services such as Google Sign In, Google Drive, and Firebase ML Vision. This is an official entry to Fl

Aug 16, 2022
Animated radial and pie charts for Flutter
Animated radial and pie charts for Flutter

Flutter Circular Chart A library for creating animated circular chart widgets with Flutter, inspired by Zero to One with Flutter. Overview Create easi

Aug 6, 2022
Beautiful sparkline charts for Flutter
Beautiful sparkline charts for Flutter

flutter_sparkline Beautiful sparkline charts for Flutter. Installation Install the latest version from pub. Quick Start Import the package, create a S

Jul 31, 2022
Elegant OHLC Candlestick and Trade Volume charts for @Flutter
Elegant OHLC Candlestick and Trade Volume charts for @Flutter

flutter_candlesticks Elegant OHLC Candlestick and Trade Volume charts for Flutter Usage Install for Flutter with pub. Property Description data Requir

Aug 7, 2022