An easy-to-use Android charts library with animation.

Related tags

Charts AndroidCharts
Overview

AndroidCharts

A simple Android charts library.

Known Uses in

Including in Your Project

Eclipse

  • Import /AndroidCharts folder.
  • Move /java folder to /src folder.
  • mkdir libs, copy android-support-v4.jar to /libs.

Gradle

repositories {
    jcenter()
}
compile 'im.dacer:AndroidCharts:1.0.4'

Usage

Line Chart

Line Chart

<HorizontalScrollView>
        <view
            android:layout_width="wrap_content"
            android:layout_height="300dp"
            class="im.dacer.androidcharts.LineView"
            android:id="@+id/line_view" />
</HorizontalScrollView>
LineView lineView = (LineView)findViewById(R.id.line_view);
lineView.setDrawDotLine(false); //optional
lineView.setShowPopup(LineView.SHOW_POPUPS_MAXMIN_ONLY); //optional
lineView.setBottomTextList(strList);
lineView.setColorArray(new int[]{Color.BLACK,Color.GREEN,Color.GRAY,Color.CYAN});
lineView.setDataList(dataLists); //or lineView.setFloatDataList(floatDataLists)

Bar Chart

Bar Chart

<HorizontalScrollView>
        <view
            android:layout_width="wrap_content"
            android:layout_height="300dp"
            class="im.dacer.androidcharts.BarView"
            android:id="@+id/bar_view" />
</HorizontalScrollView>
BarView barView = (BarView)findViewById(R.id.bar_view);\
barView.setBottomTextList(strList);
barView.setDataList(dataList,100);

Clock Pie Chart

Clock Pie Chart

<view
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    class="im.dacer.androidcharts.ClockPieView"
    android:id="@+id/clock_pie_view" />
ClockPieView pieView = (ClockPieView)findViewById(R.id.clock_pie_view);
ArrayList<ClockPieHelper> pieHelperArrayList = new ArrayList<ClockPieHelper>();
pieView.setDate(pieHelperArrayList);

Pie Chart

Pie Chart

<view
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    class="im.dacer.androidcharts.PieView"
    android:id="@+id/pie_view" />
PieView pieView = (PieView)findViewById(R.id.pie_view);
ArrayList<PieHelper> pieHelperArrayList = new ArrayList<PieHelper>();
pieView.setDate(pieHelperArrayList);
pieView.selectedPie(2); //optional
pieView.setOnPieClickListener(listener) //optional
pieView.showPercentLabel(false); //optional

License

The MIT License (MIT)

Copyright (c) 2013 Ding Wenhao

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributing

Please fork this repository and contribute back using pull requests.

Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests are welcomed

Comments
  • Draw chart of : Floating point Value

    Draw chart of : Floating point Value

    Hi @shaishavgandhi05

    is it possible to draw a chart of floating point value as per your library it only support Integer value, if it's possible then how? please guide me.

    Thanks. (_)

    opened by GauravCreed 4
  • Compile Errors

    Compile Errors

    I cloned in today and compiled the AndoirdCharts:AndroidCharts project, The LineView class wouldn't compile it looks like there are issues with the R file and missing variable measurespec. I removed that class and everything else works fine. Nice lib!

    opened by darland6 2
  • When i try to add this line

    When i try to add this line "compile 'im.dacer:AndroidCharts:1.0.1" in app gradle it shows this error

    `Error:Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed : Attribute [email protected] value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9-43 is also present at [im.dacer:AndroidCharts:1.0.1] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher). Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:5:5-18:19 to override.`

    opened by SaravanarajaGITHUB 1
  • add function

    add function

    i changed sum method edit and add.

    1. can multi series ( Max line 3)
    2. can select popup mode. ( (1) Max , Min (2) ALL (3) None) lineView.setPOPUP_TYPE(lineView.MAXMIN_ONLY); lineView.setPOPUP_TYPE(lineView.ALL); lineView.setPOPUP_TYPE(lineView.NONE);
    3. can select BackgroundLine lineView.setDOTLINE(false);
    opened by leeyc09 1
  • Request : Include Android Library in Eclipse

    Request : Include Android Library in Eclipse

    Your library looks really good.

    But would you like to delegate new source code for Eclipse?

    That will be more popular than Android Studio.

    Really Thanks,

    opened by MrTranduchuy 1
  • Set custom colors for lines

    Set custom colors for lines

    • Using a white 9 patch png and setting color filters on it
    • Ability for user to set their own colors

    Solves #17

    Signed-off-by: shaishavgandhi05 [email protected]

    opened by ShaishavGandhi 0
  • Problem in large values with small changes

    Problem in large values with small changes

    Hi When i used this library for drawing chart with large values and small changes ( eg : 42000 , 42050 , ... ) Chart dots are in one line without any distance.

    What is problem ? you are any solution for this situation ?

    opened by mohsenk 0
  • Updated to Android Studio 0.8.1 and LineView point selection fix

    Updated to Android Studio 0.8.1 and LineView point selection fix

    c0f12b25693e3eb91fd0091ef8584c5446942266

    Lastest Android Studio version is 0.8.1, so I updated project settings to work with new IDE.

    • Changed builTools vesion to 19.1.0.
    • Changed targetSdk version to 19.
    • Changed android gradle plugin version to 0.12.+.
    • Changed gradle verstion to 1.12.
    • Fixed release buildType for library build.gradle.
    • Added build/ to root .gitignore.

    ba8502d8b3aeafd3c0adc2c140c8bcd2f06884dc :

    Previously selected point on LineView changed on every touch. And view had issue with scrolling that looks like this:

    LineView before

    It's not expected behavior, as for me. So I fixed this, added some optimizations and now it looks like this:

    LineView now

    cf489f0a003df8662a97c9dd577497605c9cd168 :

    Just avoiding new object instances creation in onDraw(). Using single tmp instance.

    opened by dector 0
  • Minor change to improve Android studio compatibility.

    Minor change to improve Android studio compatibility.

    Using Android studio, the layout preview have a null pointer exception because of these not initialized arrays. To be honest I didn't had time to review to whole project so I don't know if these changes makes sense or won't break anything else.

    opened by k-ni-ght 0
  • Use List instead of ArrayList as parameters where possible

    Use List instead of ArrayList as parameters where possible

    Since the library doesn't really care whether the passed data is inside an ArrayList or a LinkedList or any other implementation of List, it should use ArrayList's superclass List as parameters instead of forcing users to make use of this one specific implementation.

    opened by fynngodau 0
