diff --git a/charts_flutter/example/android.iml b/charts_flutter/example/android.iml
deleted file mode 100644
index 462b903e0..000000000
--- a/charts_flutter/example/android.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/android/.gitignore b/charts_flutter/example/android/.gitignore
deleted file mode 100644
index 65b7315af..000000000
--- a/charts_flutter/example/android/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.iml
-*.class
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-GeneratedPluginRegistrant.java
diff --git a/charts_flutter/example/android/Android_Charts.xml b/charts_flutter/example/android/Android_Charts.xml
deleted file mode 100644
index fd24220e3..000000000
--- a/charts_flutter/example/android/Android_Charts.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/charts_flutter/example/android/app/build.gradle b/charts_flutter/example/android/app/build.gradle
deleted file mode 100644
index ca84ef17c..000000000
--- a/charts_flutter/example/android/app/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-def localProperties = new Properties()
-def localPropertiesFile = rootProject.file('local.properties')
-if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
-}
-
-def flutterRoot = localProperties.getProperty('flutter.sdk')
-if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
-}
-
-apply plugin: 'com.android.application'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
-
-android {
- compileSdkVersion 28
-
- lintOptions {
- disable 'InvalidPackage'
- }
-
- defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.example.examples"
- minSdkVersion 16
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
-
- buildTypes {
- release {
- // TODO: Add your own signing config for the release build.
- // Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.debug
- }
- }
-}
-
-flutter {
- source '../..'
-}
-
-dependencies {
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
-}
diff --git a/charts_flutter/example/android/app/src/main/AndroidManifest.xml b/charts_flutter/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 9144147c6..000000000
--- a/charts_flutter/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/android/app/src/main/java/com/example/examples/MainActivity.java b/charts_flutter/example/android/app/src/main/java/com/example/examples/MainActivity.java
deleted file mode 100644
index 89a83b2e9..000000000
--- a/charts_flutter/example/android/app/src/main/java/com/example/examples/MainActivity.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.example.examples;
-
-import android.os.Bundle;
-
-import io.flutter.app.FlutterActivity;
-import io.flutter.plugins.GeneratedPluginRegistrant;
-
-/**
- * FlutterActivity
- */
-public class MainActivity extends FlutterActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- GeneratedPluginRegistrant.registerWith(this);
- }
-}
diff --git a/charts_flutter/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/charts_flutter/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
deleted file mode 100644
index d007606a4..000000000
--- a/charts_flutter/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package io.flutter.plugins;
-
-import io.flutter.plugin.common.PluginRegistry;
-
-/**
- * Generated file. Do not edit.
- */
-public final class GeneratedPluginRegistrant {
- public static void registerWith(PluginRegistry registry) {
- if (alreadyRegisteredWith(registry)) {
- return;
- }
- }
-
- private static boolean alreadyRegisteredWith(PluginRegistry registry) {
- final String key = GeneratedPluginRegistrant.class.getCanonicalName();
- if (registry.hasPlugin(key)) {
- return true;
- }
- registry.registrarFor(key);
- return false;
- }
-}
diff --git a/charts_flutter/example/android/app/src/main/res/drawable/launch_background.xml b/charts_flutter/example/android/app/src/main/res/drawable/launch_background.xml
deleted file mode 100644
index 304732f88..000000000
--- a/charts_flutter/example/android/app/src/main/res/drawable/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/charts_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index db77bb4b7..000000000
Binary files a/charts_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/charts_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/charts_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 17987b79b..000000000
Binary files a/charts_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/charts_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/charts_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 09d439148..000000000
Binary files a/charts_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/charts_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/charts_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index d5f1c8d34..000000000
Binary files a/charts_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/charts_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/charts_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 4d6372eeb..000000000
Binary files a/charts_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/charts_flutter/example/android/app/src/main/res/values/styles.xml b/charts_flutter/example/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index 00fa4417c..000000000
--- a/charts_flutter/example/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
diff --git a/charts_flutter/example/android/build.gradle b/charts_flutter/example/android/build.gradle
deleted file mode 100644
index 6de372893..000000000
--- a/charts_flutter/example/android/build.gradle
+++ /dev/null
@@ -1,29 +0,0 @@
-buildscript {
- repositories {
- google()
- jcenter()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.3'
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-rootProject.buildDir = '../build'
-subprojects {
- project.buildDir = "${rootProject.buildDir}/${project.name}"
-}
-subprojects {
- project.evaluationDependsOn(':app')
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/charts_flutter/example/android/gradle.properties b/charts_flutter/example/android/gradle.properties
deleted file mode 100644
index 38c8d4544..000000000
--- a/charts_flutter/example/android/gradle.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-org.gradle.jvmargs=-Xmx1536M
-android.enableR8=true
-android.useAndroidX=true
-android.enableJetifier=true
diff --git a/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.jar b/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372aef5..000000000
Binary files a/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.properties b/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 6bb8b5217..000000000
--- a/charts_flutter/example/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Feb 19 15:38:12 AWST 2020
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/charts_flutter/example/android/gradlew b/charts_flutter/example/android/gradlew
deleted file mode 100755
index 9d82f7891..000000000
--- a/charts_flutter/example/android/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/charts_flutter/example/android/gradlew.bat b/charts_flutter/example/android/gradlew.bat
deleted file mode 100644
index 8a0b282aa..000000000
--- a/charts_flutter/example/android/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/charts_flutter/example/android/settings.gradle b/charts_flutter/example/android/settings.gradle
deleted file mode 100644
index 5a2f14fb1..000000000
--- a/charts_flutter/example/android/settings.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-include ':app'
-
-def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
-
-def plugins = new Properties()
-def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
-if (pluginsFile.exists()) {
- pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
-}
-
-plugins.each { name, path ->
- def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
- include ":$name"
- project(":$name").projectDir = pluginDirectory
-}
diff --git a/charts_flutter/example/examples.iml b/charts_flutter/example/examples.iml
deleted file mode 100644
index 4881df8ae..000000000
--- a/charts_flutter/example/examples.iml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/charts_flutter/example/examples_android.iml b/charts_flutter/example/examples_android.iml
deleted file mode 100644
index 0ca70ed93..000000000
--- a/charts_flutter/example/examples_android.iml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/ios/Flutter/AppFrameworkInfo.plist b/charts_flutter/example/ios/Flutter/AppFrameworkInfo.plist
deleted file mode 100644
index 6c2de8086..000000000
--- a/charts_flutter/example/ios/Flutter/AppFrameworkInfo.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- App
- CFBundleIdentifier
- io.flutter.flutter.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- App
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1.0
- UIRequiredDeviceCapabilities
-
- arm64
-
- MinimumOSVersion
- 8.0
-
-
diff --git a/charts_flutter/example/ios/Flutter/Debug.xcconfig b/charts_flutter/example/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index 592ceee85..000000000
--- a/charts_flutter/example/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/charts_flutter/example/ios/Flutter/Release.xcconfig b/charts_flutter/example/ios/Flutter/Release.xcconfig
deleted file mode 100644
index 592ceee85..000000000
--- a/charts_flutter/example/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/charts_flutter/example/ios/Ios_Charts.xml b/charts_flutter/example/ios/Ios_Charts.xml
deleted file mode 100644
index 29fdd556c..000000000
--- a/charts_flutter/example/ios/Ios_Charts.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/charts_flutter/example/ios/Runner.xcodeproj/project.pbxproj b/charts_flutter/example/ios/Runner.xcodeproj/project.pbxproj
deleted file mode 100644
index 0c51fe592..000000000
--- a/charts_flutter/example/ios/Runner.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,436 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
- 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
- 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
- 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
- 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
- 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
- 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
- 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
- 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
- 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
- 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 97C146EB1CF9000F007C117D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
- 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 9740EEB11CF90186004384FC /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
- 3B80C3931E831B6300D905FE /* App.framework */,
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEBA1CF902C7004384FC /* Flutter.framework */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 9740EEB31CF90195004384FC /* Generated.xcconfig */,
- );
- name = Flutter;
- sourceTree = "";
- };
- 97C146E51CF9000F007C117D = {
- isa = PBXGroup;
- children = (
- 9740EEB11CF90186004384FC /* Flutter */,
- 97C146F01CF9000F007C117D /* Runner */,
- 97C146EF1CF9000F007C117D /* Products */,
- CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
- );
- sourceTree = "";
- };
- 97C146EF1CF9000F007C117D /* Products */ = {
- isa = PBXGroup;
- children = (
- 97C146EE1CF9000F007C117D /* Runner.app */,
- );
- name = Products;
- sourceTree = "";
- };
- 97C146F01CF9000F007C117D /* Runner */ = {
- isa = PBXGroup;
- children = (
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
- 97C146FA1CF9000F007C117D /* Main.storyboard */,
- 97C146FD1CF9000F007C117D /* Assets.xcassets */,
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
- 97C147021CF9000F007C117D /* Info.plist */,
- 97C146F11CF9000F007C117D /* Supporting Files */,
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- );
- path = Runner;
- sourceTree = "";
- };
- 97C146F11CF9000F007C117D /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 97C146F21CF9000F007C117D /* main.m */,
- );
- name = "Supporting Files";
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 97C146ED1CF9000F007C117D /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 9740EEB61CF901F6004384FC /* Run Script */,
- 97C146EA1CF9000F007C117D /* Sources */,
- 97C146EB1CF9000F007C117D /* Frameworks */,
- 97C146EC1CF9000F007C117D /* Resources */,
- 9705A1C41CF9048500538489 /* Embed Frameworks */,
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Runner;
- productName = Runner;
- productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 97C146E61CF9000F007C117D /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0910;
- ORGANIZATIONNAME = "The Chromium Authors";
- TargetAttributes = {
- 97C146ED1CF9000F007C117D = {
- CreatedOnToolsVersion = 7.3.1;
- };
- };
- };
- buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 97C146E51CF9000F007C117D;
- productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 97C146ED1CF9000F007C117D /* Runner */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 97C146EC1CF9000F007C117D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Thin Binary";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
- };
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 97C146EA1CF9000F007C117D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
- 97C146F31CF9000F007C117D /* main.m in Sources */,
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C146FB1CF9000F007C117D /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "";
- };
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C147001CF9000F007C117D /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 97C147031CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 97C147041CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 97C147061CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- ARCHS = arm64;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.examples;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- 97C147071CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ARCHS = arm64;
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.examples;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147031CF9000F007C117D /* Debug */,
- 97C147041CF9000F007C117D /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147061CF9000F007C117D /* Debug */,
- 97C147071CF9000F007C117D /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 97C146E61CF9000F007C117D /* Project object */;
-}
diff --git a/charts_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/charts_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 21a3cc14c..000000000
--- a/charts_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/charts_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
deleted file mode 100644
index 89550f6ac..000000000
--- a/charts_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/ios/Runner/AppDelegate.h b/charts_flutter/example/ios/Runner/AppDelegate.h
deleted file mode 100644
index 3fbf7a5f6..000000000
--- a/charts_flutter/example/ios/Runner/AppDelegate.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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
-
-@interface AppDelegate : UIResponder
-
-@property(strong, nonatomic) UIWindow *window;
-
-@end
diff --git a/charts_flutter/example/ios/Runner/AppDelegate.m b/charts_flutter/example/ios/Runner/AppDelegate.m
deleted file mode 100644
index b87ca493f..000000000
--- a/charts_flutter/example/ios/Runner/AppDelegate.m
+++ /dev/null
@@ -1,58 +0,0 @@
-// 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.
-
-#include "AppDelegate.h"
-#import
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application
- didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
- return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication *)application {
- // Sent when the application is about to move from active to inactive state. This can occur for
- // certain types of temporary interruptions (such as an incoming phone call or SMS message) or
- // when the user quits the application and it begins the transition to the background state.
- // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame
- // rates. Games should use this method to pause the game.
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- // Use this method to release shared resources, save user data, invalidate timers, and store
- // enough application state information to restore your application to its current state in case
- // it is terminated later.
- // If your application supports background execution, this method is called instead of
- // applicationWillTerminate: when the user quits.
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application {
- // Called as part of the transition from the background to the inactive state; here you can undo
- // many of the changes made on entering the background.
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- // Restart any tasks that were paused (or not yet started) while the application was inactive.
- // If the application was previously in the background, optionally refresh the user interface.
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application {
- // Called when the application is about to terminate. Save data if appropriate. See also
- // applicationDidEnterBackground:.
-}
-
-@end
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 033a07274..000000000
--- a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "images" : [
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-Small@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-Small-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-Small-40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-Small.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-Small@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Small-40.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-Small-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-83.5@2x.png",
- "scale" : "2x"
- }
- ]
-}
\ No newline at end of file
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
deleted file mode 100644
index c767e73ae..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
deleted file mode 100644
index b41356db3..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png
deleted file mode 100644
index de0a6dfbc..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
deleted file mode 100644
index 7c391945a..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
deleted file mode 100644
index 2f594d0e3..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png
deleted file mode 100644
index 31693a3d9..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png
deleted file mode 100644
index fec316a13..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png
deleted file mode 100644
index c767e73ae..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
deleted file mode 100644
index 7abec8c8c..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
deleted file mode 100644
index 426123bcf..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
deleted file mode 100644
index 77f04fac4..000000000
Binary files a/charts_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png and /dev/null differ
diff --git a/charts_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/charts_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index ebf48f603..000000000
--- a/charts_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/ios/Runner/Base.lproj/Main.storyboard b/charts_flutter/example/ios/Runner/Base.lproj/Main.storyboard
deleted file mode 100644
index f3c28516f..000000000
--- a/charts_flutter/example/ios/Runner/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/charts_flutter/example/ios/Runner/Info.plist b/charts_flutter/example/ios/Runner/Info.plist
deleted file mode 100644
index 677c2dc52..000000000
--- a/charts_flutter/example/ios/Runner/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- Charts Flutter Gallery
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UIRequiredDeviceCapabilities
-
- arm64
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
-
-
diff --git a/charts_flutter/example/ios/Runner/main.m b/charts_flutter/example/ios/Runner/main.m
deleted file mode 100644
index 8759ed8d7..000000000
--- a/charts_flutter/example/ios/Runner/main.m
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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
-#import
-#import "AppDelegate.h"
-
-int main(int argc, char* argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}
diff --git a/charts_flutter/example/lib/a11y/a11y_gallery.dart b/charts_flutter/example/lib/a11y/a11y_gallery.dart
deleted file mode 100644
index c5d4b5f71..000000000
--- a/charts_flutter/example/lib/a11y/a11y_gallery.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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 '../gallery_scaffold.dart';
-import 'domain_a11y_explore_bar_chart.dart';
-
-List buildGallery() {
- return [
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.accessibility),
- title: 'Screen reader enabled bar chart',
- subtitle: 'Requires TalkBack or Voiceover turned on to work. '
- 'Bar chart with domain selection explore mode behavior.',
- childBuilder: () => new DomainA11yExploreBarChart.withRandomData(),
- ),
- ];
-}
diff --git a/charts_flutter/example/lib/a11y/domain_a11y_explore_bar_chart.dart b/charts_flutter/example/lib/a11y/domain_a11y_explore_bar_chart.dart
deleted file mode 100644
index d02f2e87c..000000000
--- a/charts_flutter/example/lib/a11y/domain_a11y_explore_bar_chart.dart
+++ /dev/null
@@ -1,215 +0,0 @@
-// 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.
-
-/// Example of a bar chart with domain selection A11y behavior.
-///
-/// The OS screen reader (TalkBack / VoiceOver) setting must be turned on, or
-/// the behavior does not do anything.
-///
-/// Note that the screenshot does not show any visual differences but when the
-/// OS screen reader is enabled, the node that is being read out loud will be
-/// surrounded by a rectangle.
-///
-/// When [DomainA11yExploreBehavior] is added to the chart, the chart will
-/// listen for the gesture that triggers "explore mode".
-/// "Explore mode" creates semantic nodes for each domain value in the chart
-/// with a description (customizable, defaults to domain value) and a bounding
-/// box that surrounds the domain.
-///
-/// These semantic node descriptions are read out loud by the OS screen reader
-/// when the user taps within the bounding box, or when the user cycles through
-/// the screen's elements (such as swiping left and right).
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class DomainA11yExploreBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- DomainA11yExploreBarChart(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- factory DomainA11yExploreBarChart.withSampleData() {
- return new DomainA11yExploreBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory DomainA11yExploreBarChart.withRandomData() {
- return new DomainA11yExploreBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final mobileData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tabletData = [
- // Purposely missing data to show that only measures that are available
- // are vocalized.
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Mobile Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileData,
- ),
- new charts.Series(
- id: 'Tablet Sales',
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tabletData,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- /// An example of how to generate a customized vocalization for
- /// [DomainA11yExploreBehavior] from a list of [SeriesDatum]s.
- ///
- /// The list of series datums is for one domain.
- ///
- /// This example vocalizes the domain, then for each series that has that
- /// domain, it vocalizes the series display name and the measure and a
- /// description of that measure.
- String vocalizeDomainAndMeasures(List seriesDatums) {
- final buffer = new StringBuffer();
-
- // The datum's type in this case is [OrdinalSales].
- // So we can access year and sales information here.
- buffer.write(seriesDatums.first.datum.year);
-
- for (charts.SeriesDatum seriesDatum in seriesDatums) {
- final series = seriesDatum.series;
- final datum = seriesDatum.datum;
-
- buffer.write(' ${series.displayName} '
- '${datum.sales / 1000} thousand dollars');
- }
-
- return buffer.toString();
- }
-
- @override
- Widget build(BuildContext context) {
- return new Semantics(
- // Describe your chart
- label: 'Yearly sales bar chart',
- // Optionally provide a hint for the user to know how to trigger
- // explore mode.
- hint: 'Press and hold to enable explore',
- child: new charts.BarChart(
- seriesList,
- animate: animate,
- // To prevent conflict with the select nearest behavior that uses the
- // tap gesture, turn off default interactions when the user is using
- // an accessibility service like TalkBack or VoiceOver to interact
- // with the application.
- defaultInteractions: !MediaQuery.of(context).accessibleNavigation,
- behaviors: [
- new charts.DomainA11yExploreBehavior(
- // Callback for generating the message that is vocalized.
- // An example of how to use is in [vocalizeDomainAndMeasures].
- // If none is set, the default only vocalizes the domain value.
- vocalizationCallback: vocalizeDomainAndMeasures,
- // The following settings are optional, but shown here for
- // demonstration purchases.
- // [exploreModeTrigger] Default is press and hold, can be
- // changed to tap.
- exploreModeTrigger: charts.ExploreModeTrigger.pressHold,
- // [exploreModeEnabledAnnouncement] Optionally notify the OS
- // when explore mode is enabled.
- exploreModeEnabledAnnouncement: 'Explore mode enabled',
- // [exploreModeDisabledAnnouncement] Optionally notify the OS
- // when explore mode is disabled.
- exploreModeDisabledAnnouncement: 'Explore mode disabled',
- // [minimumWidth] Default and minimum is 1.0. This is the
- // minimum width of the screen reader bounding box. The bounding
- // box width is calculated based on the domain axis step size.
- // Minimum width will be used if the step size is smaller.
- minimumWidth: 1.0,
- ),
- // Optionally include domain highlighter as a behavior.
- // This behavior is included in this example to show that when an
- // a11y node has focus, the chart's internal selection model is
- // also updated.
- new charts.DomainHighlighter(charts.SelectionModelType.info),
- ],
- ));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final mobileData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tabletData = [
- // Purposely missing data to show that only measures that are available
- // are vocalized.
- new OrdinalSales('2016', 25),
- new OrdinalSales('2017', 50),
- ];
-
- return [
- new charts.Series(
- id: 'Mobile Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileData,
- ),
- new charts.Series(
- id: 'Tablet Sales',
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tabletData,
- )
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/app_config.dart b/charts_flutter/example/lib/app_config.dart
deleted file mode 100644
index a0a91e917..000000000
--- a/charts_flutter/example/lib/app_config.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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';
-
-/// A particular configuration of the app.
-class AppConfig {
- final String appName;
- final String appLink;
- final ThemeData theme;
- final bool showPerformanceOverlay;
-
- AppConfig({
- required this.appName,
- required this.appLink,
- required this.theme,
- required this.showPerformanceOverlay,
- });
-}
-
-/// The default configuration of the app.
-AppConfig get defaultConfig {
- return new AppConfig(
- appName: 'Charts Gallery',
- appLink: '',
- theme: new ThemeData(
- brightness: Brightness.light,
- primarySwatch: Colors.lightBlue,
- ),
- showPerformanceOverlay: false,
- );
-}
diff --git a/charts_flutter/example/lib/axes/axes_gallery.dart b/charts_flutter/example/lib/axes/axes_gallery.dart
deleted file mode 100644
index f192e2c7e..000000000
--- a/charts_flutter/example/lib/axes/axes_gallery.dart
+++ /dev/null
@@ -1,137 +0,0 @@
-// 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 '../gallery_scaffold.dart';
-import 'bar_secondary_axis.dart';
-import 'bar_secondary_axis_only.dart';
-import 'custom_axis_tick_formatters.dart';
-import 'custom_font_size_and_color.dart';
-import 'custom_measure_tick_count.dart';
-import 'gridline_dash_pattern.dart';
-import 'hidden_ticks_and_labels_axis.dart';
-import 'horizontal_bar_secondary_axis.dart';
-import 'integer_only_measure_axis.dart';
-import 'line_disjoint_axis.dart';
-import 'measure_axis_label_alignment.dart';
-import 'numeric_initial_viewport.dart';
-import 'nonzero_bound_measure_axis.dart';
-import 'ordinal_initial_viewport.dart';
-import 'short_tick_length_axis.dart';
-import 'statically_provided_ticks.dart';
-
-List buildGallery() {
- return [
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Bar chart with Secondary Measure Axis',
- subtitle: 'Bar chart with a series using a secondary measure axis',
- childBuilder: () => new BarChartWithSecondaryAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Bar chart with Secondary Measure Axis only',
- subtitle: 'Bar chart with both series using secondary measure axis',
- childBuilder: () => new BarChartWithSecondaryAxisOnly.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Horizontal bar chart with Secondary Measure Axis',
- subtitle:
- 'Horizontal Bar chart with a series using secondary measure axis',
- childBuilder: () =>
- new HorizontalBarChartWithSecondaryAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Short Ticks Axis',
- subtitle: 'Bar chart with the primary measure axis having short ticks',
- childBuilder: () => new ShortTickLengthAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Custom Axis Fonts',
- subtitle: 'Bar chart with custom axis font size and color',
- childBuilder: () => new CustomFontSizeAndColor.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Label Alignment Axis',
- subtitle: 'Bar chart with custom measure axis label alignments',
- childBuilder: () => new MeasureAxisLabelAlignment.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'No Axis',
- subtitle: 'Bar chart with only the axis line drawn',
- childBuilder: () => new HiddenTicksAndLabelsAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Statically Provided Ticks',
- subtitle: 'Bar chart with statically provided ticks',
- childBuilder: () => new StaticallyProvidedTicks.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Custom Formatter',
- subtitle: 'Timeseries with custom domain and measure tick formatters',
- childBuilder: () => new CustomAxisTickFormatters.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Custom Tick Count',
- subtitle: 'Timeseries with custom measure axis tick count',
- childBuilder: () => new CustomMeasureTickCount.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Integer Measure Ticks',
- subtitle: 'Timeseries with only whole number measure axis ticks',
- childBuilder: () => new IntegerOnlyMeasureAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Non-zero bound Axis',
- subtitle: 'Timeseries with measure axis that does not include zero',
- childBuilder: () => new NonzeroBoundMeasureAxis.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Ordinal axis with initial viewport',
- subtitle: 'Single series with initial viewport',
- childBuilder: () => new OrdinalInitialViewport.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Numeric axis with initial viewport',
- subtitle: 'Initial viewport is set to a subset of the data',
- childBuilder: () => new NumericInitialViewport.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Gridline dash pattern',
- subtitle: 'Timeseries with measure gridlines that have a dash pattern',
- childBuilder: () => new GridlineDashPattern.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.show_chart),
- title: 'Disjoint Measure Axes',
- subtitle: 'Line chart with disjoint measure axes',
- childBuilder: () => new DisjointMeasureAxisLineChart.withRandomData(),
- ),
- ];
-}
diff --git a/charts_flutter/example/lib/axes/bar_secondary_axis.dart b/charts_flutter/example/lib/axes/bar_secondary_axis.dart
deleted file mode 100644
index 085acd202..000000000
--- a/charts_flutter/example/lib/axes/bar_secondary_axis.dart
+++ /dev/null
@@ -1,158 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using a primary and secondary axis (left & right respectively)
-/// for a set of grouped bars. This is useful for comparing Series that have
-/// different units (revenue vs clicks by region), or different magnitudes (2017
-/// revenue vs 1/1/2017 revenue by region).
-///
-/// The first series plots using the primary axis to position its measure
-/// values (bar height). This is the default axis used if the measureAxisId is
-/// not set.
-///
-/// The second series plots using the secondary axis due to the measureAxisId of
-/// secondaryMeasureAxisId.
-///
-/// Note: primary and secondary may flip left and right positioning when
-/// RTL.flipAxisLocations is set.
-class BarChartWithSecondaryAxis extends StatelessWidget {
- static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
- final List> seriesList;
- final bool animate;
-
- BarChartWithSecondaryAxis(this.seriesList, {this.animate = false});
-
- factory BarChartWithSecondaryAxis.withSampleData() {
- return new BarChartWithSecondaryAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory BarChartWithSecondaryAxis.withRandomData() {
- return new BarChartWithSecondaryAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- final losAngelesSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- new charts.Series(
- id: 'Los Angeles Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: losAngelesSalesData,
- )..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId)
- // Set the 'Los Angeles Revenue' series to use the secondary measure axis.
- // All series that have this set will use the secondary measure axis.
- // All other series will use the primary measure axis.
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- // It is important when using both primary and secondary axes to choose
- // the same number of ticks for both sides to get the gridlines to line
- // up.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(desiredTickCount: 3)),
- secondaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(desiredTickCount: 3)),
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- final losAngelesSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- new charts.Series(
- id: 'Los Angeles Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: losAngelesSalesData,
- )..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId)
- // Set the 'Los Angeles Revenue' series to use the secondary measure axis.
- // All series that have this set will use the secondary measure axis.
- // All other series will use the primary measure axis.
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/bar_secondary_axis_only.dart b/charts_flutter/example/lib/axes/bar_secondary_axis_only.dart
deleted file mode 100644
index b205b1d38..000000000
--- a/charts_flutter/example/lib/axes/bar_secondary_axis_only.dart
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using only a secondary axis (on the right) for a set of grouped
-/// bars.
-///
-/// Both series plots using the secondary axis due to the measureAxisId of
-/// secondaryMeasureAxisId.
-///
-/// Note: secondary may flip left and right positioning when
-/// RTL.flipAxisLocations is set.
-class BarChartWithSecondaryAxisOnly extends StatelessWidget {
- static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
- final List> seriesList;
- final bool animate;
-
- BarChartWithSecondaryAxisOnly(this.seriesList, {this.animate = false});
-
- factory BarChartWithSecondaryAxisOnly.withSampleData() {
- return new BarChartWithSecondaryAxisOnly(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory BarChartWithSecondaryAxisOnly.withRandomData() {
- return new BarChartWithSecondaryAxisOnly(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- )
- // Set series to use the secondary measure axis.
- ..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 500),
- new OrdinalSales('2015', 2500),
- new OrdinalSales('2016', 1000),
- new OrdinalSales('2017', 7500),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- )
- // Set series to use the secondary measure axis.
- ..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/custom_axis_tick_formatters.dart b/charts_flutter/example/lib/axes/custom_axis_tick_formatters.dart
deleted file mode 100644
index 285a17c4c..000000000
--- a/charts_flutter/example/lib/axes/custom_axis_tick_formatters.dart
+++ /dev/null
@@ -1,144 +0,0 @@
-// 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.
-
-/// Example of timeseries chart with custom measure and domain formatters.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-import 'package:intl/intl.dart';
-
-class CustomAxisTickFormatters extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- CustomAxisTickFormatters(this.seriesList, {this.animate = false});
-
- /// Creates a [TimeSeriesChart] with sample data and no transition.
- factory CustomAxisTickFormatters.withSampleData() {
- return new CustomAxisTickFormatters(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory CustomAxisTickFormatters.withRandomData() {
- return new CustomAxisTickFormatters(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new MyRow(new DateTime(2017, 9, 25), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 26), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 27), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 28), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 29), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 30), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 01), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 02), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 03), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 04), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 05), random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- /// Formatter for numeric ticks using [NumberFormat] to format into currency
- ///
- /// This is what is used in the [NumericAxisSpec] below.
- final simpleCurrencyFormatter =
- new charts.BasicNumericTickFormatterSpec.fromNumberFormat(
- new NumberFormat.compactSimpleCurrency());
-
- /// Formatter for numeric ticks that uses the callback provided.
- ///
- /// Use this formatter if you need to format values that [NumberFormat]
- /// cannot provide.
- ///
- /// To see this formatter, change [NumericAxisSpec] to use this formatter.
- // final customTickFormatter =
- // charts.BasicNumericTickFormatterSpec((num value) => 'MyValue: $value');
-
- return new charts.TimeSeriesChart(seriesList,
- animate: animate,
- // Sets up a currency formatter for the measure axis.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickFormatterSpec: simpleCurrencyFormatter),
-
- /// Customizes the date tick formatter. It will print the day of month
- /// as the default format, but include the month and year if it
- /// transitions to a new month.
- ///
- /// minute, hour, day, month, and year are all provided by default and
- /// you can override them following this pattern.
- domainAxis: new charts.DateTimeAxisSpec(
- tickFormatterSpec: new charts.AutoDateTimeTickFormatterSpec(
- day: new charts.TimeFormatterSpec(
- format: 'd', transitionFormat: 'MM/dd/yyyy'))));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new MyRow(new DateTime(2017, 9, 25), 6),
- new MyRow(new DateTime(2017, 9, 26), 8),
- new MyRow(new DateTime(2017, 9, 27), 6),
- new MyRow(new DateTime(2017, 9, 28), 9),
- new MyRow(new DateTime(2017, 9, 29), 11),
- new MyRow(new DateTime(2017, 9, 30), 15),
- new MyRow(new DateTime(2017, 10, 01), 25),
- new MyRow(new DateTime(2017, 10, 02), 33),
- new MyRow(new DateTime(2017, 10, 03), 27),
- new MyRow(new DateTime(2017, 10, 04), 31),
- new MyRow(new DateTime(2017, 10, 05), 23),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
-}
-
-/// Sample time series data type.
-class MyRow {
- final DateTime timeStamp;
- final int cost;
- MyRow(this.timeStamp, this.cost);
-}
diff --git a/charts_flutter/example/lib/axes/custom_font_size_and_color.dart b/charts_flutter/example/lib/axes/custom_font_size_and_color.dart
deleted file mode 100644
index e63d192c7..000000000
--- a/charts_flutter/example/lib/axes/custom_font_size_and_color.dart
+++ /dev/null
@@ -1,136 +0,0 @@
-// 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.
-
-/// Custom Font Style Example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using a custom primary measure and domain axis replacing the
-/// renderSpec with one with a custom font size and a custom color.
-///
-/// There are many axis styling options in the SmallTickRenderer allowing you
-/// to customize the font, tick lengths, and offsets.
-class CustomFontSizeAndColor extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- CustomFontSizeAndColor(this.seriesList, {this.animate = false});
-
- factory CustomFontSizeAndColor.withSampleData() {
- return new CustomFontSizeAndColor(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory CustomFontSizeAndColor.withRandomData() {
- return new CustomFontSizeAndColor(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
-
- /// Assign a custom style for the domain axis.
- ///
- /// This is an OrdinalAxisSpec to match up with BarChart's default
- /// ordinal domain axis (use NumericAxisSpec or DateTimeAxisSpec for
- /// other charts).
- domainAxis: new charts.OrdinalAxisSpec(
- renderSpec: new charts.SmallTickRendererSpec(
-
- // Tick and Label styling here.
- labelStyle: new charts.TextStyleSpec(
- fontSize: 18, // size in Pts.
- color: charts.MaterialPalette.black),
-
- // Change the line colors to match text color.
- lineStyle: new charts.LineStyleSpec(
- color: charts.MaterialPalette.black))),
-
- /// Assign a custom style for the measure axis.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- renderSpec: new charts.GridlineRendererSpec(
-
- // Tick and Label styling here.
- labelStyle: new charts.TextStyleSpec(
- fontSize: 18, // size in Pts.
- color: charts.MaterialPalette.black),
-
- // Change the line colors to match text color.
- lineStyle: new charts.LineStyleSpec(
- color: charts.MaterialPalette.black))),
- );
- }
-
- /// Create series list with single series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/custom_measure_tick_count.dart b/charts_flutter/example/lib/axes/custom_measure_tick_count.dart
deleted file mode 100644
index dfa7bdd3f..000000000
--- a/charts_flutter/example/lib/axes/custom_measure_tick_count.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// 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.
-
-/// Example of timeseries chart with a custom number of ticks
-///
-/// The tick count can be set by setting the [desiredMinTickCount] and
-/// [desiredMaxTickCount] for automatically adjusted tick counts (based on
-/// how 'nice' the ticks are) or [desiredTickCount] for a fixed tick count.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class CustomMeasureTickCount extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- CustomMeasureTickCount(this.seriesList, {this.animate = false});
-
- /// Creates a [TimeSeriesChart] with sample data and no transition.
- factory CustomMeasureTickCount.withSampleData() {
- return new CustomMeasureTickCount(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory CustomMeasureTickCount.withRandomData() {
- return new CustomMeasureTickCount(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new MyRow(new DateTime(2017, 9, 25), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 26), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 27), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 28), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 29), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 30), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 01), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 02), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 03), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 04), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 05), random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.TimeSeriesChart(seriesList,
- animate: animate,
-
- /// Customize the measure axis to have 2 ticks,
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(desiredTickCount: 2)));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new MyRow(new DateTime(2017, 9, 25), 6),
- new MyRow(new DateTime(2017, 9, 26), 8),
- new MyRow(new DateTime(2017, 9, 27), 6),
- new MyRow(new DateTime(2017, 9, 28), 9),
- new MyRow(new DateTime(2017, 9, 29), 11),
- new MyRow(new DateTime(2017, 9, 30), 15),
- new MyRow(new DateTime(2017, 10, 01), 25),
- new MyRow(new DateTime(2017, 10, 02), 33),
- new MyRow(new DateTime(2017, 10, 03), 27),
- new MyRow(new DateTime(2017, 10, 04), 31),
- new MyRow(new DateTime(2017, 10, 05), 23),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
-}
-
-/// Sample time series data type.
-class MyRow {
- final DateTime timeStamp;
- final int cost;
- MyRow(this.timeStamp, this.cost);
-}
diff --git a/charts_flutter/example/lib/axes/flipped_vertical_axis.dart b/charts_flutter/example/lib/axes/flipped_vertical_axis.dart
deleted file mode 100644
index 4c11d142c..000000000
--- a/charts_flutter/example/lib/axes/flipped_vertical_axis.dart
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of flipping the vertical measure axis direction so that larger
-/// values render downward instead of the usual rendering up.
-///
-/// flipVerticalAxis, when set, flips the vertical axis from its default
-/// direction.
-///
-/// Note: primary and secondary may flip left and right positioning when
-/// RTL.flipAxisLocations is set.
-class FlippedVerticalAxis extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- FlippedVerticalAxis(this.seriesList, {this.animate = false});
-
- factory FlippedVerticalAxis.withSampleData() {
- return new FlippedVerticalAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory FlippedVerticalAxis.withRandomData() {
- return new FlippedVerticalAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- const runners = ['Smith', 'Jones', 'Brown', 'Doe'];
-
- // Randomly assign runners, but leave the order of the places.
- final raceData = [
- new RunnerRank(runners.removeAt(random.nextInt(runners.length)), 1),
- new RunnerRank(runners.removeAt(random.nextInt(runners.length)), 2),
- new RunnerRank(runners.removeAt(random.nextInt(runners.length)), 3),
- new RunnerRank(runners.removeAt(random.nextInt(runners.length)), 4),
- ];
-
- return [
- new charts.Series(
- id: 'Race Results',
- domainFn: (RunnerRank row, _) => row.name,
- measureFn: (RunnerRank row, _) => row.place,
- data: raceData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- // Known Issue, the bar chart cannot render negative direction bars at this
- // time so the result is an empty chart.
- // TODO: Remove this comment
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- flipVerticalAxis: true,
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final raceData = [
- new RunnerRank('Smith', 1),
- new RunnerRank('Jones', 2),
- new RunnerRank('Brown', 3),
- new RunnerRank('Doe', 4),
- ];
-
- return [
- new charts.Series(
- id: 'Race Results',
- domainFn: (RunnerRank row, _) => row.name,
- measureFn: (RunnerRank row, _) => row.place,
- data: raceData),
- ];
- }
-}
-
-/// Datum/Row for the chart.
-class RunnerRank {
- final String name;
- final int place;
- RunnerRank(this.name, this.place);
-}
diff --git a/charts_flutter/example/lib/axes/gridline_dash_pattern.dart b/charts_flutter/example/lib/axes/gridline_dash_pattern.dart
deleted file mode 100644
index 1190cb5f6..000000000
--- a/charts_flutter/example/lib/axes/gridline_dash_pattern.dart
+++ /dev/null
@@ -1,120 +0,0 @@
-// 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.
-
-/// Example of timeseries chart with gridlines that have a dash pattern.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class GridlineDashPattern extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GridlineDashPattern(this.seriesList, {this.animate = false});
-
- /// Creates a [TimeSeriesChart] with sample data and no transition.
- factory GridlineDashPattern.withSampleData() {
- return new GridlineDashPattern(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GridlineDashPattern.withRandomData() {
- return new GridlineDashPattern(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new MyRow(new DateTime(2017, 9, 25), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 26), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 27), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 28), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 29), random.nextInt(100)),
- new MyRow(new DateTime(2017, 9, 30), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 01), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 02), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 03), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 04), random.nextInt(100)),
- new MyRow(new DateTime(2017, 10, 05), random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.TimeSeriesChart(seriesList,
- animate: animate,
-
- /// Customize the gridlines to use a dash pattern.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- renderSpec: charts.GridlineRendererSpec(
- lineStyle: charts.LineStyleSpec(
- dashPattern: [4, 4],
- ))));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new MyRow(new DateTime(2017, 9, 25), 6),
- new MyRow(new DateTime(2017, 9, 26), 8),
- new MyRow(new DateTime(2017, 9, 27), 6),
- new MyRow(new DateTime(2017, 9, 28), 9),
- new MyRow(new DateTime(2017, 9, 29), 11),
- new MyRow(new DateTime(2017, 9, 30), 15),
- new MyRow(new DateTime(2017, 10, 01), 25),
- new MyRow(new DateTime(2017, 10, 02), 33),
- new MyRow(new DateTime(2017, 10, 03), 27),
- new MyRow(new DateTime(2017, 10, 04), 31),
- new MyRow(new DateTime(2017, 10, 05), 23),
- ];
-
- return [
- new charts.Series(
- id: 'Cost',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.cost,
- data: data,
- )
- ];
- }
-}
-
-/// Sample time series data type.
-class MyRow {
- final DateTime timeStamp;
- final int cost;
- MyRow(this.timeStamp, this.cost);
-}
diff --git a/charts_flutter/example/lib/axes/hidden_ticks_and_labels_axis.dart b/charts_flutter/example/lib/axes/hidden_ticks_and_labels_axis.dart
deleted file mode 100644
index a268207ca..000000000
--- a/charts_flutter/example/lib/axes/hidden_ticks_and_labels_axis.dart
+++ /dev/null
@@ -1,118 +0,0 @@
-// 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.
-
-/// No Axis Example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of hiding both axis.
-class HiddenTicksAndLabelsAxis extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- HiddenTicksAndLabelsAxis(this.seriesList, {this.animate = false});
-
- factory HiddenTicksAndLabelsAxis.withSampleData() {
- return new HiddenTicksAndLabelsAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HiddenTicksAndLabelsAxis.withRandomData() {
- return new HiddenTicksAndLabelsAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
-
- /// Assign a custom style for the measure axis.
- ///
- /// The NoneRenderSpec can still draw an axis line with
- /// showAxisLine=true.
- primaryMeasureAxis:
- new charts.NumericAxisSpec(renderSpec: new charts.NoneRenderSpec()),
-
- /// This is an OrdinalAxisSpec to match up with BarChart's default
- /// ordinal domain axis (use NumericAxisSpec or DateTimeAxisSpec for
- /// other charts).
- domainAxis: new charts.OrdinalAxisSpec(
- // Make sure that we draw the domain axis line.
- showAxisLine: true,
- // But don't draw anything else.
- renderSpec: new charts.NoneRenderSpec()),
- );
- }
-
- /// Create series list with single series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/horizontal_bar_secondary_axis.dart b/charts_flutter/example/lib/axes/horizontal_bar_secondary_axis.dart
deleted file mode 100644
index a1c3be260..000000000
--- a/charts_flutter/example/lib/axes/horizontal_bar_secondary_axis.dart
+++ /dev/null
@@ -1,160 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using a primary and secondary axis (left & right respectively)
-/// for a set of grouped bars. This is useful for comparing Series that have
-/// different units (revenue vs clicks by region), or different magnitudes (2017
-/// revenue vs 1/1/2017 revenue by region).
-///
-/// The first series plots using the primary axis to position its measure
-/// values (bar height). This is the default axis used if the measureAxisId is
-/// not set.
-///
-/// The second series plots using the secondary axis due to the measureAxisId of
-/// secondaryMeasureAxisId.
-///
-/// Note: primary and secondary may flip left and right positioning when
-/// RTL.flipAxisLocations is set.
-class HorizontalBarChartWithSecondaryAxis extends StatelessWidget {
- static const secondaryMeasureAxisId = 'secondaryMeasureAxisId';
- final List> seriesList;
- final bool animate;
-
- HorizontalBarChartWithSecondaryAxis(this.seriesList, {this.animate = false});
-
- factory HorizontalBarChartWithSecondaryAxis.withSampleData() {
- return new HorizontalBarChartWithSecondaryAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HorizontalBarChartWithSecondaryAxis.withRandomData() {
- return new HorizontalBarChartWithSecondaryAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- final losAngelesSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- new charts.Series(
- id: 'Los Angeles Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: losAngelesSalesData,
- )..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId)
- // Set the 'Los Angeles Revenue' series to use the secondary measure axis.
- // All series that have this set will use the secondary measure axis.
- // All other series will use the primary measure axis.
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- // For horizontal bar charts, set the [vertical] flag to false.
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- vertical: false,
- // It is important when using both primary and secondary axes to choose
- // the same number of ticks for both sides to get the gridlines to line
- // up.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(desiredTickCount: 3)),
- secondaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(desiredTickCount: 3)),
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- final losAngelesSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- new charts.Series(
- id: 'Los Angeles Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: losAngelesSalesData,
- )..setAttribute(charts.measureAxisIdKey, secondaryMeasureAxisId)
- // Set the 'Los Angeles Revenue' series to use the secondary measure axis.
- // All series that have this set will use the secondary measure axis.
- // All other series will use the primary measure axis.
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/integer_only_measure_axis.dart b/charts_flutter/example/lib/axes/integer_only_measure_axis.dart
deleted file mode 100644
index 37e3e242c..000000000
--- a/charts_flutter/example/lib/axes/integer_only_measure_axis.dart
+++ /dev/null
@@ -1,129 +0,0 @@
-// 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.
-
-/// Example of timeseries chart forcing the measure axis to have whole number
-/// ticks. This is useful if the measure units don't make sense to present as
-/// fractional.
-///
-/// This is done by customizing the measure axis and setting
-/// [dataIsInWholeNumbers] on the tick provider.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class IntegerOnlyMeasureAxis extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- IntegerOnlyMeasureAxis(this.seriesList, {this.animate = false});
-
- /// Creates a [TimeSeriesChart] with sample data and no transition.
- factory IntegerOnlyMeasureAxis.withSampleData() {
- return new IntegerOnlyMeasureAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory IntegerOnlyMeasureAxis.withRandomData() {
- return new IntegerOnlyMeasureAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new MyRow(new DateTime(2017, 9, 25), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 9, 26), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 9, 27), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 9, 28), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 9, 29), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 9, 30), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 10, 01), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 10, 02), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 10, 03), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 10, 04), random.nextDouble().round()),
- new MyRow(new DateTime(2017, 10, 05), random.nextDouble().round()),
- ];
-
- return [
- new charts.Series(
- id: 'Headcount',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.headcount,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.TimeSeriesChart(
- seriesList,
- animate: animate,
- // Provides a custom axis ensuring that the ticks are in whole numbers.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec: new charts.BasicNumericTickProviderSpec(
- // Make sure we don't have values less than 1 as ticks
- // (ie: counts).
- dataIsInWholeNumbers: true,
- // Fixed tick count to highlight the integer only behavior
- // generating ticks [0, 1, 2, 3, 4].
- desiredTickCount: 5)),
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new MyRow(new DateTime(2017, 9, 25), 0),
- new MyRow(new DateTime(2017, 9, 26), 0),
- new MyRow(new DateTime(2017, 9, 27), 0),
- new MyRow(new DateTime(2017, 9, 28), 0),
- new MyRow(new DateTime(2017, 9, 29), 0),
- new MyRow(new DateTime(2017, 9, 30), 0),
- new MyRow(new DateTime(2017, 10, 01), 1),
- new MyRow(new DateTime(2017, 10, 02), 1),
- new MyRow(new DateTime(2017, 10, 03), 1),
- new MyRow(new DateTime(2017, 10, 04), 1),
- new MyRow(new DateTime(2017, 10, 05), 1),
- ];
-
- return [
- new charts.Series(
- id: 'Headcount',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.headcount,
- data: data,
- )
- ];
- }
-}
-
-/// Sample time series data type.
-class MyRow {
- final DateTime timeStamp;
- final int headcount;
- MyRow(this.timeStamp, this.headcount);
-}
diff --git a/charts_flutter/example/lib/axes/line_disjoint_axis.dart b/charts_flutter/example/lib/axes/line_disjoint_axis.dart
deleted file mode 100644
index 879f1510b..000000000
--- a/charts_flutter/example/lib/axes/line_disjoint_axis.dart
+++ /dev/null
@@ -1,268 +0,0 @@
-// 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.
-
-/// Example of using disjoint measure axes to render 4 series of lines with
-/// separate scales. The general use case for this type of chart is to show
-/// differences in the trends of the data, without comparing their absolute
-/// values.
-///
-/// Disjoint measure axes will be used to scale the series associated with them,
-/// but they will not render any tick elements on either side of the chart.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:collection' show LinkedHashMap;
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class DisjointMeasureAxisLineChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- DisjointMeasureAxisLineChart(this.seriesList, {this.animate = false});
-
- /// Creates a [LineChart] with sample data and no transition.
- factory DisjointMeasureAxisLineChart.withSampleData() {
- return new DisjointMeasureAxisLineChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory DisjointMeasureAxisLineChart.withRandomData() {
- return new DisjointMeasureAxisLineChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- // The first three series contain similar data with different magnitudes.
- // This demonstrates the ability to graph the trends in each series relative
- // to each other, without the largest magnitude series compressing the
- // smallest.
- final myFakeDesktopData = [
- new LinearClicks(0, clickCount: random.nextInt(100)),
- new LinearClicks(1, clickCount: random.nextInt(100)),
- new LinearClicks(2, clickCount: random.nextInt(100)),
- new LinearClicks(3, clickCount: random.nextInt(100)),
- ];
-
- final myFakeTabletData = [
- new LinearClicks(0, clickCount: random.nextInt(100) * 100),
- new LinearClicks(1, clickCount: random.nextInt(100) * 100),
- new LinearClicks(2, clickCount: random.nextInt(100) * 100),
- new LinearClicks(3, clickCount: random.nextInt(100) * 100),
- ];
-
- final myFakeMobileData = [
- new LinearClicks(0, clickCount: random.nextInt(100) * 1000),
- new LinearClicks(1, clickCount: random.nextInt(100) * 1000),
- new LinearClicks(2, clickCount: random.nextInt(100) * 1000),
- new LinearClicks(3, clickCount: random.nextInt(100) * 1000),
- ];
-
- // The fourth series renders with decimal values, representing a very
- // different sort ratio-based data. If this was on the same axis as any of
- // the other series, it would be squashed near zero.
- final myFakeClickRateData = [
- new LinearClicks(0, clickRate: .25),
- new LinearClicks(1, clickRate: .65),
- new LinearClicks(2, clickRate: .50),
- new LinearClicks(3, clickRate: .30),
- ];
-
- return [
- // We render an empty series on the primary measure axis to ensure that
- // the axis itself gets rendered. This helps us draw the gridlines on the
- // chart.
- new charts.Series(
- id: 'Fake Series',
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: []),
- new charts.Series(
- id: 'Desktop',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeDesktopData,
- )
- // Set the 'Desktop' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 1'),
- new charts.Series(
- id: 'Tablet',
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeTabletData,
- )
- // Set the 'Tablet' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 2'),
- new charts.Series(
- id: 'Mobile',
- colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeMobileData,
- )
- // Set the 'Mobile' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 3'),
- new charts.Series(
- id: 'Click Rate',
- colorFn: (_, __) => charts.MaterialPalette.purple.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeClickRateData,
- )
- // Set the 'Click Rate' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 4'),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.LineChart(seriesList,
- animate: animate,
- // Configure a primary measure axis that will render gridlines across
- // the chart. This axis uses fake ticks with no labels to ensure that we
- // get 5 grid lines.
- //
- // We do this because disjoint measure axes do not draw any tick
- // elements on the chart.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec: new charts.StaticNumericTickProviderSpec(
- // Create the ticks to be used the domain axis.
- >[
- new charts.TickSpec(0, label: ''),
- new charts.TickSpec(1, label: ''),
- new charts.TickSpec(2, label: ''),
- new charts.TickSpec(3, label: ''),
- new charts.TickSpec(4, label: ''),
- ],
- )),
- // Create one disjoint measure axis per series on the chart.
- //
- // Disjoint measure axes will be used to scale the rendered data,
- // without drawing any tick elements on either side of the chart.
- disjointMeasureAxes:
- new LinkedHashMap.from({
- 'axis 1': new charts.NumericAxisSpec(),
- 'axis 2': new charts.NumericAxisSpec(),
- 'axis 3': new charts.NumericAxisSpec(),
- 'axis 4': new charts.NumericAxisSpec(),
- }));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- // The first three series contain similar data with different magnitudes.
- // This demonstrates the ability to graph the trends in each series relative
- // to each other, without the largest magnitude series compressing the
- // smallest.
- final myFakeDesktopData = [
- new LinearClicks(0, clickCount: 25),
- new LinearClicks(1, clickCount: 125),
- new LinearClicks(2, clickCount: 920),
- new LinearClicks(3, clickCount: 375),
- ];
-
- final myFakeTabletData = [
- new LinearClicks(0, clickCount: 375),
- new LinearClicks(1, clickCount: 1850),
- new LinearClicks(2, clickCount: 9700),
- new LinearClicks(3, clickCount: 5000),
- ];
-
- final myFakeMobileData = [
- new LinearClicks(0, clickCount: 5000),
- new LinearClicks(1, clickCount: 25000),
- new LinearClicks(2, clickCount: 100000),
- new LinearClicks(3, clickCount: 75000),
- ];
-
- // The fourth series renders with decimal values, representing a very
- // different sort ratio-based data. If this was on the same axis as any of
- // the other series, it would be squashed near zero.
- final myFakeClickRateData = [
- new LinearClicks(0, clickRate: .25),
- new LinearClicks(1, clickRate: .65),
- new LinearClicks(2, clickRate: .50),
- new LinearClicks(3, clickRate: .30),
- ];
-
- return [
- // We render an empty series on the primary measure axis to ensure that
- // the axis itself gets rendered. This helps us draw the gridlines on the
- // chart.
- new charts.Series(
- id: 'Fake Series',
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: []),
- new charts.Series(
- id: 'Desktop',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeDesktopData,
- )
- // Set the 'Desktop' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 1'),
- new charts.Series(
- id: 'Tablet',
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeTabletData,
- )
- // Set the 'Tablet' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 2'),
- new charts.Series(
- id: 'Mobile',
- colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickCount,
- data: myFakeMobileData,
- )
- // Set the 'Mobile' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 3'),
- new charts.Series(
- id: 'Click Rate',
- colorFn: (_, __) => charts.MaterialPalette.purple.shadeDefault,
- domainFn: (LinearClicks clickCount, _) => clickCount.year,
- measureFn: (LinearClicks clickCount, _) => clickCount.clickRate,
- data: myFakeClickRateData,
- )
- // Set the 'Click Rate' series to use a disjoint axis.
- ..setAttribute(charts.measureAxisIdKey, 'axis 4'),
- ];
- }
-}
-
-/// Sample linear data type.
-class LinearClicks {
- final int year;
- final int? clickCount;
- final double? clickRate;
-
- LinearClicks(this.year, {this.clickCount, this.clickRate});
-}
diff --git a/charts_flutter/example/lib/axes/measure_axis_label_alignment.dart b/charts_flutter/example/lib/axes/measure_axis_label_alignment.dart
deleted file mode 100644
index fe3251e41..000000000
--- a/charts_flutter/example/lib/axes/measure_axis_label_alignment.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// 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.
-
-/// Custom Tick Label Alignment Example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using a custom primary measure replacing the renderSpec with one
-/// that aligns the text under the tick and left justifies.
-class MeasureAxisLabelAlignment extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- MeasureAxisLabelAlignment(this.seriesList, {this.animate = false});
-
- factory MeasureAxisLabelAlignment.withSampleData() {
- return new MeasureAxisLabelAlignment(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory MeasureAxisLabelAlignment.withRandomData() {
- return new MeasureAxisLabelAlignment(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
-
- /// Customize the primary measure axis using a small tick renderer.
- /// Use String instead of num for ordinal domain axis
- /// (typically bar charts).
- primaryMeasureAxis: new charts.NumericAxisSpec(
- renderSpec: new charts.GridlineRendererSpec(
- // Display the measure axis labels below the gridline.
- //
- // 'Before' & 'after' follow the axis value direction.
- // Vertical axes draw 'before' below & 'after' above the tick.
- // Horizontal axes draw 'before' left & 'after' right the tick.
- labelAnchor: charts.TickLabelAnchor.before,
-
- // Left justify the text in the axis.
- //
- // Note: outside means that the secondary measure axis would right
- // justify.
- labelJustification: charts.TickLabelJustification.outside,
- )),
- );
- }
-
- /// Create series list with single series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/nonzero_bound_measure_axis.dart b/charts_flutter/example/lib/axes/nonzero_bound_measure_axis.dart
deleted file mode 100644
index da136b7dd..000000000
--- a/charts_flutter/example/lib/axes/nonzero_bound_measure_axis.dart
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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.
-
-/// Example of timeseries chart that has a measure axis that does NOT include
-/// zero. It starts at 100 and goes to 140.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class NonzeroBoundMeasureAxis extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- NonzeroBoundMeasureAxis(this.seriesList, {this.animate = false});
-
- /// Creates a [TimeSeriesChart] with sample data and no transition.
- factory NonzeroBoundMeasureAxis.withSampleData() {
- return new NonzeroBoundMeasureAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory NonzeroBoundMeasureAxis.withRandomData() {
- return new NonzeroBoundMeasureAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new MyRow(new DateTime(2017, 9, 25), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 9, 26), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 9, 27), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 9, 28), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 9, 29), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 9, 30), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 10, 01), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 10, 02), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 10, 03), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 10, 04), random.nextInt(100) + 100),
- new MyRow(new DateTime(2017, 10, 05), random.nextInt(100) + 100),
- ];
-
- return [
- new charts.Series(
- id: 'Headcount',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.headcount,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.TimeSeriesChart(seriesList,
- animate: animate,
- // Provide a tickProviderSpec which does NOT require that zero is
- // included.
- primaryMeasureAxis: new charts.NumericAxisSpec(
- tickProviderSpec:
- new charts.BasicNumericTickProviderSpec(zeroBound: false)));
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new MyRow(new DateTime(2017, 9, 25), 106),
- new MyRow(new DateTime(2017, 9, 26), 108),
- new MyRow(new DateTime(2017, 9, 27), 106),
- new MyRow(new DateTime(2017, 9, 28), 109),
- new MyRow(new DateTime(2017, 9, 29), 111),
- new MyRow(new DateTime(2017, 9, 30), 115),
- new MyRow(new DateTime(2017, 10, 01), 125),
- new MyRow(new DateTime(2017, 10, 02), 133),
- new MyRow(new DateTime(2017, 10, 03), 127),
- new MyRow(new DateTime(2017, 10, 04), 131),
- new MyRow(new DateTime(2017, 10, 05), 123),
- ];
-
- return [
- new charts.Series(
- id: 'Headcount',
- domainFn: (MyRow row, _) => row.timeStamp,
- measureFn: (MyRow row, _) => row.headcount,
- data: data,
- )
- ];
- }
-}
-
-/// Sample time series data type.
-class MyRow {
- final DateTime timeStamp;
- final int headcount;
- MyRow(this.timeStamp, this.headcount);
-}
diff --git a/charts_flutter/example/lib/axes/numeric_initial_viewport.dart b/charts_flutter/example/lib/axes/numeric_initial_viewport.dart
deleted file mode 100644
index 6a3826e0c..000000000
--- a/charts_flutter/example/lib/axes/numeric_initial_viewport.dart
+++ /dev/null
@@ -1,133 +0,0 @@
-// 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.
-
-/// Example of setting an initial viewport for ordinal axis.
-///
-/// This allows for specifying the specific range of data to show that differs
-/// from what was provided in the series list.
-///
-/// In this example, the series list has numeric data from 0 to 10, but we
-/// want to show from 3 to 7.
-/// We can do this by specifying an [NumericExtents] in [NumericAxisSpec].
-
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class NumericInitialViewport extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- NumericInitialViewport(this.seriesList, {this.animate = false});
-
- /// Creates a [LineChart] with sample data and no transition.
- factory NumericInitialViewport.withSampleData() {
- return new NumericInitialViewport(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory NumericInitialViewport.withRandomData() {
- return new NumericInitialViewport(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new LinearSales(0, random.nextInt(100)),
- new LinearSales(1, random.nextInt(100)),
- new LinearSales(2, random.nextInt(100)),
- new LinearSales(3, random.nextInt(100)),
- new LinearSales(4, random.nextInt(100)),
- new LinearSales(5, random.nextInt(100)),
- new LinearSales(6, random.nextInt(100)),
- new LinearSales(7, random.nextInt(100)),
- new LinearSales(8, random.nextInt(100)),
- new LinearSales(9, random.nextInt(100)),
- new LinearSales(10, random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (LinearSales sales, _) => sales.year,
- measureFn: (LinearSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.LineChart(
- seriesList,
- animate: animate,
- domainAxis: new charts.NumericAxisSpec(
- // Set the initial viewport by providing a new AxisSpec with the
- // desired viewport, in NumericExtents.
- viewport: new charts.NumericExtents(3.0, 7.0)),
- // Optionally add a pan or pan and zoom behavior.
- // If pan/zoom is not added, the viewport specified remains the viewport.
- behaviors: [new charts.PanAndZoomBehavior()],
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new LinearSales(0, 5),
- new LinearSales(1, 25),
- new LinearSales(2, 100),
- new LinearSales(3, 75),
- new LinearSales(4, 55),
- new LinearSales(5, 66),
- new LinearSales(6, 110),
- new LinearSales(7, 70),
- new LinearSales(8, 20),
- new LinearSales(9, 25),
- new LinearSales(10, 45),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (LinearSales sales, _) => sales.year,
- measureFn: (LinearSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
-}
-
-/// Sample linear data type.
-class LinearSales {
- final int year;
- final int sales;
-
- LinearSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/ordinal_initial_viewport.dart b/charts_flutter/example/lib/axes/ordinal_initial_viewport.dart
deleted file mode 100644
index 157c5fe9a..000000000
--- a/charts_flutter/example/lib/axes/ordinal_initial_viewport.dart
+++ /dev/null
@@ -1,145 +0,0 @@
-// 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.
-
-/// Example of setting an initial viewport for ordinal axis.
-///
-/// This allows for specifying the specific range of data to show that differs
-/// from what was provided in the series list.
-///
-/// In this example, the series list has ordinal data from year 2014 to 2030,
-/// but we want to show starting at 2018 and we only want to show 4 values.
-/// We can do this by specifying an [OrdinalViewport] in [OrdinalAxisSpec].
-
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class OrdinalInitialViewport extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- OrdinalInitialViewport(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- factory OrdinalInitialViewport.withSampleData() {
- return new OrdinalInitialViewport(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory OrdinalInitialViewport.withRandomData() {
- return new OrdinalInitialViewport(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- new OrdinalSales('2018', random.nextInt(100)),
- new OrdinalSales('2019', random.nextInt(100)),
- new OrdinalSales('2020', random.nextInt(100)),
- new OrdinalSales('2021', random.nextInt(100)),
- new OrdinalSales('2022', random.nextInt(100)),
- new OrdinalSales('2023', random.nextInt(100)),
- new OrdinalSales('2024', random.nextInt(100)),
- new OrdinalSales('2025', random.nextInt(100)),
- new OrdinalSales('2026', random.nextInt(100)),
- new OrdinalSales('2027', random.nextInt(100)),
- new OrdinalSales('2028', random.nextInt(100)),
- new OrdinalSales('2029', random.nextInt(100)),
- new OrdinalSales('2030', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- // Set the initial viewport by providing a new AxisSpec with the
- // desired viewport: a starting domain and the data size.
- domainAxis: new charts.OrdinalAxisSpec(
- viewport: new charts.OrdinalViewport('2018', 4)),
- // Optionally add a pan or pan and zoom behavior.
- // If pan/zoom is not added, the viewport specified remains the viewport.
- behaviors: [new charts.PanAndZoomBehavior()],
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- new OrdinalSales('2018', 33),
- new OrdinalSales('2019', 80),
- new OrdinalSales('2020', 21),
- new OrdinalSales('2021', 77),
- new OrdinalSales('2022', 8),
- new OrdinalSales('2023', 12),
- new OrdinalSales('2024', 42),
- new OrdinalSales('2025', 70),
- new OrdinalSales('2026', 77),
- new OrdinalSales('2027', 55),
- new OrdinalSales('2028', 19),
- new OrdinalSales('2029', 66),
- new OrdinalSales('2030', 27),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/short_tick_length_axis.dart b/charts_flutter/example/lib/axes/short_tick_length_axis.dart
deleted file mode 100644
index b7207362b..000000000
--- a/charts_flutter/example/lib/axes/short_tick_length_axis.dart
+++ /dev/null
@@ -1,115 +0,0 @@
-// 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.
-
-/// Custom Tick Style Example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of using a custom primary measure axis replacing the default
-/// gridline rendering with a short tick rendering. It also turns on the axis
-/// line so that the ticks have something to line up against.
-///
-/// There are many axis styling options in the SmallTickRenderer allowing you
-/// to customize the font, tick lengths, and offsets.
-class ShortTickLengthAxis extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- ShortTickLengthAxis(this.seriesList, {this.animate = false});
-
- factory ShortTickLengthAxis.withSampleData() {
- return new ShortTickLengthAxis(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory ShortTickLengthAxis.withRandomData() {
- return new ShortTickLengthAxis(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
-
- /// Customize the primary measure axis using a small tick renderer.
- /// Note: use String instead of num for ordinal domain axis
- /// (typically bar charts).
- primaryMeasureAxis: new charts.NumericAxisSpec(
- renderSpec: new charts.SmallTickRendererSpec(
- // Tick and Label styling here.
- )),
- );
- }
-
- /// Create series list with single series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/axes/statically_provided_ticks.dart b/charts_flutter/example/lib/axes/statically_provided_ticks.dart
deleted file mode 100644
index 5990b7b58..000000000
--- a/charts_flutter/example/lib/axes/statically_provided_ticks.dart
+++ /dev/null
@@ -1,134 +0,0 @@
-// 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.
-
-/// Example of axis using statically provided ticks.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of specifying a custom set of ticks to be used on the domain axis.
-///
-/// Specifying custom set of ticks allows specifying exactly what ticks are
-/// used in the axis. Each tick is also allowed to have a different style set.
-///
-/// For an ordinal axis, the [StaticOrdinalTickProviderSpec] is shown in this
-/// example defining ticks to be used with [TickSpec] of String.
-///
-/// For numeric axis, the [StaticNumericTickProviderSpec] can be used by passing
-/// in a list of ticks defined with [TickSpec] of num.
-///
-/// For datetime axis, the [StaticDateTimeTickProviderSpec] can be used by
-/// passing in a list of ticks defined with [TickSpec] of datetime.
-class StaticallyProvidedTicks extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- StaticallyProvidedTicks(this.seriesList, {this.animate = false});
-
- factory StaticallyProvidedTicks.withSampleData() {
- return new StaticallyProvidedTicks(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory StaticallyProvidedTicks.withRandomData() {
- return new StaticallyProvidedTicks(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final globalSalesData = [
- new OrdinalSales('2014', random.nextInt(100) * 100),
- new OrdinalSales('2015', random.nextInt(100) * 100),
- new OrdinalSales('2016', random.nextInt(100) * 100),
- new OrdinalSales('2017', random.nextInt(100) * 100),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- // Create the ticks to be used the domain axis.
- final staticTicks = >[
- new charts.TickSpec(
- // Value must match the domain value.
- '2014',
- // Optional label for this tick, defaults to domain value if not set.
- label: 'Year 2014',
- // The styling for this tick.
- style: new charts.TextStyleSpec(
- color: new charts.Color(r: 0x4C, g: 0xAF, b: 0x50))),
- // If no text style is specified - the style from renderSpec will be used
- // if one is specified.
- new charts.TickSpec('2015'),
- new charts.TickSpec('2016'),
- new charts.TickSpec('2017'),
- ];
-
- return new charts.BarChart(
- seriesList,
- animate: animate,
- domainAxis: new charts.OrdinalAxisSpec(
- tickProviderSpec:
- new charts.StaticOrdinalTickProviderSpec(staticTicks)),
- );
- }
-
- /// Create series list with single series
- static List> _createSampleData() {
- final globalSalesData = [
- new OrdinalSales('2014', 5000),
- new OrdinalSales('2015', 25000),
- new OrdinalSales('2016', 100000),
- new OrdinalSales('2017', 750000),
- ];
-
- return [
- new charts.Series(
- id: 'Global Revenue',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: globalSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/bar_gallery.dart b/charts_flutter/example/lib/bar_chart/bar_gallery.dart
deleted file mode 100644
index ca656c44d..000000000
--- a/charts_flutter/example/lib/bar_chart/bar_gallery.dart
+++ /dev/null
@@ -1,164 +0,0 @@
-// 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 '../gallery_scaffold.dart';
-import 'custom_rounded_bars.dart';
-import 'grouped.dart';
-import 'grouped_fill_color.dart';
-import 'grouped_single_target_line.dart';
-import 'grouped_stacked.dart';
-import 'grouped_stacked_weight_pattern.dart';
-import 'grouped_target_line.dart';
-import 'horizontal.dart';
-import 'horizontal_bar_label.dart';
-import 'horizontal_bar_label_custom.dart';
-import 'horizontal_pattern_forward_hatch.dart';
-import 'pattern_forward_hatch.dart';
-import 'simple.dart';
-import 'stacked.dart';
-import 'stacked_fill_color.dart';
-import 'stacked_horizontal.dart';
-import 'stacked_target_line.dart';
-import 'spark_bar.dart';
-import 'vertical_bar_label.dart';
-
-List buildGallery() {
- return [
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Simple Bar Chart',
- subtitle: 'Simple bar chart with a single series',
- childBuilder: () => new SimpleBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Stacked Bar Chart',
- subtitle: 'Stacked bar chart with multiple series',
- childBuilder: () => new StackedBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Grouped Bar Chart',
- subtitle: 'Grouped bar chart with multiple series',
- childBuilder: () => new GroupedBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Grouped Stacked Bar Chart',
- subtitle: 'Grouped and stacked bar chart with multiple series',
- childBuilder: () => new GroupedStackedBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Grouped Bar Target Line Chart',
- subtitle: 'Grouped bar target line chart with multiple series',
- childBuilder: () => new GroupedBarTargetLineChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Grouped Bar Single Target Line Chart',
- subtitle:
- 'Grouped bar target line chart with multiple series and a single target',
- childBuilder: () => new GroupedBarSingleTargetLineChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Stacked Bar Target Line Chart',
- subtitle: 'Stacked bar target line chart with multiple series',
- childBuilder: () => new StackedBarTargetLineChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Horizontal Bar Chart',
- subtitle: 'Horizontal bar chart with a single series',
- childBuilder: () => new HorizontalBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Stacked Horizontal Bar Chart',
- subtitle: 'Stacked horizontal bar chart with multiple series',
- childBuilder: () => new StackedHorizontalBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Horizontal Bar Chart with Bar Labels',
- subtitle: 'Horizontal bar chart with a single series and bar labels',
- childBuilder: () => new HorizontalBarLabelChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Horizontal Bar Chart with Custom Bar Labels',
- subtitle: 'Bar labels with customized styling',
- childBuilder: () => new HorizontalBarLabelCustomChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Vertical Bar Chart with Bar Labels',
- subtitle: 'Vertical bar chart with a single series and bar labels',
- childBuilder: () => new VerticalBarLabelChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Spark Bar Chart',
- subtitle: 'Spark Bar Chart',
- childBuilder: () => new SparkBar.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Grouped Fill Color Bar Chart',
- subtitle: 'Grouped bar chart with fill colors',
- childBuilder: () => new GroupedFillColorBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Stacked Fill Color Bar Chart',
- subtitle: 'Stacked bar chart with fill colors',
- childBuilder: () => new StackedFillColorBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Pattern Forward Hatch Bar Chart',
- subtitle: 'Pattern Forward Hatch Bar Chart',
- childBuilder: () => new PatternForwardHatchBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Transform.rotate(
- angle: 1.5708, child: new Icon(Icons.insert_chart)),
- title: 'Horizontal Pattern Forward Hatch Bar Chart',
- subtitle: 'Horizontal Pattern Forward Hatch Bar Chart',
- childBuilder: () =>
- new HorizontalPatternForwardHatchBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Weight Pattern Bar Chart',
- subtitle: 'Grouped and stacked bar chart with a weight pattern',
- childBuilder: () =>
- new GroupedStackedWeightPatternBarChart.withRandomData(),
- ),
- new GalleryScaffold(
- listTileIcon: new Icon(Icons.insert_chart),
- title: 'Bar Chart with custom bar radius',
- subtitle: 'Custom rounded bar corners',
- childBuilder: () => new CustomRoundedBars.withRandomData(),
- ),
- ];
-}
diff --git a/charts_flutter/example/lib/bar_chart/custom_rounded_bars.dart b/charts_flutter/example/lib/bar_chart/custom_rounded_bars.dart
deleted file mode 100644
index c77350186..000000000
--- a/charts_flutter/example/lib/bar_chart/custom_rounded_bars.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class CustomRoundedBars extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- CustomRoundedBars(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with custom rounded bars.
- factory CustomRoundedBars.withSampleData() {
- return new CustomRoundedBars(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory CustomRoundedBars.withRandomData() {
- return new CustomRoundedBars(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- defaultRenderer: new charts.BarRendererConfig(
- // By default, bar renderer will draw rounded bars with a constant
- // radius of 30.
- // To not have any rounded corners, use [NoCornerStrategy]
- // To change the radius of the bars, use [ConstCornerStrategy]
- cornerStrategy: const charts.ConstCornerStrategy(30)),
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped.dart b/charts_flutter/example/lib/bar_chart/grouped.dart
deleted file mode 100644
index f61282eb4..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped.dart
+++ /dev/null
@@ -1,154 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class GroupedBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedBarChart(this.seriesList, {this.animate = false});
-
- factory GroupedBarChart.withSampleData() {
- return new GroupedBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedBarChart.withRandomData() {
- return new GroupedBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped_fill_color.dart b/charts_flutter/example/lib/bar_chart/grouped_fill_color.dart
deleted file mode 100644
index 14a921be8..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped_fill_color.dart
+++ /dev/null
@@ -1,178 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Example of a grouped bar chart with three series, each rendered with
-/// different fill colors.
-class GroupedFillColorBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedFillColorBarChart(this.seriesList, {this.animate = false});
-
- factory GroupedFillColorBarChart.withSampleData() {
- return new GroupedFillColorBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedFillColorBarChart.withRandomData() {
- return new GroupedFillColorBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- // Blue bars with a lighter center color.
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- fillColorFn: (_, __) =>
- charts.MaterialPalette.blue.shadeDefault.lighter,
- ),
- // Solid red bars. Fill color will default to the series color if no
- // fillColorFn is configured.
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- ),
- // Hollow green bars.
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault,
- fillColorFn: (_, __) => charts.MaterialPalette.transparent,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- // Configure a stroke width to enable borders on the bars.
- defaultRenderer: new charts.BarRendererConfig(
- groupingType: charts.BarGroupingType.grouped, strokeWidthPx: 2.0),
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- // Blue bars with a lighter center color.
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
- fillColorFn: (_, __) =>
- charts.MaterialPalette.blue.shadeDefault.lighter,
- ),
- // Solid red bars. Fill color will default to the series color if no
- // fillColorFn is configured.
- new charts.Series(
- id: 'Tablet',
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
- domainFn: (OrdinalSales sales, _) => sales.year,
- ),
- // Hollow green bars.
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault,
- fillColorFn: (_, __) => charts.MaterialPalette.transparent,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped_single_target_line.dart b/charts_flutter/example/lib/bar_chart/grouped_single_target_line.dart
deleted file mode 100644
index 1d6012a5d..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped_single_target_line.dart
+++ /dev/null
@@ -1,180 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class GroupedBarSingleTargetLineChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedBarSingleTargetLineChart(this.seriesList, {this.animate = false});
-
- factory GroupedBarSingleTargetLineChart.withSampleData() {
- return new GroupedBarSingleTargetLineChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedBarSingleTargetLineChart.withRandomData() {
- return new GroupedBarSingleTargetLineChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final targetLineData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData),
- new charts.Series(
- id: 'Desktop Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: targetLineData)
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- customSeriesRenderers: [
- new charts.BarTargetLineRendererConfig(
- // ID used to link series to this renderer.
- customRendererId: 'customTargetLine',
- groupingType: charts.BarGroupingType.grouped)
- ]);
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- final targetLineData = [
- new OrdinalSales('2014', 30),
- new OrdinalSales('2015', 55),
- new OrdinalSales('2016', 15),
- new OrdinalSales('2017', 25),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData),
- new charts.Series(
- id: 'Desktop Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: targetLineData)
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped_stacked.dart b/charts_flutter/example/lib/bar_chart/grouped_stacked.dart
deleted file mode 100644
index 32551c7e8..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped_stacked.dart
+++ /dev/null
@@ -1,244 +0,0 @@
-// 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.
-
-/// Example of a bar chart with grouped, stacked series oriented vertically.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class GroupedStackedBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedStackedBarChart(this.seriesList, {this.animate = false});
-
- factory GroupedStackedBarChart.withSampleData() {
- return new GroupedStackedBarChart(
- createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedStackedBarChart.withRandomData() {
- return new GroupedStackedBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final desktopSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataA,
- ),
- new charts.Series(
- id: 'Tablet A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataA,
- ),
- new charts.Series(
- id: 'Mobile A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataA,
- ),
- new charts.Series(
- id: 'Desktop B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataB,
- ),
- new charts.Series(
- id: 'Tablet B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataB,
- ),
- new charts.Series(
- id: 'Mobile B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataB,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.groupedStacked,
- );
- }
-
- /// Create series list with multiple series
- static List> createSampleData() {
- final desktopSalesDataA = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesDataA = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesDataA = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- final desktopSalesDataB = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesDataB = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesDataB = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataA,
- ),
- new charts.Series(
- id: 'Tablet A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataA,
- ),
- new charts.Series(
- id: 'Mobile A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataA,
- ),
- new charts.Series(
- id: 'Desktop B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataB,
- ),
- new charts.Series(
- id: 'Tablet B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataB,
- ),
- new charts.Series(
- id: 'Mobile B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataB,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped_stacked_weight_pattern.dart b/charts_flutter/example/lib/bar_chart/grouped_stacked_weight_pattern.dart
deleted file mode 100644
index ddccb568c..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped_stacked_weight_pattern.dart
+++ /dev/null
@@ -1,256 +0,0 @@
-// 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.
-
-/// Example of a bar chart with grouped, stacked series oriented vertically with
-/// a custom weight pattern.
-///
-/// This is a pattern of weights used to calculate the width of bars within a
-/// bar group. If not specified, each bar in the group will have an equal width.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class GroupedStackedWeightPatternBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedStackedWeightPatternBarChart(this.seriesList, {this.animate = false});
-
- factory GroupedStackedWeightPatternBarChart.withSampleData() {
- return new GroupedStackedWeightPatternBarChart(
- createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedStackedWeightPatternBarChart.withRandomData() {
- return new GroupedStackedWeightPatternBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesDataA = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final desktopSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesDataB = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataA,
- ),
- new charts.Series(
- id: 'Tablet A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataA,
- ),
- new charts.Series(
- id: 'Mobile A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataA,
- ),
- new charts.Series(
- id: 'Desktop B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataB,
- ),
- new charts.Series(
- id: 'Tablet B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataB,
- ),
- new charts.Series(
- id: 'Mobile B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataB,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- // Configure the bar renderer in grouped stacked rendering mode with a
- // custom weight pattern.
- //
- // The first stack of bars in each group is configured to be twice as wide
- // as the second stack of bars in each group.
- defaultRenderer: new charts.BarRendererConfig(
- groupingType: charts.BarGroupingType.groupedStacked,
- weightPattern: [2, 1],
- ),
- );
- }
-
- /// Create series list with multiple series
- static List> createSampleData() {
- final desktopSalesDataA = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesDataA = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesDataA = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- final desktopSalesDataB = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesDataB = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesDataB = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataA,
- ),
- new charts.Series(
- id: 'Tablet A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataA,
- ),
- new charts.Series(
- id: 'Mobile A',
- seriesCategory: 'A',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataA,
- ),
- new charts.Series(
- id: 'Desktop B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesDataB,
- ),
- new charts.Series(
- id: 'Tablet B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesDataB,
- ),
- new charts.Series(
- id: 'Mobile B',
- seriesCategory: 'B',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesDataB,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/grouped_target_line.dart b/charts_flutter/example/lib/bar_chart/grouped_target_line.dart
deleted file mode 100644
index d4fb620d9..000000000
--- a/charts_flutter/example/lib/bar_chart/grouped_target_line.dart
+++ /dev/null
@@ -1,248 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class GroupedBarTargetLineChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- GroupedBarTargetLineChart(this.seriesList, {this.animate = false});
-
- factory GroupedBarTargetLineChart.withSampleData() {
- return new GroupedBarTargetLineChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory GroupedBarTargetLineChart.withRandomData() {
- return new GroupedBarTargetLineChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final desktopTargetLineData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableTargetLineData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileTargetLineData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- new charts.Series(
- id: 'Desktop Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- new charts.Series(
- id: 'Tablet Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- new charts.Series(
- id: 'Mobile Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- customSeriesRenderers: [
- new charts.BarTargetLineRendererConfig(
- // ID used to link series to this renderer.
- customRendererId: 'customTargetLine',
- groupingType: charts.BarGroupingType.grouped)
- ]);
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- final desktopTargetLineData = [
- new OrdinalSales('2014', 4),
- new OrdinalSales('2015', 20),
- new OrdinalSales('2016', 80),
- new OrdinalSales('2017', 65),
- ];
-
- final tableTargetLineData = [
- new OrdinalSales('2014', 30),
- new OrdinalSales('2015', 55),
- new OrdinalSales('2016', 15),
- new OrdinalSales('2017', 25),
- ];
-
- final mobileTargetLineData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 5),
- new OrdinalSales('2016', 45),
- new OrdinalSales('2017', 35),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- new charts.Series(
- id: 'Desktop Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- new charts.Series(
- id: 'Tablet Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- new charts.Series(
- id: 'Mobile Target Line',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileTargetLineData,
- )
- // Configure our custom bar target renderer for this series.
- ..setAttribute(charts.rendererIdKey, 'customTargetLine'),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/horizontal.dart b/charts_flutter/example/lib/bar_chart/horizontal.dart
deleted file mode 100644
index 0d6260af4..000000000
--- a/charts_flutter/example/lib/bar_chart/horizontal.dart
+++ /dev/null
@@ -1,104 +0,0 @@
-// 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.
-
-/// Horizontal bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class HorizontalBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- HorizontalBarChart(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- factory HorizontalBarChart.withSampleData() {
- return new HorizontalBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HorizontalBarChart.withRandomData() {
- return new HorizontalBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- // For horizontal bar charts, set the [vertical] flag to false.
- return new charts.BarChart(
- seriesList,
- animate: animate,
- vertical: false,
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- )
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/horizontal_bar_label.dart b/charts_flutter/example/lib/bar_chart/horizontal_bar_label.dart
deleted file mode 100644
index e2e9d165c..000000000
--- a/charts_flutter/example/lib/bar_chart/horizontal_bar_label.dart
+++ /dev/null
@@ -1,123 +0,0 @@
-// 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.
-
-/// Horizontal bar chart with bar label renderer example and hidden domain axis.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class HorizontalBarLabelChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- HorizontalBarLabelChart(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- factory HorizontalBarLabelChart.withSampleData() {
- return new HorizontalBarLabelChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HorizontalBarLabelChart.withRandomData() {
- return new HorizontalBarLabelChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- // Set a label accessor to control the text of the bar label.
- labelAccessorFn: (OrdinalSales sales, _) =>
- '${sales.year}: \$${sales.sales.toString()}')
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- // [BarLabelDecorator] will automatically position the label
- // inside the bar if the label will fit. If the label will not fit and the
- // area outside of the bar is larger than the bar, it will draw outside of the
- // bar. Labels can always display inside or outside using [LabelPosition].
- //
- // Text style for inside / outside can be controlled independently by setting
- // [insideLabelStyleSpec] and [outsideLabelStyleSpec].
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- vertical: false,
- // Set a bar label decorator.
- // Example configuring different styles for inside/outside:
- // barRendererDecorator: new charts.BarLabelDecorator(
- // insideLabelStyleSpec: new charts.TextStyleSpec(...),
- // outsideLabelStyleSpec: new charts.TextStyleSpec(...)),
- barRendererDecorator: new charts.BarLabelDecorator(),
- // Hide domain axis.
- domainAxis:
- new charts.OrdinalAxisSpec(renderSpec: new charts.NoneRenderSpec()),
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- // Set a label accessor to control the text of the bar label.
- labelAccessorFn: (OrdinalSales sales, _) =>
- '${sales.year}: \$${sales.sales.toString()}')
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/horizontal_bar_label_custom.dart b/charts_flutter/example/lib/bar_chart/horizontal_bar_label_custom.dart
deleted file mode 100644
index 54583d844..000000000
--- a/charts_flutter/example/lib/bar_chart/horizontal_bar_label_custom.dart
+++ /dev/null
@@ -1,140 +0,0 @@
-// 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.
-
-/// Horizontal bar chart with custom style for each datum in the bar label.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class HorizontalBarLabelCustomChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- HorizontalBarLabelCustomChart(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- static HorizontalBarLabelCustomChart createWithSampleData() {
- return new HorizontalBarLabelCustomChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HorizontalBarLabelCustomChart.withRandomData() {
- return new HorizontalBarLabelCustomChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final data = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- // Set a label accessor to control the text of the bar label.
- labelAccessorFn: (OrdinalSales sales, _) =>
- '${sales.year}: \$${sales.sales.toString()}',
- insideLabelStyleAccessorFn: (OrdinalSales sales, _) {
- final color = (sales.year == '2014')
- ? charts.MaterialPalette.red.shadeDefault
- : charts.MaterialPalette.yellow.shadeDefault.darker;
- return new charts.TextStyleSpec(color: color);
- },
- outsideLabelStyleAccessorFn: (OrdinalSales sales, _) {
- final color = (sales.year == '2014')
- ? charts.MaterialPalette.red.shadeDefault
- : charts.MaterialPalette.yellow.shadeDefault.darker;
- return new charts.TextStyleSpec(color: color);
- },
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- // The [BarLabelDecorator] has settings to set the text style for all labels
- // for inside the bar and outside the bar. To be able to control each datum's
- // style, set the style accessor functions on the series.
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- vertical: false,
- barRendererDecorator: new charts.BarLabelDecorator(),
- // Hide domain axis.
- domainAxis:
- new charts.OrdinalAxisSpec(renderSpec: new charts.NoneRenderSpec()),
- );
- }
-
- /// Create one series with sample hard coded data.
- static List> _createSampleData() {
- final data = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- return [
- new charts.Series(
- id: 'Sales',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: data,
- // Set a label accessor to control the text of the bar label.
- labelAccessorFn: (OrdinalSales sales, _) =>
- '${sales.year}: \$${sales.sales.toString()}',
- insideLabelStyleAccessorFn: (OrdinalSales sales, _) {
- final color = (sales.year == '2014')
- ? charts.MaterialPalette.red.shadeDefault
- : charts.MaterialPalette.yellow.shadeDefault.darker;
- return new charts.TextStyleSpec(color: color);
- },
- outsideLabelStyleAccessorFn: (OrdinalSales sales, _) {
- final color = (sales.year == '2014')
- ? charts.MaterialPalette.red.shadeDefault
- : charts.MaterialPalette.yellow.shadeDefault.darker;
- return new charts.TextStyleSpec(color: color);
- },
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/horizontal_pattern_forward_hatch.dart b/charts_flutter/example/lib/bar_chart/horizontal_pattern_forward_hatch.dart
deleted file mode 100644
index 68a7dd847..000000000
--- a/charts_flutter/example/lib/bar_chart/horizontal_pattern_forward_hatch.dart
+++ /dev/null
@@ -1,164 +0,0 @@
-// 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.
-
-/// Forward pattern hatch bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-/// Forward hatch pattern horizontal bar chart example.
-///
-/// The second series of bars is rendered with a pattern by defining a
-/// fillPatternFn mapping function.
-class HorizontalPatternForwardHatchBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- HorizontalPatternForwardHatchBarChart(this.seriesList,
- {this.animate = false});
-
- factory HorizontalPatternForwardHatchBarChart.withSampleData() {
- return new HorizontalPatternForwardHatchBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory HorizontalPatternForwardHatchBarChart.withRandomData() {
- return new HorizontalPatternForwardHatchBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- fillPatternFn: (OrdinalSales sales, _) =>
- charts.FillPatternType.forwardHatch,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- vertical: false,
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- fillPatternFn: (OrdinalSales sales, _) =>
- charts.FillPatternType.forwardHatch,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/pattern_forward_hatch.dart b/charts_flutter/example/lib/bar_chart/pattern_forward_hatch.dart
deleted file mode 100644
index a86c97563..000000000
--- a/charts_flutter/example/lib/bar_chart/pattern_forward_hatch.dart
+++ /dev/null
@@ -1,161 +0,0 @@
-// 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.
-
-/// Forward hatch pattern bar chart example.
-///
-/// The second series of bars is rendered with a pattern by defining a
-/// fillPatternFn mapping function.
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:flutter/material.dart';
-import 'package:charts_flutter/flutter.dart' as charts;
-
-class PatternForwardHatchBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- PatternForwardHatchBarChart(this.seriesList, {this.animate = false});
-
- factory PatternForwardHatchBarChart.withSampleData() {
- return new PatternForwardHatchBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory PatternForwardHatchBarChart.withRandomData() {
- return new PatternForwardHatchBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List> _createRandomData() {
- final random = new Random();
-
- final desktopSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', random.nextInt(100)),
- new OrdinalSales('2015', random.nextInt(100)),
- new OrdinalSales('2016', random.nextInt(100)),
- new OrdinalSales('2017', random.nextInt(100)),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- fillPatternFn: (OrdinalSales sales, _) =>
- charts.FillPatternType.forwardHatch,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
- // EXCLUDE_FROM_GALLERY_DOCS_END
-
- @override
- Widget build(BuildContext context) {
- return new charts.BarChart(
- seriesList,
- animate: animate,
- barGroupingType: charts.BarGroupingType.grouped,
- );
- }
-
- /// Create series list with multiple series
- static List> _createSampleData() {
- final desktopSalesData = [
- new OrdinalSales('2014', 5),
- new OrdinalSales('2015', 25),
- new OrdinalSales('2016', 100),
- new OrdinalSales('2017', 75),
- ];
-
- final tableSalesData = [
- new OrdinalSales('2014', 25),
- new OrdinalSales('2015', 50),
- new OrdinalSales('2016', 10),
- new OrdinalSales('2017', 20),
- ];
-
- final mobileSalesData = [
- new OrdinalSales('2014', 10),
- new OrdinalSales('2015', 15),
- new OrdinalSales('2016', 50),
- new OrdinalSales('2017', 45),
- ];
-
- return [
- new charts.Series(
- id: 'Desktop',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: desktopSalesData,
- ),
- new charts.Series(
- id: 'Tablet',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: tableSalesData,
- fillPatternFn: (OrdinalSales sales, _) =>
- charts.FillPatternType.forwardHatch,
- ),
- new charts.Series(
- id: 'Mobile',
- domainFn: (OrdinalSales sales, _) => sales.year,
- measureFn: (OrdinalSales sales, _) => sales.sales,
- data: mobileSalesData,
- ),
- ];
- }
-}
-
-/// Sample ordinal data type.
-class OrdinalSales {
- final String year;
- final int sales;
-
- OrdinalSales(this.year, this.sales);
-}
diff --git a/charts_flutter/example/lib/bar_chart/simple.dart b/charts_flutter/example/lib/bar_chart/simple.dart
deleted file mode 100644
index 2a99b2b3c..000000000
--- a/charts_flutter/example/lib/bar_chart/simple.dart
+++ /dev/null
@@ -1,104 +0,0 @@
-// 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.
-
-/// Bar chart example
-// EXCLUDE_FROM_GALLERY_DOCS_START
-import 'dart:math';
-// EXCLUDE_FROM_GALLERY_DOCS_END
-import 'package:charts_flutter/flutter.dart' as charts;
-import 'package:flutter/material.dart';
-
-class SimpleBarChart extends StatelessWidget {
- final List> seriesList;
- final bool animate;
-
- SimpleBarChart(this.seriesList, {this.animate = false});
-
- /// Creates a [BarChart] with sample data and no transition.
- factory SimpleBarChart.withSampleData() {
- return new SimpleBarChart(
- _createSampleData(),
- // Disable animations for image tests.
- animate: false,
- );
- }
-
- // EXCLUDE_FROM_GALLERY_DOCS_START
- // This section is excluded from being copied to the gallery.
- // It is used for creating random series data to demonstrate animation in
- // the example app only.
- factory SimpleBarChart.withRandomData() {
- return new SimpleBarChart(_createRandomData());
- }
-
- /// Create random data.
- static List