![Release](https://img.shields.io/github/release/PhilJay/MPAndroidChart.svg?label=maven central)
A simple charting library for Android, supporting line-, bar-, scatter-, candlestick-, pie- and radarcharts (spider web), as well as scaling, dragging, selecting and animations. Supporting Android 2.2 (API level 8) and upwards.
Remember: It's all about the looks.
The experimental branch might contain new features that are still buggy. It is recommended to be safe and only make use of the code on the master branch.
Forks, pull-requests or any other forms of contribution are always welcome.
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.
PayPal
Gittip
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, feel free to contact me. Since I would very much like that other users of this library can also benefit from your question, I am asking you to contact me via e-mail only as a last option. Instead, you should:
- Make sure you are using the latest version of the library. Check the release-section.
- Study the Documentation-Wiki
- Search or open questions on stackoverflow with the
mpandroidchart
tag - Search known issues for your problem (open and closed)
- Create new issues (please search known issues before, do not create duplicate issues)
You can let me know via e-mail that you have opened a stackoverflow question so that I might get to answering it more quickly. Thank you.
Core features:
- Scaling on both axes (with touch-gesture, axes separately or pinch-zoom)
- Dragging / Panning (with touch-gesture)
- Combined-Charts (line-, bar-, scatter-, candle-data)
- Finger drawing (draw values into the chart with touch-gesture)
- Highlighting values (with customizeable popup-views)
- Multiple / Separate Axes
- Save chart to SD-Card (as image, or as .txt file)
- Predefined color templates
- Legends (generated automatically, customizeable)
- Customizeable Axes (both x- and y-axis)
- Animations (build up animations, on both x- and y-axis)
- Limit lines (providing additional information, maximums, ...)
- Fully customizeable (paints, typefaces, legends, colors, background, gestures, dashed lines, ...)
Chart types:
-
BarChart (with legend, simple design)
- BarChart (grouped DataSets)
- Horizontal-BarChart
- PieChart (with selection, ...)
- ScatterChart (with squares, triangles, circles, ... and more)
- CandleStickChart (for financial data)
- RadarChart (spider web chart)
In order to use the library, there are 4 options:
1. Gradle dependency
- Add the following to your
build.gradle
:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.PhilJay:MPAndroidChart:v2.0.7'
}
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.0.7</version>
</dependency>
3. jar file only
- Download the latest .jar file from the releases section
- Copy the mpandroidchartlibrary-.jar file into the
libs
folder of your Android application project - Start using the library
4. clone whole repository
- Open your commandline-input and navigate to your desired destination folder (where you want to put the library)
- Use the command
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) - Import the library folder (
MPChartLib
) into your Eclipse workspace - Add it as a reference to your project: referencing library projects in Eclipse
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 mikegr and ph1lb4 for their contributions to this project.