Android 图表开源库 MPAndroidChart 的 Swift 语言实现版:ios-charts
jopen
10年前
ios-charts是一款优秀 Android 图表开源库 MPAndroidChart 的 Swift 语言实现版(支持 Objective-C 和 Swift 调用)。缺省提供的示例代码为 Objective-C。
核心特性:
- 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) Y-Axis
- Finger drawing (draw values into the chart with touch-gesture)
- Highlighting values (with customizeable popup-views)
- Multiple / Separate Axes
- Save chart to camera-roll
- 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, ...)
图表类型:
Screenshots are currently taken from the original repository, as they render exactly the same :-)
- BarChart (grouped DataSets)
- Horizontal-BarChart
- PieChart (with selection, ...)
- ScatterChart (with squares, triangles, circles, ... and more)
- CandleStickChart (for financial data)
- RadarChart (spider web chart)
文档
Currently there's no need for documentation for the iOS version, as the API is 95% the same as on Android.
You can read the official MPAndroidChart documentation here: Wiki
Or you can see the ChartsDemo project and learn the how-tos from it.