An easy-to-use Android charts library with animation.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 77c0e19 Aug 25, 2017
Permalink
Failed to load latest commit information.
AndroidCharts v1.0.4 Aug 25, 2017
AndroidChartsExample Reformat Code Aug 25, 2017
gradle update gradle version Aug 25, 2017
pic PieView finished Sep 27, 2014
.gitignore Updating to Android Studio 0.8.1 Jun 29, 2014
LICENSE Initial commit Nov 15, 2013
README.md v1.0.4 Aug 25, 2017
build.gradle update gradle version Aug 25, 2017
gradle.properties init Nov 15, 2013
gradlew fix Compile Errors #10 Sep 13, 2014
gradlew.bat init Nov 15, 2013
settings.gradle init Nov 15, 2013

README.md

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