Android 图表库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26467376/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android charting libraries
提问by user3488996
I am trying to find a fast and reliable charting library. After some searching, I found 4 libraries: AChartEngine[warning! official website is down and redirects to virus filled website!], WilliamChart, HelloChartsand AndroidPlot. I need some up to date feedback about the performance and the stability of these libraries because all the information I could find was outdated.
我试图找到一个快速可靠的图表库。经过一番搜索,我找到了 4 个库:AChartEngine[警告!官方网站已关闭,并重定向到病毒填写网站!],WilliamChart,HelloCharts和AndroidPlot。我需要一些关于这些库的性能和稳定性的最新反馈,因为我能找到的所有信息都已经过时了。
回答by Philipp Jahoda
You can use MPAndroidChart.
您可以使用MPAndroidChart。
It's native, free, easy to use, fast and reliable.
它是原生的、免费的、易于使用、快速且可靠的。
Core features, benefits:
核心功能、优点:
- LineChart, BarChart (vertical, horizontal, stacked, grouped), PieChart, ScatterChart, CandleStickChart (for financial data), RadarChart (spider web chart), BubbleChart
- Combined Charts (e.g. lines and bars in one)
- Scaling on both axes (with touch-gesture, axes separately or pinch-zoom)
- Dragging / Panning (with touch-gesture)
- Separate (dual) y-axes
- Highlighting values (with customizeable popup-views)
- Save chart to SD-Card (as image)
- 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, ...)
- Listeners for touch, gesture & selection callbacks
- Fully customizeable (paints, typefaces, legends, colors, background, dashed lines, ...)
- Realm.iomobile database support via MPAndroidChart-Realmlibrary
- Smooth rendering for up to 10.000data points in Line- and BarChart
- Lightweight (method count ~1.4K)
- Available as .jar file(only 500kb in size)
- Available as gradle dependencyand via maven
- Good documentation
- Example Project(code for demo-application)
- Google-PlayStore Demo Application
- Widely used, great support on both GitHuband stackoverflow - mpandroidchart
- Also available for iOS: Charts(API works the same way)
- Also available for Xamarin: MPAndroidChart.Xamarin
- LineChart、BarChart(垂直、水平、堆叠、分组)、PieChart、ScatterChart、CandleStickChart(用于财务数据)、RadarChart(蜘蛛网图表)、BubbleChart
- 组合图表(例如,线和条合二为一)
- 在两个轴上缩放(使用触摸手势、单独的轴或捏缩放)
- 拖动/平移(使用触摸手势)
- 分离(双)y 轴
- 突出显示值(使用可自定义的弹出视图)
- 将图表保存到 SD 卡(作为图像)
- 预定义的颜色模板
- 图例(自动生成,可定制)
- 可定制的轴(x 轴和 y 轴)
- 动画(在 x 轴和 y 轴上构建动画)
- 限制线(提供附加信息、最大值等)
- 触摸、手势和选择回调的监听器
- 完全可定制(油漆、字体、图例、颜色、背景、虚线……)
- 通过MPAndroidChart-Realm库支持Realm.io移动数据库
- 线条和条形图中多达10.000 个数据点的平滑渲染
- 轻量级(方法数~1.4K)
- 可用作.jar 文件(大小仅 500kb)
- 可用作gradle 依赖项和通过maven
- 良好的文档
- 示例项目(演示应用程序代码)
- Google-PlayStore 演示应用程序
- 广泛使用,对GitHub和 stackoverflow都有很好的支持- mpandroidchart
- 也可用于iOS:图表(API 的工作方式相同)
- 也可用于Xamarin:MPAndroidChart.Xamarin
Drawbacks:
缺点:
- No official support for dynamic & realtimedata, limited performance in that area
- 没有官方支持动态和实时数据,该领域的性能有限
Disclaimer: I am the developer of this library.
免责声明:我是这个库的开发者。
回答by Bartosz Bilicki
See Android arsenal(category Graphics) for more libraries.
有关更多库,请参阅Android 武器库(类别图形)。
回答by diogobernardino
If you're looking for something more straight forward to implement (and it doesn't include pie/donut charts) then I recommend WilliamChart. Specially if motion takes an important role in your app design. In other hand if you want featured charts, then go for MPAndroidChart.
如果您正在寻找更直接的东西来实现(并且它不包括饼图/甜甜圈图),那么我推荐WilliamChart。特别是如果动作在您的应用程序设计中扮演重要角色。另一方面,如果您想要特色图表,请选择MPAndroidChart。
回答by andrew749
You can create a plethora of different chart types relatively quickly with loads of customizable options.
您可以使用大量可自定义的选项相对快速地创建大量不同的图表类型。
回答by arijit
- Achartengine: I have used this. Although for real time graph this might not give good performance if you do not tweak properly.
- Achartengine:我用过这个。尽管对于实时图形,如果您没有正确调整,这可能不会提供良好的性能。