Releases(v1.0.4)
Owner
HackPlan
HackPlan
An open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use

android-compose-charts This is an open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use. Just couples

Mahmoud Ibrahim 16 Sep 23, 2022
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.

AnyChart for Android AnyChart Android Charts is an amazing data visualization library for easily creating interactive charts in Android apps. It runs

AnyChart 2k Nov 18, 2022
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Diogo Bernardino 4.9k Nov 29, 2022
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Diogo Bernardino 4.8k Dec 22, 2021
Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations

HelloCharts for Android Charting library for Android compatible with API 8+(Android 2.2). Works best when hardware acceleration is available, so API 1

Leszek Wach 7.3k Nov 23, 2022
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

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

Philipp Jahoda 35.8k Nov 28, 2022
YBKChart is a library of 3D graphics charts for Android. 📊

YBKChart is a library of 3D graphics charts for Android. ?? For more information, see the Wiki. Chart List Pie Chart Download Use gradle. rep

ByungKwan Yun 10 Jun 19, 2022
Library for charts in android with animations

Charts Gradle Setup Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: allprojects {

Ayush Saini 3 Oct 5, 2021
Donut is an Android library which helps you to easily create beautiful doughnut-like charts.

Doughnut-like graph view capable of displaying multiple datasets with assignable colors

Futured 505 Nov 28, 2022
An android compose library with different Graphs and Charts

plot An android compose library with different Graphs and Charts (currently supports only Line graph, more types will be added soon) Download reposito

Madrapps 101 Nov 23, 2022
Straiberry Charts - An awesome Chart library for android

Straiberry Charts An awesome Chart library for android Straiberry · Report Bug · Request Feature Getting Started Adding dependecies Add it in your roo

StrAIberry 28 Oct 24, 2022
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop. Graph Effects How to use? 1, show Pie Chart in Jetpa

Chen Pan 107 Nov 6, 2022
Simple Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts-desktop Simple Compose Charts for multi-platform. Including Android, Web, Desktop. Compose multiplatform for Android: compose-charts. G

Chen Pan 11 Nov 4, 2022
Arc Chart View (Draw Creative Statistic Arc Charts)

ArcChartViewDemo You can use this library to draw Arc charts and show your statistics or anything you want or maybe get some ratings from user. you ca

Iman khoshabi 106 Nov 22, 2022
TChart - Simple and fast charts.

TChart - Simple and fast charts.

null 30 Sep 20, 2022
An easy to use graphical chia plot manager & optimizer for windows, mac & linux. You're a farmer, Harry!

Harry Plotter You're a farmer, Harry! Harry Plotter is an easy to use magical Chia plot manager for muggles! It works on Windows, MacOS, and Linux. It

Andrew Bueide 132 Oct 26, 2022
A basic chart written by kotlin. Support animation loading, touch event monitoring and JSON data.

A basic chart written by kotlin. Support animation loading, touch event monitoring and JSON data.

null 1 Jul 15, 2022