Charts [2148⭐] - By Google Team.

Related tags

Charts charts
Overview

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.

Comments
  • GitHub Sync (nullability support sync)

    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.

    cla: yes 
    opened by cbbraun 90
  • Is it possible to add marker/tooltip on line chart and bar chart?

    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

    opened by oneeall 83
  • Error: The getter 'body1' isn't defined for the class 'TextTheme'.

    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.

    opened by Wissperwind 28
  • Security Policy violation Binary Artifacts

    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.

    allstar 
    opened by allstar-app[bot] 23
  • Flutter 2.5+: `The getter 'body1' isn't defined for the class 'TextTheme'`

    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

    opened by Rodrigolmti 23
  • Fix warnings for Flutter 3.0 - `Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.`

    Fix warnings for Flutter 3.0 - `Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.`

    Detailed warnings:

        ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:249:27: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
         - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
            if (!SchedulerBinding.instance!.hasScheduledFrame) {
                                  ^
        ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:250:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
         - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
              SchedulerBinding.instance!.scheduleFrame();
                               ^
        ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:253:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
         - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
            SchedulerBinding.instance!.addPostFrameCallback(startAnimationController);
                             ^
        ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:276:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
         - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
            SchedulerBinding.instance!.addPostFrameCallback(doRebuild);
    

    fix #771

    opened by fzyzcjy 22
  • Error: The getter 'body1' isn't defined for the class 'TextTheme'.

    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;

    cla: yes 
    opened by SamuelMauricioL 16
  • 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'.

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

    opened by jinfagang 14
  • 0.4.0 mismatched

    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

    opened by bagintz 12
  • Can't compile the app

    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

    opened by acx70 8
  • Error on TextTheme class

    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;
    opened by mkeyyy 8
  • How to center label in top of barchart?

    How to center label in top of barchart?

    Hi I wan to show y-axis values as label on top-center of barcharts, but the lables (values provided by the labelAccessorFn) are shown in top-left side. why?

    //barchart:
    charts.BarChart(
            data(statistics),
            animate: true,
            barRendererDecorator: charts.BarLabelDecorator(
               insideLabelStyleSpec: charts.TextStyleSpec(color: charts.ColorUtil.fromDartColor(Colors.white)),
               outsideLabelStyleSpec: charts.TextStyleSpec(color: charts.ColorUtil.fromDartColor(Colors.white)),
            ),
            domainAxis: const charts.OrdinalAxisSpec(
              renderSpec: charts.SmallTickRendererSpec(
                labelRotation: 45,
                labelStyle: charts.TextStyleSpec(
                  fontSize: 18,
                  color: charts.MaterialPalette.white,
                ),
                lineStyle: charts.LineStyleSpec(
                  color: charts.MaterialPalette.white,
                ),
              ),
            ),
          ),
    
    
    //data:
    List<charts.Series<BarChartPoint, String>> data(var statistics) {
        final data = [
          for (var item in statistics.details)
            BarChartPoint(
                label: item.name, value: item.count, color: Colors.red),
        ];
        return [
          charts.Series<BarChartPoint, String>(
            id: 'barchart-id',
            colorFn: (BarChartPoint point, _) =>
                charts.ColorUtil.fromDartColor(point.color ?? Colors.white),
            domainFn: (BarChartPoint point, _) => point.label,
            measureFn: (BarChartPoint point, _) => point.value,
            data: data,
            //strokeWidthPxFn: (BarChartPoint point, _) => 64,
            labelAccessorFn: (BarChartPoint point, _) => '${point.value}', //this is not top-center (it is top-left). why?
          )
        ];
      }
    
    opened by BigGitWorld 0
  • The getter 'index' isn't defined for the class '_

    The getter 'index' isn't defined for the class '_

    The getter 'index' isn't defined for the class '_ in the listview builder ,unable to access index margin: EdgeInsets.all(45), height: mq.height*0.42, decoration: BoxDecoration( color: Selectedindex == index?Colors.green:Colors.white,

    opened by kiranb9555 0
  • 📣 This project is no longer maintained

    📣 This project is no longer maintained

    This project is no longer maintained, and will not receive further updates. We invite anyone interested in coordinating the establishment of a community-maintained fork to discuss below.

    opened by stuartmorgan 32
  • Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.  - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'

    Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'

    This is my log.

    /opt/homebrew/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:205:27:
    Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'
     ('/opt/homebrew/Caskroom/flutter/2.10.3/flutter/packages/flutter/lib/src/scheduler/binding.dart').
        if (!SchedulerBinding.instance!.hasScheduledFrame) {
                              ^
    /opt/homebrew/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:206:24:
    Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'
     ('/opt/homebrew/Caskroom/flutter/2.10.3/flutter/packages/flutter/lib/src/scheduler/binding.dart').
          SchedulerBinding.instance!.scheduleFrame();
                           ^
    /opt/homebrew/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:209:22:
    Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'
     ('/opt/homebrew/Caskroom/flutter/2.10.3/flutter/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance!.addPostFrameCallback(startAnimationController);
                         ^
    /opt/homebrew/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:232:22:
    Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'
     ('/opt/homebrew/Caskroom/flutter/2.10.3/flutter/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance!.addPostFrameCallback(doRebuild);
    
    opened by trojancode 1
Owner
Google
Google ❤️ Open Source
Google
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

Victor Choueiri 387 Dec 26, 2022
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

Victor Choueiri 255 Dec 21, 2022
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

Trent Piercy 402 Dec 21, 2022
: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

Keenan Thompson 323 Dec 21, 2022
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:

Mimene Younes 6 Jun 24, 2022
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,火币的接口可能需要翻墙,接口

gwh 259 Dec 30, 2022
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

Intkhab Ahmed 28 Nov 9, 2022
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

Man Hoang 68 Nov 4, 2022
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

Milan Zimmermann 225 Dec 25, 2022
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

Whatsupcoders 49 Oct 21, 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 & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat

Philipp Jahoda 36k Dec 28, 2022
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

null 25 Jan 1, 2023
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

zhonghua 10 Oct 25, 2022
Tiny charts 🤏 - Sparkline charts for fast data visualization on Flutter apps

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

rows 15 Dec 10, 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

Google 1.1k Jan 7, 2023
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

Gerry High 41 Feb 14, 2022
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

Cross Solutions 88 Oct 26, 2022
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

Victor Choueiri 387 Dec 26, 2022
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

Victor Choueiri 255 Dec 21, 2022
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

Trent Piercy 402 Dec 21, 2022