Simple yet flexible JavaScript charting library that renders HTML5 charts on the canvas element.
PhilJay/MPAndroidChart
An Android charting library for line, bar, pie, radar, bubble and candlestick charts, with zoom, pan and animations, plus a Jetpack Compose module.
- Stars
- 38,185
- Forks
- 8,966
- Open issues
- 1
- Last commit
- 29 days ago
What is it?
MPAndroidChart is a chart library for Android that draws nine chart types, including line, bar, pie, radar, bubble and candlestick charts. Developers add charts to a layout or to a Jetpack Compose screen and feed them data through entry, data set and data objects, then customize axes, markers, colours and animations through properties and lambdas.
The library supports zooming, dragging, value highlighting and tooltips-style markers, and the 4.0 release is a Kotlin rewrite with a separate MPChartCompose module for Compose. Java callers can use it without writing Kotlin. Requirements are minSdk 23 and Java 17, and the project provides guides, generated API docs for each release, and an example app in the repository.
Key features
- 01Nine chart types including line, bar, pie, radar, bubble and candlestick
- 02Zooming, dragging and value highlighting with selection callbacks
- 03Customizable axes, markers, colours and animations through properties
- 04Separate Jetpack Compose module with composable chart functions
- 05Usable from Java without Kotlin
Use cases
- Showing sales or usage trends as line or bar charts in an Android app
- Building interactive financial candlestick charts with zoom and tap selection
- Adding chart views to a Compose-based Android interface
Quick start
- 1
Add the jitpack.io repository in settings.gradle.kts
- 2
Add the MPChartLib v4.0.1 dependency in build.gradle.kts
implementation("com.github.PhilJay.MPAndroidChart:MPChartLib:v4.0.1") - 3
Put a chart in a layout, then give it data and animate
Things to know
- Requires minSdk 23, Java 17 and Kotlin 2.0 or newer.
- The Compose module needs compileSdk 37.
- Version 4.0 has different coordinates from 3.x, so pin the version rather than tracking the newest.
In collections
Topics
FAQ
- What is MPAndroidChart?
- An Android charting library for line, bar, pie, radar, bubble and candlestick charts, with zoom, pan and animations, plus a Jetpack Compose module. MPAndroidChart is a chart library for Android that draws nine chart types, including line, bar, pie, radar, bubble and candlestick charts. Developers add charts to a layout or to a Jetpack Compose screen and feed them data through entry, data set and data objects, then customize axes, markers, colours and animations through properties and lambdas.
- Is MPAndroidChart free to use? What license does it have?
- MPAndroidChart is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is MPAndroidChart still maintained?
- Actively maintained. The last commit to MPAndroidChart was on Oct 9, 2026.
- What can I use MPAndroidChart for?
- Showing sales or usage trends as line or bar charts in an Android app Building interactive financial candlestick charts with zoom and tap selection Adding chart views to a Compose-based Android interface
- How do I install MPAndroidChart?
- Add the jitpack.io repository in settings.gradle.kts Add the MPChartLib v4.0.1 dependency in build.gradle.kts: implementation("com.github.PhilJay.MPAndroidChart:MPChartLib:v4.0.1") Put a chart in a layout, then give it data and animate
- Where can I get MPAndroidChart?
- The source code and installation instructions are on GitHub: https://github.com/PhilJay/MPAndroidChart
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A zero-dependency JavaScript library for rendering simple, responsive SVG charts with a GitHub-inspired look.
A JavaScript chart library that renders line, bar and other charts in a hand-drawn, xkcd-like sketchy style using SVG.
A free, open-source JavaScript library for binding data to SVG, Canvas and HTML to build custom, data-driven visualizations.
Free, open-source interactive plotting library for .NET that renders charts in GUI apps, consoles, Blazor and notebooks.
A Go web service that plots a GitHub repository's star count over time as an SVG chart.