Commit 79b7eaee authored by 管鹏飞's avatar 管鹏飞

hulk

parent 1703333e
...@@ -8,7 +8,7 @@ xcodeproj 'vanke.xcodeproj' ...@@ -8,7 +8,7 @@ xcodeproj 'vanke.xcodeproj'
#pod 'KissXML', '~> 5.0' #pod 'KissXML', '~> 5.0'
#pod 'SSCheckBoxView', '~> 0.0.1' #pod 'SSCheckBoxView', '~> 0.0.1'
#pod 'jastor', '~> 0.2.1' #pod 'jastor', '~> 0.2.1'
pod 'PNChart' pod 'PNChart', '~> 0.8.7'
pod 'CocoaSecurity' pod 'CocoaSecurity'
#pod 'FMDB', '~> 2.5' #pod 'FMDB', '~> 2.5'
#pod 'MMProgressHUD', '~> 0.3.1' #pod 'MMProgressHUD', '~> 0.3.1'
......
...@@ -8,7 +8,7 @@ PODS: ...@@ -8,7 +8,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- CocoaSecurity - CocoaSecurity
- MBProgressHUD (~> 0.9.1) - MBProgressHUD (~> 0.9.1)
- PNChart - PNChart (~> 0.8.7)
SPEC CHECKSUMS: SPEC CHECKSUMS:
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
...@@ -16,4 +16,4 @@ SPEC CHECKSUMS: ...@@ -16,4 +16,4 @@ SPEC CHECKSUMS:
PNChart: c1755716bbd45386d2035b2bf2ce73e6d3f8cb22 PNChart: c1755716bbd45386d2035b2bf2ce73e6d3f8cb22
UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa
COCOAPODS: 0.38.2 COCOAPODS: 0.39.0
//
// Base64.h
//
// Version 1.2
//
// Created by Nick Lockwood on 12/01/2012.
// Copyright (C) 2012 Charcoal Design
//
// Distributed under the permissive zlib License
// Get the latest version from here:
//
// https://github.com/nicklockwood/Base64
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
#import <Foundation/Foundation.h>
@interface NSData (Base64)
+ (NSData *)dataWithBase64EncodedString:(NSString *)string;
- (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;
- (NSString *)base64EncodedString;
@end
@interface NSString (Base64)
+ (NSString *)stringWithBase64EncodedString:(NSString *)string;
- (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;
- (NSString *)base64EncodedString;
- (NSString *)base64DecodedString;
- (NSData *)base64DecodedData;
@end
../../../CocoaSecurity/submodules/Base64/Base64/Base64.h
\ No newline at end of file
/*
CocoaSecurity 1.1
Created by Kelp on 12/5/12.
Copyright (c) 2012 Kelp http://kelp.phate.org/
MIT License
CocoaSecurity is core. It provides AES encrypt, AES decrypt, Hash(MD5, HmacMD5, SHA1~SHA512, HmacSHA1~HmacSHA512) messages.
*/
#import <Foundation/Foundation.h>
#import <Foundation/NSException.h>
#pragma mark - CocoaSecurityResult
@interface CocoaSecurityResult : NSObject
@property (strong, nonatomic, readonly) NSData *data;
@property (strong, nonatomic, readonly) NSString *utf8String;
@property (strong, nonatomic, readonly) NSString *hex;
@property (strong, nonatomic, readonly) NSString *hexLower;
@property (strong, nonatomic, readonly) NSString *base64;
- (id)initWithBytes:(unsigned char[])initData length:(NSUInteger)length;
@end
#pragma mark - CocoaSecurity
@interface CocoaSecurity : NSObject
#pragma mark - AES Encrypt
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSString *)key;
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesEncryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
#pragma mark AES Decrypt
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesDecryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
#pragma mark - MD5
+ (CocoaSecurityResult *)md5:(NSString *)hashString;
+ (CocoaSecurityResult *)md5WithData:(NSData *)hashData;
#pragma mark HMAC-MD5
+ (CocoaSecurityResult *)hmacMd5:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacMd5WithData:(NSData *)hashData hmacKey:(NSString *)key;
#pragma mark - SHA
+ (CocoaSecurityResult *)sha1:(NSString *)hashString;
+ (CocoaSecurityResult *)sha1WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha224:(NSString *)hashString;
+ (CocoaSecurityResult *)sha224WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha256:(NSString *)hashString;
+ (CocoaSecurityResult *)sha256WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha384:(NSString *)hashString;
+ (CocoaSecurityResult *)sha384WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha512:(NSString *)hashString;
+ (CocoaSecurityResult *)sha512WithData:(NSData *)hashData;
#pragma mark HMAC-SHA
+ (CocoaSecurityResult *)hmacSha1:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha1WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha224:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha224WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha256:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha256WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha384:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha384WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512WithData:(NSData *)hashData hmacKey:(NSString *)key;
@end
#pragma mark - CocoaSecurityEncoder
@interface CocoaSecurityEncoder : NSObject
- (NSString *)base64:(NSData *)data;
- (NSString *)hex:(NSData *)data useLower:(BOOL)isOutputLower;
@end
#pragma mark - CocoaSecurityDecoder
@interface CocoaSecurityDecoder : NSObject
- (NSData *)base64:(NSString *)data;
- (NSData *)hex:(NSString *)data;
@end
../../../CocoaSecurity/CocoaSecurity/CocoaSecurity.h
\ No newline at end of file
This diff is collapsed.
../../../MBProgressHUD/MBProgressHUD.h
\ No newline at end of file
//
// PNBar.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface PNBar : UIView
- (void)rollBack;
@property (nonatomic) float grade;
@property (nonatomic) float maxDivisor;
@property (nonatomic) CAShapeLayer *chartLine;
@property (nonatomic) UIColor *barColor;
@property (nonatomic) UIColor *barColorGradientStart;
@property (nonatomic) CGFloat barRadius;
@property (nonatomic) CAShapeLayer *gradientMask;
@property (nonatomic) CAShapeLayer *gradeLayer;
@property (nonatomic) CATextLayer* textLayer;
@property (nonatomic, assign) BOOL isNegative; //!< 是否是负数
@property (nonatomic, assign) BOOL isShowNumber; //!< 是否显示numbers
@end
../../../PNChart/PNChart/PNBar.h
\ No newline at end of file
//
// PNBarChart.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNGenericChart.h"
#import "PNChartDelegate.h"
#import "PNBar.h"
#define kXLabelMargin 15
#define kYLabelMargin 15
#define kYLabelHeight 11
#define kXLabelHeight 20
typedef NSString *(^PNYLabelFormatter)(CGFloat yLabelValue);
@interface PNBarChart : PNGenericChart
/**
* Draws the chart in an animated fashion.
*/
- (void)strokeChart;
@property (nonatomic) NSArray *xLabels;
@property (nonatomic) NSArray *yLabels;
@property (nonatomic) NSArray *yValues;
@property (nonatomic) NSMutableArray * bars;
@property (nonatomic) CGFloat xLabelWidth;
@property (nonatomic) float yValueMax;
@property (nonatomic) UIColor *strokeColor;
@property (nonatomic) NSArray *strokeColors;
/** Update Values. */
- (void)updateChartData:(NSArray *)data;
/** Changes chart margin. */
@property (nonatomic) CGFloat yChartLabelWidth;
/** Formats the ylabel text. */
@property (copy) PNYLabelFormatter yLabelFormatter;
/** Prefix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelPrefix;
/** Suffix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelSuffix;
@property (nonatomic) CGFloat chartMarginLeft;
@property (nonatomic) CGFloat chartMarginRight;
@property (nonatomic) CGFloat chartMarginTop;
@property (nonatomic) CGFloat chartMarginBottom;
/** Controls whether labels should be displayed. */
@property (nonatomic) BOOL showLabel;
/** Controls whether the chart border line should be displayed. */
@property (nonatomic) BOOL showChartBorder;
/** Controls whether the chart Horizontal separator should be displayed. */
@property (nonatomic, assign) BOOL showLevelLine;
/** Chart bottom border, co-linear with the x-axis. */
@property (nonatomic) CAShapeLayer * chartBottomLine;
/** Chart bottom border, level separator-linear with the x-axis. */
@property (nonatomic) CAShapeLayer * chartLevelLine;
/** Chart left border, co-linear with the y-axis. */
@property (nonatomic) CAShapeLayer * chartLeftLine;
/** Corner radius for all bars in the chart. */
@property (nonatomic) CGFloat barRadius;
/** Width of all bars in the chart. */
@property (nonatomic) CGFloat barWidth;
@property (nonatomic) CGFloat labelMarginTop;
/** Background color of all bars in the chart. */
@property (nonatomic) UIColor * barBackgroundColor;
/** Text color for all bars in the chart. */
@property (nonatomic) UIColor * labelTextColor;
/** Font for all bars in the chart. */
@property (nonatomic) UIFont * labelFont;
/** How many labels on the x-axis to skip in between displaying labels. */
@property (nonatomic) NSInteger xLabelSkip;
/** How many labels on the y-axis to skip in between displaying labels. */
@property (nonatomic) NSInteger yLabelSum;
/** The maximum for the range of values to display on the y-axis. */
@property (nonatomic) CGFloat yMaxValue;
/** The minimum for the range of values to display on the y-axis. */
@property (nonatomic) CGFloat yMinValue;
/** Controls whether each bar should have a gradient fill. */
@property (nonatomic) UIColor *barColorGradientStart;
/** Controls whether text for x-axis be straight or rotate 45 degree. */
@property (nonatomic) BOOL rotateForXAxisText;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
/**whether show gradient bar*/
@property (nonatomic, assign) BOOL isGradientShow;
/** whether show numbers*/
@property (nonatomic, assign) BOOL isShowNumbers;
@end
../../../PNChart/PNChart/PNBarChart.h
\ No newline at end of file
//
// PNChart.h
// Version 0.1
// PNChart
//
// Created by kevin on 10/3/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNChart.h"
#import "PNColor.h"
#import "PNLineChart.h"
#import "PNLineChartData.h"
#import "PNLineChartDataItem.h"
#import "PNBarChart.h"
#import "PNCircleChart.h"
#import "PNChartDelegate.h"
#import "PNPieChart.h"
#import "PNScatterChart.h"
#import "PNRadarChart.h"
#import "PNRadarChartDataItem.h"
../../../PNChart/PNChart/PNChart.h
\ No newline at end of file
//
// PNChartDelegate.h
// PNChartDemo
//
// Created by kevinzhow on 13-12-11.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol PNChartDelegate <NSObject>
@optional
/**
* Callback method that gets invoked when the user taps on the chart line.
*/
- (void)userClickedOnLinePoint:(CGPoint)point lineIndex:(NSInteger)lineIndex;
/**
* Callback method that gets invoked when the user taps on a chart line key point.
*/
- (void)userClickedOnLineKeyPoint:(CGPoint)point
lineIndex:(NSInteger)lineIndex
pointIndex:(NSInteger)pointIndex;
/**
* Callback method that gets invoked when the user taps on a chart bar.
*/
- (void)userClickedOnBarAtIndex:(NSInteger)barIndex;
- (void)userClickedOnPieIndexItem:(NSInteger)pieIndex;
- (void)didUnselectPieItem;
@end
../../../PNChart/PNChart/PNChartDelegate.h
\ No newline at end of file
//
// PNChartLabel.h
// PNChart
//
// Created by kevin on 10/3/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PNChartLabel : UILabel
@end
../../../PNChart/PNChart/PNChartLabel.h
\ No newline at end of file
//
// PNCircleChart.h
// PNChartDemo
//
// Created by kevinzhow on 13-11-30.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNColor.h"
#import <UICountingLabel/UICountingLabel.h>
typedef NS_ENUM (NSUInteger, PNChartFormatType) {
PNChartFormatTypePercent,
PNChartFormatTypeDollar,
PNChartFormatTypeNone,
PNChartFormatTypeDecimal,
PNChartFormatTypeDecimalTwoPlaces,
};
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
@interface PNCircleChart : UIView
- (void)strokeChart;
- (void)growChartByAmount:(NSNumber *)growAmount;
- (void)updateChartByCurrent:(NSNumber *)current;
- (void)updateChartByCurrent:(NSNumber *)current byTotal:(NSNumber *)total;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor
displayCountingLabel:(BOOL)displayCountingLabel;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor
displayCountingLabel:(BOOL)displayCountingLabel
overrideLineWidth:(NSNumber *)overrideLineWidth;
@property (strong, nonatomic) UICountingLabel *countingLabel;
@property (nonatomic) UIColor *strokeColor;
@property (nonatomic) UIColor *strokeColorGradientStart;
@property (nonatomic) NSNumber *total;
@property (nonatomic) NSNumber *current;
@property (nonatomic) NSNumber *lineWidth;
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic) PNChartFormatType chartType;
@property (nonatomic) CAShapeLayer *circle;
@property (nonatomic) CAShapeLayer *gradientMask;
@property (nonatomic) CAShapeLayer *circleBackground;
@property (nonatomic) BOOL displayCountingLabel;
@end
../../../PNChart/PNChart/PNCircleChart.h
\ No newline at end of file
//
// PNColor.h
// PNChart
//
// Created by kevin on 13-6-8.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/*
* System Versioning Preprocessor Macros
*/
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define PNGrey [UIColor colorWithRed:246.0 / 255.0 green:246.0 / 255.0 blue:246.0 / 255.0 alpha:1.0f]
#define PNLightBlue [UIColor colorWithRed:94.0 / 255.0 green:147.0 / 255.0 blue:196.0 / 255.0 alpha:1.0f]
#define PNGreen [UIColor colorWithRed:77.0 / 255.0 green:186.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNTitleColor [UIColor colorWithRed:0.0 / 255.0 green:189.0 / 255.0 blue:113.0 / 255.0 alpha:1.0f]
#define PNButtonGrey [UIColor colorWithRed:141.0 / 255.0 green:141.0 / 255.0 blue:141.0 / 255.0 alpha:1.0f]
#define PNLightGreen [UIColor colorWithRed:77.0 / 255.0 green:216.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNFreshGreen [UIColor colorWithRed:77.0 / 255.0 green:196.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNDeepGreen [UIColor colorWithRed:77.0 / 255.0 green:176.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNRed [UIColor colorWithRed:245.0 / 255.0 green:94.0 / 255.0 blue:78.0 / 255.0 alpha:1.0f]
#define PNMauve [UIColor colorWithRed:88.0 / 255.0 green:75.0 / 255.0 blue:103.0 / 255.0 alpha:1.0f]
#define PNBrown [UIColor colorWithRed:119.0 / 255.0 green:107.0 / 255.0 blue:95.0 / 255.0 alpha:1.0f]
#define PNBlue [UIColor colorWithRed:82.0 / 255.0 green:116.0 / 255.0 blue:188.0 / 255.0 alpha:1.0f]
#define PNDarkBlue [UIColor colorWithRed:121.0 / 255.0 green:134.0 / 255.0 blue:142.0 / 255.0 alpha:1.0f]
#define PNYellow [UIColor colorWithRed:242.0 / 255.0 green:197.0 / 255.0 blue:117.0 / 255.0 alpha:1.0f]
#define PNWhite [UIColor colorWithRed:255.0 / 255.0 green:255.0 / 255.0 blue:255.0 / 255.0 alpha:1.0f]
#define PNDeepGrey [UIColor colorWithRed:99.0 / 255.0 green:99.0 / 255.0 blue:99.0 / 255.0 alpha:1.0f]
#define PNPinkGrey [UIColor colorWithRed:200.0 / 255.0 green:193.0 / 255.0 blue:193.0 / 255.0 alpha:1.0f]
#define PNHealYellow [UIColor colorWithRed:245.0 / 255.0 green:242.0 / 255.0 blue:238.0 / 255.0 alpha:1.0f]
#define PNLightGrey [UIColor colorWithRed:225.0 / 255.0 green:225.0 / 255.0 blue:225.0 / 255.0 alpha:1.0f]
#define PNCleanGrey [UIColor colorWithRed:251.0 / 255.0 green:251.0 / 255.0 blue:251.0 / 255.0 alpha:1.0f]
#define PNLightYellow [UIColor colorWithRed:241.0 / 255.0 green:240.0 / 255.0 blue:240.0 / 255.0 alpha:1.0f]
#define PNDarkYellow [UIColor colorWithRed:152.0 / 255.0 green:150.0 / 255.0 blue:159.0 / 255.0 alpha:1.0f]
#define PNPinkDark [UIColor colorWithRed:170.0 / 255.0 green:165.0 / 255.0 blue:165.0 / 255.0 alpha:1.0f]
#define PNCloudWhite [UIColor colorWithRed:244.0 / 255.0 green:244.0 / 255.0 blue:244.0 / 255.0 alpha:1.0f]
#define PNBlack [UIColor colorWithRed:45.0 / 255.0 green:45.0 / 255.0 blue:45.0 / 255.0 alpha:1.0f]
#define PNStarYellow [UIColor colorWithRed:252.0 / 255.0 green:223.0 / 255.0 blue:101.0 / 255.0 alpha:1.0f]
#define PNTwitterColor [UIColor colorWithRed:0.0 / 255.0 green:171.0 / 255.0 blue:243.0 / 255.0 alpha:1.0]
#define PNWeiboColor [UIColor colorWithRed:250.0 / 255.0 green:0.0 / 255.0 blue:33.0 / 255.0 alpha:1.0]
#define PNiOSGreenColor [UIColor colorWithRed:98.0 / 255.0 green:247.0 / 255.0 blue:77.0 / 255.0 alpha:1.0]
@interface PNColor : NSObject
- (UIImage *)imageFromColor:(UIColor *)color;
@end
../../../PNChart/PNChart/PNColor.h
\ No newline at end of file
//
// PNGenericChart.h
// PNChartDemo
//
// Created by Andi Palo on 26/02/15.
// Copyright (c) 2015 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNLegendPosition) {
PNLegendPositionTop = 0,
PNLegendPositionBottom = 1,
PNLegendPositionLeft = 2,
PNLegendPositionRight = 3
};
typedef NS_ENUM(NSUInteger, PNLegendItemStyle) {
PNLegendItemStyleStacked = 0,
PNLegendItemStyleSerial = 1
};
@interface PNGenericChart : UIView
@property (assign, nonatomic) BOOL hasLegend;
@property (assign, nonatomic) PNLegendPosition legendPosition;
@property (assign, nonatomic) PNLegendItemStyle legendStyle;
@property (assign, nonatomic) UIFont *legendFont;
@property (assign, nonatomic) UIColor *legendFontColor;
@property (assign, nonatomic) NSUInteger labelRowsInSerialMode;
/**
* returns the Legend View, or nil if no chart data is present.
* The origin of the legend frame is 0,0 but you can set it with setFrame:(CGRect)
*
* @param mWidth Maximum width of legend. Height will depend on this and font size
*
* @return UIView of Legend
*/
- (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth;
- (void) setupDefaultValues;
@end
../../../PNChart/PNChart/PNGenericChart.h
\ No newline at end of file
//
// PNLineChart.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "PNChartDelegate.h"
#import "PNGenericChart.h"
@interface PNLineChart : PNGenericChart
/**
* Draws the chart in an animated fashion.
*/
- (void)strokeChart;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
@property (nonatomic) NSArray *xLabels;
@property (nonatomic) NSArray *yLabels;
/**
* Array of `LineChartData` objects, one for each line.
*/
@property (nonatomic) NSArray *chartData;
@property (nonatomic) NSMutableArray *pathPoints;
@property (nonatomic) NSMutableArray *xChartLabels;
@property (nonatomic) NSMutableArray *yChartLabels;
@property (nonatomic) CGFloat xLabelWidth;
@property (nonatomic) UIFont *xLabelFont;
@property (nonatomic) UIColor *xLabelColor;
@property (nonatomic) CGFloat yValueMax;
@property (nonatomic) CGFloat yFixedValueMax;
@property (nonatomic) CGFloat yFixedValueMin;
@property (nonatomic) CGFloat yValueMin;
@property (nonatomic) NSInteger yLabelNum;
@property (nonatomic) CGFloat yLabelHeight;
@property (nonatomic) UIFont *yLabelFont;
@property (nonatomic) UIColor *yLabelColor;
@property (nonatomic) CGFloat chartCavanHeight;
@property (nonatomic) CGFloat chartCavanWidth;
@property (nonatomic) CGFloat chartMargin;
@property (nonatomic) BOOL showLabel;
@property (nonatomic) BOOL showGenYLabels;
@property (nonatomic) BOOL thousandsSeparator;
/**
* Controls whether to show the coordinate axis. Default is NO.
*/
@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
@property (nonatomic) UIColor *axisColor;
@property (nonatomic) CGFloat axisWidth;
@property (nonatomic, strong) NSString *xUnit;
@property (nonatomic, strong) NSString *yUnit;
/**
* String formatter for float values in y-axis labels. If not set, defaults to @"%1.f"
*/
@property (nonatomic, strong) NSString *yLabelFormat;
/**
* Block formatter for custom string in y-axis labels. If not set, defaults to yLabelFormat
*/
@property (nonatomic, copy) NSString* (^yLabelBlockFormatter)(CGFloat);
- (void)setXLabels:(NSArray *)xLabels withWidth:(CGFloat)width;
/**
* Update Chart Value
*/
- (void)updateChartData:(NSArray *)data;
/**
* returns the Legend View, or nil if no chart data is present.
* The origin of the legend frame is 0,0 but you can set it with setFrame:(CGRect)
*
* @param mWidth Maximum width of legend. Height will depend on this and font size
*
* @return UIView of Legend
*/
- (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth;
+ (CGSize)sizeOfString:(NSString *)text withWidth:(float)width font:(UIFont *)font;
@end
../../../PNChart/PNChart/PNLineChart.h
\ No newline at end of file
//
// Created by Jörg Polakowski on 14/12/13.
// Copyright (c) 2013 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNLineChartPointStyle) {
PNLineChartPointStyleNone = 0,
PNLineChartPointStyleCircle = 1,
PNLineChartPointStyleSquare = 3,
PNLineChartPointStyleTriangle = 4
};
@class PNLineChartDataItem;
typedef PNLineChartDataItem *(^LCLineChartDataGetter)(NSUInteger item);
@interface PNLineChartData : NSObject
@property (strong) UIColor *color;
@property (nonatomic) CGFloat alpha;
@property NSUInteger itemCount;
@property (copy) LCLineChartDataGetter getData;
@property (strong, nonatomic) NSString *dataTitle;
@property (nonatomic, assign) PNLineChartPointStyle inflexionPointStyle;
/**
* If PNLineChartPointStyle is circle, this returns the circle's diameter.
* If PNLineChartPointStyle is square, each point is a square with each side equal in length to this value.
*/
@property (nonatomic, assign) CGFloat inflexionPointWidth;
@property (nonatomic, assign) CGFloat lineWidth;
@end
../../../PNChart/PNChart/PNLineChartData.h
\ No newline at end of file
//
// Created by Jörg Polakowski on 14/12/13.
// Copyright (c) 2013 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNLineChartDataItem : NSObject
+ (PNLineChartDataItem *)dataItemWithY:(CGFloat)y;
@property (readonly) CGFloat y; // should be within the y range
@end
../../../PNChart/PNChart/PNLineChartDataItem.h
\ No newline at end of file
//
// PNPieChart.h
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNPieChartDataItem.h"
#import "PNGenericChart.h"
#import "PNChartDelegate.h"
@interface PNPieChart : PNGenericChart
- (id)initWithFrame:(CGRect)frame items:(NSArray *)items;
@property (nonatomic, readonly) NSArray *items;
/** Default is 18-point Avenir Medium. */
@property (nonatomic) UIFont *descriptionTextFont;
/** Default is white. */
@property (nonatomic) UIColor *descriptionTextColor;
/** Default is black, with an alpha of 0.4. */
@property (nonatomic) UIColor *descriptionTextShadowColor;
/** Default is CGSizeMake(0, 1). */
@property (nonatomic) CGSize descriptionTextShadowOffset;
/** Default is 1.0. */
@property (nonatomic) NSTimeInterval duration;
/** Show only values, this is useful when legend is present */
@property (nonatomic) BOOL showOnlyValues;
/** Show absolute values not relative i.e. percentages */
@property (nonatomic) BOOL showAbsoluteValues;
/** Hide percentage labels less than cutoff value */
@property (nonatomic, assign) CGFloat labelPercentageCutoff;
/** Default YES. */
@property (nonatomic) BOOL shouldHighlightSectorOnTouch;
/** Current outer radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat outerCircleRadius;
/** Current inner radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat innerCircleRadius;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
/** Update chart items. Does not update chart itself. */
- (void)updateChartData:(NSArray *)data;
/** Multiple selection */
@property (nonatomic, assign) BOOL enableMultipleSelection;
- (void)strokeChart;
- (void)recompute;
@end
../../../PNChart/PNChart/PNPieChart.h
\ No newline at end of file
//
// PNPieChartDataItem.h
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNPieChartDataItem : NSObject
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color;
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color
description:(NSString *)description;
@property (nonatomic) CGFloat value;
@property (nonatomic) UIColor *color;
@property (nonatomic) NSString *textDescription;
@end
../../../PNChart/PNChart/PNPieChartDataItem.h
\ No newline at end of file
//
// PNRadarChart.h
// PNChartDemo
//
// Created by Lei on 15/7/1.
// Copyright (c) 2015年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNGenericChart.h"
#import "PNRadarChartDataItem.h"
#define MAXCIRCLE 20
typedef NS_ENUM(NSUInteger, PNRadarChartLabelStyle) {
PNRadarChartLabelStyleCircle = 0,
PNRadarChartLabelStyleHorizontal,
PNRadarChartLabelStyleHidden,
};
@interface PNRadarChart : PNGenericChart
-(id)initWithFrame:(CGRect)frame items:(NSArray *)items valueDivider:(CGFloat)unitValue;
/**
*Draws the chart in an animated fashion.
*/
-(void)strokeChart;
/** Array of `RadarChartDataItem` objects, one for each corner. */
@property (nonatomic) NSArray *chartData;
/** The unit of this chart ,default is 1 */
@property (nonatomic) CGFloat valueDivider;
/** The maximum for the range of values to display on the chart */
@property (nonatomic) CGFloat maxValue;
/** Default is gray. */
@property (nonatomic) UIColor *webColor;
/** Default is green , with an alpha of 0.7 */
@property (nonatomic) UIColor *plotColor;
/** Default is black */
@property (nonatomic) UIColor *fontColor;
/** Default is orange */
@property (nonatomic) UIColor *graduationColor;
/** Default is 15 */
@property (nonatomic) CGFloat fontSize;
/** Controls the labels display style that around chart */
@property (nonatomic, assign) PNRadarChartLabelStyle labelStyle;
/** Tap the label will display detail value ,default is YES. */
@property (nonatomic, assign) BOOL isLabelTouchable;
/** is show graduation on the chart ,default is NO. */
@property (nonatomic, assign) BOOL isShowGraduation;
@end
../../../PNChart/PNChart/PNRadarChart.h
\ No newline at end of file
//
// PNRadarChartDataItem.h
// PNChartDemo
//
// Created by Lei on 15/7/1.
// Copyright (c) 2015年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PNRadarChartDataItem : NSObject
+ (instancetype)dataItemWithValue:(CGFloat)value
description:(NSString *)description;
@property (nonatomic) CGFloat value;
@property (nonatomic,copy) NSString *textDescription;
@end
../../../PNChart/PNChart/PNRadarChartDataItem.h
\ No newline at end of file
//
// PNScatterChart.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "PNChartDelegate.h"
#import "PNGenericChart.h"
#import "PNScatterChartData.h"
#import "PNScatterChartDataItem.h"
@interface PNScatterChart : PNGenericChart
@property (nonatomic, retain) id<PNChartDelegate> delegate;
/** Array of `ScatterChartData` objects, one for each line. */
@property (nonatomic) NSArray *chartData;
/** Controls whether to show the coordinate axis. Default is NO. */
@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
@property (nonatomic) UIColor *axisColor;
@property (nonatomic) CGFloat axisWidth;
/** String formatter for float values in x-axis/y-axis labels. If not set, defaults to @"%1.f" */
@property (nonatomic, strong) NSString *xLabelFormat;
@property (nonatomic, strong) NSString *yLabelFormat;
/** Default is true. */
@property (nonatomic) BOOL showLabel;
/** Default is 18-point Avenir Medium. */
@property (nonatomic) UIFont *descriptionTextFont;
/** Default is white. */
@property (nonatomic) UIColor *descriptionTextColor;
/** Default is black, with an alpha of 0.4. */
@property (nonatomic) UIColor *descriptionTextShadowColor;
/** Default is CGSizeMake(0, 1). */
@property (nonatomic) CGSize descriptionTextShadowOffset;
/** Default is 1.0. */
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic) CGFloat AxisX_minValue;
@property (nonatomic) CGFloat AxisX_maxValue;
@property (nonatomic) CGFloat AxisY_minValue;
@property (nonatomic) CGFloat AxisY_maxValue;
- (void) setAxisXWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
- (void) setAxisYWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
- (void) setAxisXLabel:(NSArray *)array;
- (void) setAxisYLabel:(NSArray *)array;
- (void) setup;
- (void) drawLineFromPoint : (CGPoint) startPoint ToPoint : (CGPoint) endPoint WithLineWith : (CGFloat) lineWidth AndWithColor : (UIColor*) color;
/**
* Update Chart Value
*/
- (void)updateChartData:(NSArray *)data;
@end
../../../PNChart/PNChart/PNScatterChart.h
\ No newline at end of file
//
// PNScatterChartData.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNScatterChartPointStyle) {
PNScatterChartPointStyleCircle = 0,
PNScatterChartPointStyleSquare = 1,
};
@class PNScatterChartDataItem;
typedef PNScatterChartDataItem *(^LCScatterChartDataGetter)(NSUInteger item);
@interface PNScatterChartData : NSObject
@property (strong) UIColor *fillColor;
@property (strong) UIColor *strokeColor;
@property NSUInteger itemCount;
@property (copy) LCScatterChartDataGetter getData;
@property (nonatomic, assign) PNScatterChartPointStyle inflexionPointStyle;
/**
* If PNLineChartPointStyle is circle, this returns the circle's diameter.
* If PNLineChartPointStyle is square, each point is a square with each side equal in length to this value.
*/
@property (nonatomic, assign) CGFloat size;
@end
../../../PNChart/PNChart/PNScatterChartData.h
\ No newline at end of file
//
// PNScatterChartDataItem.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNScatterChartDataItem : NSObject
+ (PNScatterChartDataItem *)dataItemWithX:(CGFloat)x AndWithY:(CGFloat)y;
@property (readonly) CGFloat x; // should be within the x range
@property (readonly) CGFloat y; // should be within the y range
@end
../../../PNChart/PNChart/PNScatterChartDataItem.h
\ No newline at end of file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef enum {
UILabelCountingMethodEaseInOut,
UILabelCountingMethodEaseIn,
UILabelCountingMethodEaseOut,
UILabelCountingMethodLinear
} UILabelCountingMethod;
typedef NSString* (^UICountingLabelFormatBlock)(float value);
typedef NSAttributedString* (^UICountingLabelAttributedFormatBlock)(float value);
@interface UICountingLabel : UILabel
@property (nonatomic, strong) NSString *format;
@property (nonatomic, assign) UILabelCountingMethod method;
@property (nonatomic, assign) NSTimeInterval animationDuration;
@property (nonatomic, copy) UICountingLabelFormatBlock formatBlock;
@property (nonatomic, copy) UICountingLabelAttributedFormatBlock attributedFormatBlock;
@property (nonatomic, copy) void (^completionBlock)();
-(void)countFrom:(float)startValue to:(float)endValue;
-(void)countFrom:(float)startValue to:(float)endValue withDuration:(NSTimeInterval)duration;
-(void)countFromCurrentValueTo:(float)endValue;
-(void)countFromCurrentValueTo:(float)endValue withDuration:(NSTimeInterval)duration;
-(void)countFromZeroTo:(float)endValue;
-(void)countFromZeroTo:(float)endValue withDuration:(NSTimeInterval)duration;
- (CGFloat)currentValue;
@end
../../../UICountingLabel/UICountingLabel.h
\ No newline at end of file
//
// Base64.h
//
// Version 1.2
//
// Created by Nick Lockwood on 12/01/2012.
// Copyright (C) 2012 Charcoal Design
//
// Distributed under the permissive zlib License
// Get the latest version from here:
//
// https://github.com/nicklockwood/Base64
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
#import <Foundation/Foundation.h>
@interface NSData (Base64)
+ (NSData *)dataWithBase64EncodedString:(NSString *)string;
- (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;
- (NSString *)base64EncodedString;
@end
@interface NSString (Base64)
+ (NSString *)stringWithBase64EncodedString:(NSString *)string;
- (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;
- (NSString *)base64EncodedString;
- (NSString *)base64DecodedString;
- (NSData *)base64DecodedData;
@end
../../../CocoaSecurity/submodules/Base64/Base64/Base64.h
\ No newline at end of file
/*
CocoaSecurity 1.1
Created by Kelp on 12/5/12.
Copyright (c) 2012 Kelp http://kelp.phate.org/
MIT License
CocoaSecurity is core. It provides AES encrypt, AES decrypt, Hash(MD5, HmacMD5, SHA1~SHA512, HmacSHA1~HmacSHA512) messages.
*/
#import <Foundation/Foundation.h>
#import <Foundation/NSException.h>
#pragma mark - CocoaSecurityResult
@interface CocoaSecurityResult : NSObject
@property (strong, nonatomic, readonly) NSData *data;
@property (strong, nonatomic, readonly) NSString *utf8String;
@property (strong, nonatomic, readonly) NSString *hex;
@property (strong, nonatomic, readonly) NSString *hexLower;
@property (strong, nonatomic, readonly) NSString *base64;
- (id)initWithBytes:(unsigned char[])initData length:(NSUInteger)length;
@end
#pragma mark - CocoaSecurity
@interface CocoaSecurity : NSObject
#pragma mark - AES Encrypt
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSString *)key;
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesEncrypt:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesEncryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
#pragma mark AES Decrypt
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSString *)key;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data hexKey:(NSString *)key hexIv:(NSString *)iv;
+ (CocoaSecurityResult *)aesDecryptWithBase64:(NSString *)data key:(NSData *)key iv:(NSData *)iv;
+ (CocoaSecurityResult *)aesDecryptWithData:(NSData *)data key:(NSData *)key iv:(NSData *)iv;
#pragma mark - MD5
+ (CocoaSecurityResult *)md5:(NSString *)hashString;
+ (CocoaSecurityResult *)md5WithData:(NSData *)hashData;
#pragma mark HMAC-MD5
+ (CocoaSecurityResult *)hmacMd5:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacMd5WithData:(NSData *)hashData hmacKey:(NSString *)key;
#pragma mark - SHA
+ (CocoaSecurityResult *)sha1:(NSString *)hashString;
+ (CocoaSecurityResult *)sha1WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha224:(NSString *)hashString;
+ (CocoaSecurityResult *)sha224WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha256:(NSString *)hashString;
+ (CocoaSecurityResult *)sha256WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha384:(NSString *)hashString;
+ (CocoaSecurityResult *)sha384WithData:(NSData *)hashData;
+ (CocoaSecurityResult *)sha512:(NSString *)hashString;
+ (CocoaSecurityResult *)sha512WithData:(NSData *)hashData;
#pragma mark HMAC-SHA
+ (CocoaSecurityResult *)hmacSha1:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha1WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha224:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha224WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha256:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha256WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha384:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha384WithData:(NSData *)hashData hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512:(NSString *)hashString hmacKey:(NSString *)key;
+ (CocoaSecurityResult *)hmacSha512WithData:(NSData *)hashData hmacKey:(NSString *)key;
@end
#pragma mark - CocoaSecurityEncoder
@interface CocoaSecurityEncoder : NSObject
- (NSString *)base64:(NSData *)data;
- (NSString *)hex:(NSData *)data useLower:(BOOL)isOutputLower;
@end
#pragma mark - CocoaSecurityDecoder
@interface CocoaSecurityDecoder : NSObject
- (NSData *)base64:(NSString *)data;
- (NSData *)hex:(NSString *)data;
@end
../../../CocoaSecurity/CocoaSecurity/CocoaSecurity.h
\ No newline at end of file
This diff is collapsed.
../../../MBProgressHUD/MBProgressHUD.h
\ No newline at end of file
//
// PNBar.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface PNBar : UIView
- (void)rollBack;
@property (nonatomic) float grade;
@property (nonatomic) float maxDivisor;
@property (nonatomic) CAShapeLayer *chartLine;
@property (nonatomic) UIColor *barColor;
@property (nonatomic) UIColor *barColorGradientStart;
@property (nonatomic) CGFloat barRadius;
@property (nonatomic) CAShapeLayer *gradientMask;
@property (nonatomic) CAShapeLayer *gradeLayer;
@property (nonatomic) CATextLayer* textLayer;
@property (nonatomic, assign) BOOL isNegative; //!< 是否是负数
@property (nonatomic, assign) BOOL isShowNumber; //!< 是否显示numbers
@end
../../../PNChart/PNChart/PNBar.h
\ No newline at end of file
//
// PNBarChart.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNGenericChart.h"
#import "PNChartDelegate.h"
#import "PNBar.h"
#define kXLabelMargin 15
#define kYLabelMargin 15
#define kYLabelHeight 11
#define kXLabelHeight 20
typedef NSString *(^PNYLabelFormatter)(CGFloat yLabelValue);
@interface PNBarChart : PNGenericChart
/**
* Draws the chart in an animated fashion.
*/
- (void)strokeChart;
@property (nonatomic) NSArray *xLabels;
@property (nonatomic) NSArray *yLabels;
@property (nonatomic) NSArray *yValues;
@property (nonatomic) NSMutableArray * bars;
@property (nonatomic) CGFloat xLabelWidth;
@property (nonatomic) float yValueMax;
@property (nonatomic) UIColor *strokeColor;
@property (nonatomic) NSArray *strokeColors;
/** Update Values. */
- (void)updateChartData:(NSArray *)data;
/** Changes chart margin. */
@property (nonatomic) CGFloat yChartLabelWidth;
/** Formats the ylabel text. */
@property (copy) PNYLabelFormatter yLabelFormatter;
/** Prefix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelPrefix;
/** Suffix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelSuffix;
@property (nonatomic) CGFloat chartMarginLeft;
@property (nonatomic) CGFloat chartMarginRight;
@property (nonatomic) CGFloat chartMarginTop;
@property (nonatomic) CGFloat chartMarginBottom;
/** Controls whether labels should be displayed. */
@property (nonatomic) BOOL showLabel;
/** Controls whether the chart border line should be displayed. */
@property (nonatomic) BOOL showChartBorder;
/** Controls whether the chart Horizontal separator should be displayed. */
@property (nonatomic, assign) BOOL showLevelLine;
/** Chart bottom border, co-linear with the x-axis. */
@property (nonatomic) CAShapeLayer * chartBottomLine;
/** Chart bottom border, level separator-linear with the x-axis. */
@property (nonatomic) CAShapeLayer * chartLevelLine;
/** Chart left border, co-linear with the y-axis. */
@property (nonatomic) CAShapeLayer * chartLeftLine;
/** Corner radius for all bars in the chart. */
@property (nonatomic) CGFloat barRadius;
/** Width of all bars in the chart. */
@property (nonatomic) CGFloat barWidth;
@property (nonatomic) CGFloat labelMarginTop;
/** Background color of all bars in the chart. */
@property (nonatomic) UIColor * barBackgroundColor;
/** Text color for all bars in the chart. */
@property (nonatomic) UIColor * labelTextColor;
/** Font for all bars in the chart. */
@property (nonatomic) UIFont * labelFont;
/** How many labels on the x-axis to skip in between displaying labels. */
@property (nonatomic) NSInteger xLabelSkip;
/** How many labels on the y-axis to skip in between displaying labels. */
@property (nonatomic) NSInteger yLabelSum;
/** The maximum for the range of values to display on the y-axis. */
@property (nonatomic) CGFloat yMaxValue;
/** The minimum for the range of values to display on the y-axis. */
@property (nonatomic) CGFloat yMinValue;
/** Controls whether each bar should have a gradient fill. */
@property (nonatomic) UIColor *barColorGradientStart;
/** Controls whether text for x-axis be straight or rotate 45 degree. */
@property (nonatomic) BOOL rotateForXAxisText;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
/**whether show gradient bar*/
@property (nonatomic, assign) BOOL isGradientShow;
/** whether show numbers*/
@property (nonatomic, assign) BOOL isShowNumbers;
@end
../../../PNChart/PNChart/PNBarChart.h
\ No newline at end of file
//
// PNChart.h
// Version 0.1
// PNChart
//
// Created by kevin on 10/3/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNChart.h"
#import "PNColor.h"
#import "PNLineChart.h"
#import "PNLineChartData.h"
#import "PNLineChartDataItem.h"
#import "PNBarChart.h"
#import "PNCircleChart.h"
#import "PNChartDelegate.h"
#import "PNPieChart.h"
#import "PNScatterChart.h"
#import "PNRadarChart.h"
#import "PNRadarChartDataItem.h"
../../../PNChart/PNChart/PNChart.h
\ No newline at end of file
//
// PNChartDelegate.h
// PNChartDemo
//
// Created by kevinzhow on 13-12-11.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol PNChartDelegate <NSObject>
@optional
/**
* Callback method that gets invoked when the user taps on the chart line.
*/
- (void)userClickedOnLinePoint:(CGPoint)point lineIndex:(NSInteger)lineIndex;
/**
* Callback method that gets invoked when the user taps on a chart line key point.
*/
- (void)userClickedOnLineKeyPoint:(CGPoint)point
lineIndex:(NSInteger)lineIndex
pointIndex:(NSInteger)pointIndex;
/**
* Callback method that gets invoked when the user taps on a chart bar.
*/
- (void)userClickedOnBarAtIndex:(NSInteger)barIndex;
- (void)userClickedOnPieIndexItem:(NSInteger)pieIndex;
- (void)didUnselectPieItem;
@end
../../../PNChart/PNChart/PNChartDelegate.h
\ No newline at end of file
//
// PNChartLabel.h
// PNChart
//
// Created by kevin on 10/3/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PNChartLabel : UILabel
@end
../../../PNChart/PNChart/PNChartLabel.h
\ No newline at end of file
//
// PNCircleChart.h
// PNChartDemo
//
// Created by kevinzhow on 13-11-30.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNColor.h"
#import <UICountingLabel/UICountingLabel.h>
typedef NS_ENUM (NSUInteger, PNChartFormatType) {
PNChartFormatTypePercent,
PNChartFormatTypeDollar,
PNChartFormatTypeNone,
PNChartFormatTypeDecimal,
PNChartFormatTypeDecimalTwoPlaces,
};
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
@interface PNCircleChart : UIView
- (void)strokeChart;
- (void)growChartByAmount:(NSNumber *)growAmount;
- (void)updateChartByCurrent:(NSNumber *)current;
- (void)updateChartByCurrent:(NSNumber *)current byTotal:(NSNumber *)total;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor
displayCountingLabel:(BOOL)displayCountingLabel;
- (id)initWithFrame:(CGRect)frame
total:(NSNumber *)total
current:(NSNumber *)current
clockwise:(BOOL)clockwise
shadow:(BOOL)hasBackgroundShadow
shadowColor:(UIColor *)backgroundShadowColor
displayCountingLabel:(BOOL)displayCountingLabel
overrideLineWidth:(NSNumber *)overrideLineWidth;
@property (strong, nonatomic) UICountingLabel *countingLabel;
@property (nonatomic) UIColor *strokeColor;
@property (nonatomic) UIColor *strokeColorGradientStart;
@property (nonatomic) NSNumber *total;
@property (nonatomic) NSNumber *current;
@property (nonatomic) NSNumber *lineWidth;
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic) PNChartFormatType chartType;
@property (nonatomic) CAShapeLayer *circle;
@property (nonatomic) CAShapeLayer *gradientMask;
@property (nonatomic) CAShapeLayer *circleBackground;
@property (nonatomic) BOOL displayCountingLabel;
@end
../../../PNChart/PNChart/PNCircleChart.h
\ No newline at end of file
//
// PNColor.h
// PNChart
//
// Created by kevin on 13-6-8.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/*
* System Versioning Preprocessor Macros
*/
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define PNGrey [UIColor colorWithRed:246.0 / 255.0 green:246.0 / 255.0 blue:246.0 / 255.0 alpha:1.0f]
#define PNLightBlue [UIColor colorWithRed:94.0 / 255.0 green:147.0 / 255.0 blue:196.0 / 255.0 alpha:1.0f]
#define PNGreen [UIColor colorWithRed:77.0 / 255.0 green:186.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNTitleColor [UIColor colorWithRed:0.0 / 255.0 green:189.0 / 255.0 blue:113.0 / 255.0 alpha:1.0f]
#define PNButtonGrey [UIColor colorWithRed:141.0 / 255.0 green:141.0 / 255.0 blue:141.0 / 255.0 alpha:1.0f]
#define PNLightGreen [UIColor colorWithRed:77.0 / 255.0 green:216.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNFreshGreen [UIColor colorWithRed:77.0 / 255.0 green:196.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNDeepGreen [UIColor colorWithRed:77.0 / 255.0 green:176.0 / 255.0 blue:122.0 / 255.0 alpha:1.0f]
#define PNRed [UIColor colorWithRed:245.0 / 255.0 green:94.0 / 255.0 blue:78.0 / 255.0 alpha:1.0f]
#define PNMauve [UIColor colorWithRed:88.0 / 255.0 green:75.0 / 255.0 blue:103.0 / 255.0 alpha:1.0f]
#define PNBrown [UIColor colorWithRed:119.0 / 255.0 green:107.0 / 255.0 blue:95.0 / 255.0 alpha:1.0f]
#define PNBlue [UIColor colorWithRed:82.0 / 255.0 green:116.0 / 255.0 blue:188.0 / 255.0 alpha:1.0f]
#define PNDarkBlue [UIColor colorWithRed:121.0 / 255.0 green:134.0 / 255.0 blue:142.0 / 255.0 alpha:1.0f]
#define PNYellow [UIColor colorWithRed:242.0 / 255.0 green:197.0 / 255.0 blue:117.0 / 255.0 alpha:1.0f]
#define PNWhite [UIColor colorWithRed:255.0 / 255.0 green:255.0 / 255.0 blue:255.0 / 255.0 alpha:1.0f]
#define PNDeepGrey [UIColor colorWithRed:99.0 / 255.0 green:99.0 / 255.0 blue:99.0 / 255.0 alpha:1.0f]
#define PNPinkGrey [UIColor colorWithRed:200.0 / 255.0 green:193.0 / 255.0 blue:193.0 / 255.0 alpha:1.0f]
#define PNHealYellow [UIColor colorWithRed:245.0 / 255.0 green:242.0 / 255.0 blue:238.0 / 255.0 alpha:1.0f]
#define PNLightGrey [UIColor colorWithRed:225.0 / 255.0 green:225.0 / 255.0 blue:225.0 / 255.0 alpha:1.0f]
#define PNCleanGrey [UIColor colorWithRed:251.0 / 255.0 green:251.0 / 255.0 blue:251.0 / 255.0 alpha:1.0f]
#define PNLightYellow [UIColor colorWithRed:241.0 / 255.0 green:240.0 / 255.0 blue:240.0 / 255.0 alpha:1.0f]
#define PNDarkYellow [UIColor colorWithRed:152.0 / 255.0 green:150.0 / 255.0 blue:159.0 / 255.0 alpha:1.0f]
#define PNPinkDark [UIColor colorWithRed:170.0 / 255.0 green:165.0 / 255.0 blue:165.0 / 255.0 alpha:1.0f]
#define PNCloudWhite [UIColor colorWithRed:244.0 / 255.0 green:244.0 / 255.0 blue:244.0 / 255.0 alpha:1.0f]
#define PNBlack [UIColor colorWithRed:45.0 / 255.0 green:45.0 / 255.0 blue:45.0 / 255.0 alpha:1.0f]
#define PNStarYellow [UIColor colorWithRed:252.0 / 255.0 green:223.0 / 255.0 blue:101.0 / 255.0 alpha:1.0f]
#define PNTwitterColor [UIColor colorWithRed:0.0 / 255.0 green:171.0 / 255.0 blue:243.0 / 255.0 alpha:1.0]
#define PNWeiboColor [UIColor colorWithRed:250.0 / 255.0 green:0.0 / 255.0 blue:33.0 / 255.0 alpha:1.0]
#define PNiOSGreenColor [UIColor colorWithRed:98.0 / 255.0 green:247.0 / 255.0 blue:77.0 / 255.0 alpha:1.0]
@interface PNColor : NSObject
- (UIImage *)imageFromColor:(UIColor *)color;
@end
../../../PNChart/PNChart/PNColor.h
\ No newline at end of file
//
// PNGenericChart.h
// PNChartDemo
//
// Created by Andi Palo on 26/02/15.
// Copyright (c) 2015 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNLegendPosition) {
PNLegendPositionTop = 0,
PNLegendPositionBottom = 1,
PNLegendPositionLeft = 2,
PNLegendPositionRight = 3
};
typedef NS_ENUM(NSUInteger, PNLegendItemStyle) {
PNLegendItemStyleStacked = 0,
PNLegendItemStyleSerial = 1
};
@interface PNGenericChart : UIView
@property (assign, nonatomic) BOOL hasLegend;
@property (assign, nonatomic) PNLegendPosition legendPosition;
@property (assign, nonatomic) PNLegendItemStyle legendStyle;
@property (assign, nonatomic) UIFont *legendFont;
@property (assign, nonatomic) UIColor *legendFontColor;
@property (assign, nonatomic) NSUInteger labelRowsInSerialMode;
/**
* returns the Legend View, or nil if no chart data is present.
* The origin of the legend frame is 0,0 but you can set it with setFrame:(CGRect)
*
* @param mWidth Maximum width of legend. Height will depend on this and font size
*
* @return UIView of Legend
*/
- (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth;
- (void) setupDefaultValues;
@end
../../../PNChart/PNChart/PNGenericChart.h
\ No newline at end of file
//
// PNLineChart.h
// PNChartDemo
//
// Created by kevin on 11/7/13.
// Copyright (c) 2013年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "PNChartDelegate.h"
#import "PNGenericChart.h"
@interface PNLineChart : PNGenericChart
/**
* Draws the chart in an animated fashion.
*/
- (void)strokeChart;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
@property (nonatomic) NSArray *xLabels;
@property (nonatomic) NSArray *yLabels;
/**
* Array of `LineChartData` objects, one for each line.
*/
@property (nonatomic) NSArray *chartData;
@property (nonatomic) NSMutableArray *pathPoints;
@property (nonatomic) NSMutableArray *xChartLabels;
@property (nonatomic) NSMutableArray *yChartLabels;
@property (nonatomic) CGFloat xLabelWidth;
@property (nonatomic) UIFont *xLabelFont;
@property (nonatomic) UIColor *xLabelColor;
@property (nonatomic) CGFloat yValueMax;
@property (nonatomic) CGFloat yFixedValueMax;
@property (nonatomic) CGFloat yFixedValueMin;
@property (nonatomic) CGFloat yValueMin;
@property (nonatomic) NSInteger yLabelNum;
@property (nonatomic) CGFloat yLabelHeight;
@property (nonatomic) UIFont *yLabelFont;
@property (nonatomic) UIColor *yLabelColor;
@property (nonatomic) CGFloat chartCavanHeight;
@property (nonatomic) CGFloat chartCavanWidth;
@property (nonatomic) CGFloat chartMargin;
@property (nonatomic) BOOL showLabel;
@property (nonatomic) BOOL showGenYLabels;
@property (nonatomic) BOOL thousandsSeparator;
/**
* Controls whether to show the coordinate axis. Default is NO.
*/
@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
@property (nonatomic) UIColor *axisColor;
@property (nonatomic) CGFloat axisWidth;
@property (nonatomic, strong) NSString *xUnit;
@property (nonatomic, strong) NSString *yUnit;
/**
* String formatter for float values in y-axis labels. If not set, defaults to @"%1.f"
*/
@property (nonatomic, strong) NSString *yLabelFormat;
/**
* Block formatter for custom string in y-axis labels. If not set, defaults to yLabelFormat
*/
@property (nonatomic, copy) NSString* (^yLabelBlockFormatter)(CGFloat);
- (void)setXLabels:(NSArray *)xLabels withWidth:(CGFloat)width;
/**
* Update Chart Value
*/
- (void)updateChartData:(NSArray *)data;
/**
* returns the Legend View, or nil if no chart data is present.
* The origin of the legend frame is 0,0 but you can set it with setFrame:(CGRect)
*
* @param mWidth Maximum width of legend. Height will depend on this and font size
*
* @return UIView of Legend
*/
- (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth;
+ (CGSize)sizeOfString:(NSString *)text withWidth:(float)width font:(UIFont *)font;
@end
../../../PNChart/PNChart/PNLineChart.h
\ No newline at end of file
//
// Created by Jörg Polakowski on 14/12/13.
// Copyright (c) 2013 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNLineChartPointStyle) {
PNLineChartPointStyleNone = 0,
PNLineChartPointStyleCircle = 1,
PNLineChartPointStyleSquare = 3,
PNLineChartPointStyleTriangle = 4
};
@class PNLineChartDataItem;
typedef PNLineChartDataItem *(^LCLineChartDataGetter)(NSUInteger item);
@interface PNLineChartData : NSObject
@property (strong) UIColor *color;
@property (nonatomic) CGFloat alpha;
@property NSUInteger itemCount;
@property (copy) LCLineChartDataGetter getData;
@property (strong, nonatomic) NSString *dataTitle;
@property (nonatomic, assign) PNLineChartPointStyle inflexionPointStyle;
/**
* If PNLineChartPointStyle is circle, this returns the circle's diameter.
* If PNLineChartPointStyle is square, each point is a square with each side equal in length to this value.
*/
@property (nonatomic, assign) CGFloat inflexionPointWidth;
@property (nonatomic, assign) CGFloat lineWidth;
@end
../../../PNChart/PNChart/PNLineChartData.h
\ No newline at end of file
//
// Created by Jörg Polakowski on 14/12/13.
// Copyright (c) 2013 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNLineChartDataItem : NSObject
+ (PNLineChartDataItem *)dataItemWithY:(CGFloat)y;
@property (readonly) CGFloat y; // should be within the y range
@end
../../../PNChart/PNChart/PNLineChartDataItem.h
\ No newline at end of file
//
// PNPieChart.h
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNPieChartDataItem.h"
#import "PNGenericChart.h"
#import "PNChartDelegate.h"
@interface PNPieChart : PNGenericChart
- (id)initWithFrame:(CGRect)frame items:(NSArray *)items;
@property (nonatomic, readonly) NSArray *items;
/** Default is 18-point Avenir Medium. */
@property (nonatomic) UIFont *descriptionTextFont;
/** Default is white. */
@property (nonatomic) UIColor *descriptionTextColor;
/** Default is black, with an alpha of 0.4. */
@property (nonatomic) UIColor *descriptionTextShadowColor;
/** Default is CGSizeMake(0, 1). */
@property (nonatomic) CGSize descriptionTextShadowOffset;
/** Default is 1.0. */
@property (nonatomic) NSTimeInterval duration;
/** Show only values, this is useful when legend is present */
@property (nonatomic) BOOL showOnlyValues;
/** Show absolute values not relative i.e. percentages */
@property (nonatomic) BOOL showAbsoluteValues;
/** Hide percentage labels less than cutoff value */
@property (nonatomic, assign) CGFloat labelPercentageCutoff;
/** Default YES. */
@property (nonatomic) BOOL shouldHighlightSectorOnTouch;
/** Current outer radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat outerCircleRadius;
/** Current inner radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat innerCircleRadius;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
/** Update chart items. Does not update chart itself. */
- (void)updateChartData:(NSArray *)data;
/** Multiple selection */
@property (nonatomic, assign) BOOL enableMultipleSelection;
- (void)strokeChart;
- (void)recompute;
@end
../../../PNChart/PNChart/PNPieChart.h
\ No newline at end of file
//
// PNPieChartDataItem.h
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNPieChartDataItem : NSObject
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color;
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color
description:(NSString *)description;
@property (nonatomic) CGFloat value;
@property (nonatomic) UIColor *color;
@property (nonatomic) NSString *textDescription;
@end
../../../PNChart/PNChart/PNPieChartDataItem.h
\ No newline at end of file
//
// PNRadarChart.h
// PNChartDemo
//
// Created by Lei on 15/7/1.
// Copyright (c) 2015年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNGenericChart.h"
#import "PNRadarChartDataItem.h"
#define MAXCIRCLE 20
typedef NS_ENUM(NSUInteger, PNRadarChartLabelStyle) {
PNRadarChartLabelStyleCircle = 0,
PNRadarChartLabelStyleHorizontal,
PNRadarChartLabelStyleHidden,
};
@interface PNRadarChart : PNGenericChart
-(id)initWithFrame:(CGRect)frame items:(NSArray *)items valueDivider:(CGFloat)unitValue;
/**
*Draws the chart in an animated fashion.
*/
-(void)strokeChart;
/** Array of `RadarChartDataItem` objects, one for each corner. */
@property (nonatomic) NSArray *chartData;
/** The unit of this chart ,default is 1 */
@property (nonatomic) CGFloat valueDivider;
/** The maximum for the range of values to display on the chart */
@property (nonatomic) CGFloat maxValue;
/** Default is gray. */
@property (nonatomic) UIColor *webColor;
/** Default is green , with an alpha of 0.7 */
@property (nonatomic) UIColor *plotColor;
/** Default is black */
@property (nonatomic) UIColor *fontColor;
/** Default is orange */
@property (nonatomic) UIColor *graduationColor;
/** Default is 15 */
@property (nonatomic) CGFloat fontSize;
/** Controls the labels display style that around chart */
@property (nonatomic, assign) PNRadarChartLabelStyle labelStyle;
/** Tap the label will display detail value ,default is YES. */
@property (nonatomic, assign) BOOL isLabelTouchable;
/** is show graduation on the chart ,default is NO. */
@property (nonatomic, assign) BOOL isShowGraduation;
@end
../../../PNChart/PNChart/PNRadarChart.h
\ No newline at end of file
//
// PNRadarChartDataItem.h
// PNChartDemo
//
// Created by Lei on 15/7/1.
// Copyright (c) 2015年 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PNRadarChartDataItem : NSObject
+ (instancetype)dataItemWithValue:(CGFloat)value
description:(NSString *)description;
@property (nonatomic) CGFloat value;
@property (nonatomic,copy) NSString *textDescription;
@end
../../../PNChart/PNChart/PNRadarChartDataItem.h
\ No newline at end of file
//
// PNScatterChart.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "PNChartDelegate.h"
#import "PNGenericChart.h"
#import "PNScatterChartData.h"
#import "PNScatterChartDataItem.h"
@interface PNScatterChart : PNGenericChart
@property (nonatomic, retain) id<PNChartDelegate> delegate;
/** Array of `ScatterChartData` objects, one for each line. */
@property (nonatomic) NSArray *chartData;
/** Controls whether to show the coordinate axis. Default is NO. */
@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
@property (nonatomic) UIColor *axisColor;
@property (nonatomic) CGFloat axisWidth;
/** String formatter for float values in x-axis/y-axis labels. If not set, defaults to @"%1.f" */
@property (nonatomic, strong) NSString *xLabelFormat;
@property (nonatomic, strong) NSString *yLabelFormat;
/** Default is true. */
@property (nonatomic) BOOL showLabel;
/** Default is 18-point Avenir Medium. */
@property (nonatomic) UIFont *descriptionTextFont;
/** Default is white. */
@property (nonatomic) UIColor *descriptionTextColor;
/** Default is black, with an alpha of 0.4. */
@property (nonatomic) UIColor *descriptionTextShadowColor;
/** Default is CGSizeMake(0, 1). */
@property (nonatomic) CGSize descriptionTextShadowOffset;
/** Default is 1.0. */
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic) CGFloat AxisX_minValue;
@property (nonatomic) CGFloat AxisX_maxValue;
@property (nonatomic) CGFloat AxisY_minValue;
@property (nonatomic) CGFloat AxisY_maxValue;
- (void) setAxisXWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
- (void) setAxisYWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
- (void) setAxisXLabel:(NSArray *)array;
- (void) setAxisYLabel:(NSArray *)array;
- (void) setup;
- (void) drawLineFromPoint : (CGPoint) startPoint ToPoint : (CGPoint) endPoint WithLineWith : (CGFloat) lineWidth AndWithColor : (UIColor*) color;
/**
* Update Chart Value
*/
- (void)updateChartData:(NSArray *)data;
@end
../../../PNChart/PNChart/PNScatterChart.h
\ No newline at end of file
//
// PNScatterChartData.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, PNScatterChartPointStyle) {
PNScatterChartPointStyleCircle = 0,
PNScatterChartPointStyleSquare = 1,
};
@class PNScatterChartDataItem;
typedef PNScatterChartDataItem *(^LCScatterChartDataGetter)(NSUInteger item);
@interface PNScatterChartData : NSObject
@property (strong) UIColor *fillColor;
@property (strong) UIColor *strokeColor;
@property NSUInteger itemCount;
@property (copy) LCScatterChartDataGetter getData;
@property (nonatomic, assign) PNScatterChartPointStyle inflexionPointStyle;
/**
* If PNLineChartPointStyle is circle, this returns the circle's diameter.
* If PNLineChartPointStyle is square, each point is a square with each side equal in length to this value.
*/
@property (nonatomic, assign) CGFloat size;
@end
../../../PNChart/PNChart/PNScatterChartData.h
\ No newline at end of file
//
// PNScatterChartDataItem.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PNScatterChartDataItem : NSObject
+ (PNScatterChartDataItem *)dataItemWithX:(CGFloat)x AndWithY:(CGFloat)y;
@property (readonly) CGFloat x; // should be within the x range
@property (readonly) CGFloat y; // should be within the y range
@end
../../../PNChart/PNChart/PNScatterChartDataItem.h
\ No newline at end of file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef enum {
UILabelCountingMethodEaseInOut,
UILabelCountingMethodEaseIn,
UILabelCountingMethodEaseOut,
UILabelCountingMethodLinear
} UILabelCountingMethod;
typedef NSString* (^UICountingLabelFormatBlock)(float value);
typedef NSAttributedString* (^UICountingLabelAttributedFormatBlock)(float value);
@interface UICountingLabel : UILabel
@property (nonatomic, strong) NSString *format;
@property (nonatomic, assign) UILabelCountingMethod method;
@property (nonatomic, assign) NSTimeInterval animationDuration;
@property (nonatomic, copy) UICountingLabelFormatBlock formatBlock;
@property (nonatomic, copy) UICountingLabelAttributedFormatBlock attributedFormatBlock;
@property (nonatomic, copy) void (^completionBlock)();
-(void)countFrom:(float)startValue to:(float)endValue;
-(void)countFrom:(float)startValue to:(float)endValue withDuration:(NSTimeInterval)duration;
-(void)countFromCurrentValueTo:(float)endValue;
-(void)countFromCurrentValueTo:(float)endValue withDuration:(NSTimeInterval)duration;
-(void)countFromZeroTo:(float)endValue;
-(void)countFromZeroTo:(float)endValue withDuration:(NSTimeInterval)duration;
- (CGFloat)currentValue;
@end
../../../UICountingLabel/UICountingLabel.h
\ No newline at end of file
...@@ -8,7 +8,7 @@ PODS: ...@@ -8,7 +8,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- CocoaSecurity - CocoaSecurity
- MBProgressHUD (~> 0.9.1) - MBProgressHUD (~> 0.9.1)
- PNChart - PNChart (~> 0.8.7)
SPEC CHECKSUMS: SPEC CHECKSUMS:
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
...@@ -16,4 +16,4 @@ SPEC CHECKSUMS: ...@@ -16,4 +16,4 @@ SPEC CHECKSUMS:
PNChart: c1755716bbd45386d2035b2bf2ce73e6d3f8cb22 PNChart: c1755716bbd45386d2035b2bf2ce73e6d3f8cb22
UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa
COCOAPODS: 0.38.2 COCOAPODS: 0.39.0
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment