Skip to content

AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 14+ (Android 4.0) and features dozens of built-in chart types.

SeppPenner/AnyChart-Android

 
 

Repository files navigation

AnyChart - Robust JavaScript/HTML5 Chart library for any project

AnyChart for Android

API

AnyChart Android Charts is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 14+ (Android 4.0) and features dozens of built-in chart types.

Installation

Leiningen

Add this to the project.clj file, at the end of repositories:

:repositories [["jitpack" "https://jitpack.io"]]

Add the dependency:

:dependencies [[com.github.AnyChart/AnyChart-Android "0.1.9"]]

SBT

Add this to the build.sbt, at the end of resolvers:

resolvers += "jitpack" at "https://jitpack.io"

Add the dependency:

libraryDependencies += "com.github.AnyChart" % "AnyChart-Android" % "0.1.9"

Maven

Add the JitPack repository to the build file:

<repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
</repositories>

Add the dependency:

<dependency>
    <groupId>com.github.AnyChart</groupId>
    <artifactId>AnyChart-Android</artifactId>
    <version>0.1.9</version>
</dependency>

Gradle

Add this to the root build.gradle at the end of repositories (WARNING: Make sure you add this under allprojects not under buildscript):

allprojects {
        repositories {
                ...
                maven { url 'https://jitpack.io' }
        }
}

Add the dependency to the project build.gradle:

dependencies {
        compile 'com.github.AnyChart:AnyChart-Android:0.1.9'
}

JAR/AAR File

Download the latest AAR. Copy AAR file into the libs folder of the application project.

If you are using Android Studio:

  1. Right click on a project and choose "Open Module Settings".
  2. Click the plus button in the top left to add a new module.
  3. Choose "Import .JAR or .AAR Package".
  4. Find the AAR file.
  5. In the app's module click on the dependencies tab and add the new module as a dependency.

Getting Stated using Gradle

You should have already set up the latest Android Studio.

Create a new project and select appropriate API level (AnyChart library for Android compatible with API 15+).

Create new project


Create new project

Select API level


Select API level

Add an empty Activity and put in layout and Activity name.

Add Activity


Create new project

Customize Activity


Select API level

Add the repository to the project build.gradle at the end of repositories (WARNING: Make sure you add it under allprojects, not under the buildscript).

allprojects {
        repositories {
                ...
                maven { url 'https://jitpack.io' }
        }
}

Then add the dependency to the module build.gradle and synchronize project with Gradle.

dependencies {
        compile 'com.github.AnyChart:AnyChart-Android:0.1.9'
}

Add the repository


Add repository in your root build.gradle

Add the dependency and sync the project


Add the dependency in your project build.gradle and sync project

Add AnyChart view to the Activity layout.

<com.anychart.anychart.AnyChartView
        android:id="@+id/any_chart_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

Add a view to a layout


Add repository in your root build.gradle

Add Java code to the Activity. For example, if you want to create pie chart:

Pie pie = AnyChart.pie();

List<DataEntry> data = new ArrayList<>();
data.add(new ValueDataEntry("John", 10000));
data.add(new ValueDataEntry("Jake", 12000));
data.add(new ValueDataEntry("Peter", 18000));

AnyChartView anyChartView = (AnyChartView) findViewById(R.id.any_chart_view);
anyChartView.setChart(pie);

Add Java code


Add repository to the root build.gradle

Make sure you have these package imports at the top of your Activity file.

import com.anychart.anychart.AnyChart;
import com.anychart.anychart.AnyChartView;
import com.anychart.anychart.DataEntry;
import com.anychart.anychart.Pie;
import com.anychart.anychart.ValueDataEntry;

import java.util.ArrayList;
import java.util.List;

Build and run your app.

Build and run


Build and run

Running App


Running app

Chart Types

AnyChart product family includes scores of chart types and we're constantly adding new ones.

Pie Chart


Pie Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Column Chart


Column Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Line Chart


Line Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Venn Diagram


Venn Diagram - AnyChart Sample (APK) / Code Snippet / Documentation

Heat Map Chart


Heat Map Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Waterfall Chart


Waterfall Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Tree Map Chart


Tree Map Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Scatter Chart


Scatter Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Resource Chart


Resource Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Radar Chart


Radar Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Range Chart


Range Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Vertical Chart


Vertical Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Funnel Chart


Funnel Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Pert Chart


Pert Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Tag Cloud


Tag Cloud - AnyChart Sample (APK) / Code Snippet / Documentation

Polar Chart


Polar Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Pyramid Chart


Pyramid Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Bubble Chart


Bubble Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Area Chart


Area Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Bar Chart


Bar Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Box Chart


Box Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Mosaic Chart


Mosaic Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Mekko Chart


Mekko Chart - AnyChart Sample (APK) / Code Snippet / Documentation

3D Bar Chart


3D Bar Chart - AnyChart Sample (APK) / Code Snippet / Documentation

3D Column Chart


3D Column Chart - AnyChart Sample (APK) / Code Snippet / Documentation

3D Area Chart


3D Area Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Circular Gauge


Circular Gauge Sample (APK) / Code Snippet / Documentation

Pareto Chart


Pareto Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Combined Chart


Combined Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Quadrant Chart


Quadrant Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Hilo Chart


Hilo Chart - AnyChart Sample (APK) / Code Snippet / Documentation

OHLC Chart


OHLC Chart - AnyChart Sample (APK) / Code Snippet / Documentation

Bubble Map


Bubble Map - AnyChart Sample (APK) / Code Snippet / Documentation

Choropleth Map


Choropleth Map - AnyChart Sample (APK) / Code Snippet / Documentation

Point Map


Point Map - AnyChart Sample (APK) / Code Snippet / Documentation

Connector Map


Connector Map - AnyChart Sample (APK) / Code Snippet / Documentation
 

Running Demos

Clone or download the project.

Open Android Studio and import the project.

Import Project


Import project

Run the project.

Run Project


Run project

Select Chart


Select Chart

Running App


Running App

Contacts

Links

License

© AnyChart.com - JavaScript charts. All rights reserved.

About

AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 14+ (Android 4.0) and features dozens of built-in chart types.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%