AnyChart Android Charts 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.

Table of Contents


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.0.3"]]
                
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.0.3"
                
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.0.3</version>
</dependency>
                
Gradle

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


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

Add the dependency to the project build.gradle:


dependencies {
        compile 'com.github.AnyChart:AnyChart-Android:0.0.3'
}
                
JAR/AAR File

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

If you are using Android Studio:

  • Right click on a project and choose "Open Module Settings".
  • Click the plus button in the top left to add a new module.
  • Choose "Import .JAR or .AAR Package".
  • Find the AAR file.
  • 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 | AnyChart Android Charts
Select API level
Select API level | AnyChart Android Charts

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

Add Activity
Add Activity | AnyChart Android Charts
Customize Activity
Customize Activity | AnyChart Android Charts

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.0.3'
}
                
Add the repository
Add the repository | AnyChart Android Charts
Add the dependency and sync the project
Add the dependency and sync the project | AnyChart Android Charts

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 a view to a layout | AnyChart Android Charts

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 Java code | AnyChart Android Charts

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 | AnyChart Android Charts
Running App
Running App | AnyChart Android Charts

Chart Types

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

Pie Chart
Pie Chart | AnyChart Android Charts
Column Chart
Column Chart | AnyChart Android Charts
Line Chart
Line Chart | AnyChart Android Charts
Venn Diagram
Venn Diagram | AnyChart Android Charts
Heat Map Chart
Heat Map Chart | AnyChart Android Charts
Waterfall Chart
Waterfall Chart | AnyChart Android Charts
Tree Map Chart
Tree Map Chart | AnyChart Android Charts
Scatter Chart
Scatter Chart | AnyChart Android Charts
Resource Chart
Resource Chart | AnyChart Android Charts
Radar Chart
Radar Chart | AnyChart Android Charts
Range Chart
Range Chart | AnyChart Android Charts
Vertical Chart
Vertical Chart | AnyChart Android Charts
Funnel Chart
Funnel Chart | AnyChart Android Charts
Pert Chart
Pert Chart | AnyChart Android Charts
Tag Cloud
Tag Cloud | AnyChart Android Charts
Polar Chart
Polar Chart | AnyChart Android Charts
Pyramid Chart
Pyramid Chart | AnyChart Android Charts
Bubble Chart
Bubble Chart | AnyChart Android Charts
Area Chart
Area Chart | AnyChart Android Charts
Bar Chart
Bar Chart | AnyChart Android Charts
Box Chart
Box Chart | AnyChart Android Charts
Mosaic Chart
Mosaic Chart | AnyChart Android Charts
Mekko Chart
Mekko Chart | AnyChart Android Charts
3D Bar Chart
3D Bar Chart | AnyChart Android Charts
3D Column Chart
3D Column Chart | AnyChart Android Charts
3D Area Chart
3D Area Chart | AnyChart Android Charts
Circular Gauge
Circular Gauge | AnyChart Android Charts
Pareto Chart
Pareto Chart | AnyChart Android Charts
Combined Chart
Combined Chart | AnyChart Android Charts

Running Demos

Clone or download the project.

Open Android Studio and import the project.

Import Project
Import Project | AnyChart Android Charts

Run the project.

Run Project
Run Project | AnyChart Android Charts
Select Chart
Select Chart | AnyChart Android Charts
Running App
Running App | AnyChart Android Charts

Contacts


License

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