PieCharts
Easy to use and highly customizable pie charts library for iOS
Swift 3.0, iOS 8+
Features:
- Customizable slices
- Add overlays using simple UIViews
- Interactive
- Animated
- Dynamic slice insertion
- Reusable components via extensible layer system
- Configurable in interface builder
- Legends. This is in a separate project to keep things focused and reusable.
Installation
CocoaPods
Add to your Podfile:
Carthage
Add to your Cartfile:
github "i-schuetz/PieCharts"
Usage
Basic chart:
Configurable in interface builder, with live update of the view:
Overlays:
Overlays are implemented using layers. There are several built in layers and you also can implement your own ones.
To add text e.g. text labels inside the slices + text with lines outside, simply:
Each layer has its own customization options. For example, here we customize the plain labels layer:
This is the custom views layer, which makes possible to create custom views:
Interactivity, events:
Conform to PieChartDelegate
to react to interaction and other events: