Latest 1.0.1
Homepage https://github.com/DavidHSW/DHDynamicPieChart
License MIT
Platforms ios
Frameworks UIKit
Authors

Feature

Animate with any level, angle, tint colors as well as animation duration.

Demo

img

Installation

Cocoapods

Add DHDynamicPieChart to your Podfile:

      source 'https://github.com/CocoaPods/Specs.git'
      pod 'DHDynamicPieChart'

Simple use

Simply drag the header file DHDynamicPieChart.hinto your project:

    #import "DHDynamicPieChart.h"

How to use

Configure like this:

    DHDynamicPieChart *pieChart = ({
        DHDynamicPieChart *chart = [[DHDynamicPieChart alloc] initWithLevel:20];
        chart.lineWidth = 30.0;
        chart.startAngle = 3.0 / 4.0 * M_PI;
        chart.endAngle = 9.0 / 4.0 * M_PI;
        chart.animateDurationBySeconds = 0.5;
        chart.levelBackgroundColor = [UIColor colorWithRed:0.92 green:0.92 blue:0.92 alpha:1.0];
        chart.levelTintColors = @[[UIColor colorWithRed:0.90 green:0.22 blue:0.46 alpha:1.0],
                                  [UIColor colorWithRed:0.73 green:0.22 blue:0.90 alpha:1.0],
                                  [UIColor colorWithRed:0.35 green:0.22 blue:0.90 alpha:1.0],
                                  [UIColor colorWithRed:0.22 green:0.82 blue:0.90 alpha:1.0],
                                  [UIColor colorWithRed:0.22 green:0.90 blue:0.57 alpha:1.0]];
        chart;
    });
    [self.view addSubview:pieChart];

Lisence

Under MIT.

Latest podspec

{
    "name": "DHDynamicPieChart",
    "version": "1.0.1",
    "summary": "Highly customised level pie chart.",
    "homepage": "https://github.com/DavidHSW/DHDynamicPieChart",
    "authors": {
        "David Hu": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/DavidHSW/DHDynamicPieChart.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "DHDynamicPieChart",
        "DHPieChart/**/*.{h,m}"
    ],
    "frameworks": "UIKit",
    "license": "MIT"
}

Pin It on Pinterest

Share This