I have a need to render and display charts (bar charts for now, but more types may be needed later) in an Android app I开发者_运维问答'm working on. I've done some looking around and it doesn't look like there are any really good, mature charting libraries for Android yet.
Do you know any?
Edit to add some details of requirements
- Bar Charts
- Horizontal bar charts
- Double stacked bar charts
- Axis labels (including rotated 90 degrees on the y axis)
- Labels above each bar on the chart
- Shaded or custom backgrounds
achartengine is an open source charting library. It also has intent based graphs. It is easy to use and has apache licence 2.0 so that if at all you want, you can modify the code to do fine customization. The documentation is not that good but the demo examples are enough to understand all things required for all type of charts.
Supported chart types:
- line chart
- area chart
- scatter chart
- time chart
- bar chart
- pie chart
- bubble chart
- doughnut chart
- range (high-low) bar chart
I used http://code.google.com/p/chartdroid/
"ChartDroid is an Intent-based "library application" for static chart and graph generation on Android."
MPAndroidChart
A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.
Core features:
- 8 different chart types
- Scaling on both axes (with touch-gesture, axes separately or pinch-zoom)
- Dragging / Panning (with touch-gesture)
- Combined-Charts (line-, bar-, scatter-, candle-data)
- Dual (separate) Axes
- Customizable Axes (both x- and y-axis)
- Highlighting values (with customizable popup-views)
- Save chart to SD-Card (as image, or as .txt file)
- Predefined color templates
- Legends (generated automatically, customizable)
- Animations (build up animations, on both xPx- and yPx-axis)
- Limit lines (providing additional information, maximums, ...)
- Fully customizable (paints, typefaces, legends, colors, background, gestures, dashed lines, ...)
- Smooth zooming and scrolling for up to 30.000 data points in Line- and BarChart
- Gradle support
- Plotting data directly from Realm.io mobile database: MPAndroidChart-Realm
If someone is still interested, there is NChart3D that allows to 2d and 3d charts: nchart3d.com.
Take a look at Androidplot - it includes all of the features you've listed. As an additional data point here's a comparison of the current top charting libraries for Android.
精彩评论