Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.aivenlau:MPAndroidChart:v2.1.3'
}
dependencies {
implementation("com.github.aivenlau:MPAndroidChart:v2.1.3")
}
<dependency>
<groupId>com.github.aivenlau</groupId>
<artifactId>MPAndroidChart</artifactId>
<version>v2.1.3</version>
</dependency>
libraryDependencies += "com.github.aivenlau" % "MPAndroidChart" % "v2.1.3"
:dependencies [[com.github.aivenlau/MPAndroidChart "v2.1.3"]]

Remember: It's all about the looks.
MPAndroidChart is a powerful & easy to use chart library for Android, supporting line-, bar-, scatter-, candlestick-, bubble-, pie- and radarcharts (spider web), as well as scaling, dragging (panning), selecting and animations. Works on Android 2.2 (API level 8) and upwards.
An iOS version of this library is now available, go check it out: ios-charts
Are you using this library? Add your project to the references.
This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!
PayPal
Spread the word
<a href="https://twitter.com/intent/tweet?text=Check%20out%20the%20awesome%20MPAndroidChart%20library%20on%20Github:%20https://github.com/PhilJay/MPAndroidChart" target="_blank" title="share to twitter" style="width:100%"><img src="https://github.com/PhilJay/MPAndroidChart/blob/master/design/twitter_icon.png" title="Share on Twitter" width="35" height=35 /> <a href="https://plus.google.com/share?url=https://github.com/PhilJay/MPAndroidChart" target="_blank" title="share to twitter" style="width:100%"><img src="https://github.com/PhilJay/MPAndroidChart/blob/master/design/googleplus_icon.png" title="Share on Google+" width="35" height=35 /> <a href="https://www.facebook.com/sharer/sharer.php?u=https://github.com/PhilJay/MPAndroidChart" target="_blank" title="share to twitter" style="width:100%"><img src="https://github.com/PhilJay/MPAndroidChart/blob/master/design/facebook_icon.png" title="Share on Facebook" width="35" height=35 />
Follow me on Twitter: @PhilippJahoda
Contact me on LinkedIn: PhilippJahoda
Look me up on StackOverflow: Philipp Jahoda
For a brief overview of the most important features, please download the PlayStore Demo MPAndroidChart Example.apk and try it out. The corresponding code for the demo-application is also included in this repository inside the MPChartExample folder.
If you are having questions or problems, you should:
mpandroidchart
tagCore features:
Chart types:
LineChart (with legend, simple design)
LineChart (cubic lines)
LineChart (single DataSet)
Combined-Chart (bar- and linechart in this case)
BarChart (with legend, simple design)
In order to use the library, there are 4 options:
1. Gradle dependency
build.gradle
:repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.PhilJay:MPAndroidChart:v2.1.3'
}
2. Maven
Add the following to your pom.xml
:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.PhilJay</groupId>
<artifactId>MPAndroidChart</artifactId>
<version>v2.1.3</version>
</dependency>
3. jar file only
libs
folder of your Android application project4. clone whole repository
git clone https://github.com/PhilJay/MPAndroidChart.git
to download the full MPAndroidChart repository to your computer (this includes the folder of the library project as well as the example project)MPChartLib
) into your Eclipse workspaceIn case you are using Proguard, you will need to whitelist MPAndroidChart, which requires to add the following line to your Proguard configuration file.
-keep class com.github.mikephil.charting.** { *; }
If you don't do this, animations might not work.
For a detailed documentation, please have a look at the Wiki.
Furthermore, you can also rely on the MPChartExample folder and check out the example code in that project. The corresponding application to the example project is also available in the Google PlayStore.
You have a problem that cannot be solved by having a look at the example project and documentation?
No problem, let's talk:
Copyright 2015 Philipp Jahoda
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.
Special thanks to danielgindi, mikegr, ph1lb4 and jitpack.io for their contributions to this project.