Skip to content

About

Custom pie chart control

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

LeavesDiagram

Custom animated pie chart component

Installation

Swift PM

Add package dependency to the your xcode project or package file

Package.swift:

dependencies: [
    .package(url: "git@github.com:josshad/LeavesDiagram.git", "0.0.0"..."0.2.0")
 ]

Xcode project:

  • Select project in Project Navigator
  • Select your project in main window
  • Go to Package dependencies tab
  • Tap on + and enter git@github.com:josshad/LeavesDiagram.git into search fiel
  • Make version or branch dependencies

CocoaPods

To install LeavesDiagram using CocoaPods, please integrate it in your existing Podfile, or create a new Podfile:

target 'MyApp' do
  pod 'LeavesDiagram'
end

Then run pod install.

Manual

Add files from Sources/LeavesDiagram to your project

Customization

Initialisation parameters:

  • radius: Maximum leaf radius. If not specified — than radius will be min(height, width)/2
  • fullAngle: Angle between first and last leaf. Default is 2π (360°) — full circle
  • strokeColor: Stroke color of each leaf. If not specified — same color as for leaf

Additional paramters:

  • leafSelectionStyle: Allow to change behaviour on select the snail leaf:
  1. scale

  1. opacity Changes alpha of the leaf

  2. none

About

Custom pie chart control

Resources

Stars

3 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages