├── Demo ├── Pods │ ├── Headers │ │ ├── Private │ │ │ ├── XYChart │ │ │ │ ├── XYChart.h │ │ │ │ ├── XYBarCell.h │ │ │ │ ├── XYBarView.h │ │ │ │ ├── XYBarChart.h │ │ │ │ ├── XYLineChart.h │ │ │ │ ├── XYLinesView.h │ │ │ │ ├── XYChartConst.h │ │ │ │ ├── XYChartItem.h │ │ │ │ ├── XYChartProtocol.h │ │ │ │ ├── XYLineItemView.h │ │ │ │ ├── NSArray+XYChart.h │ │ │ │ ├── UIColor+XYChart.h │ │ │ │ ├── XYLineGradientLayer.h │ │ │ │ └── XYChartDataSourceItem.h │ │ │ └── FORGestureTrackDisplay │ │ │ │ ├── FORGestureTrack.h │ │ │ │ └── FORTrackGesture.h │ │ └── Public │ │ │ ├── XYChart │ │ │ ├── XYChart.h │ │ │ ├── XYBarCell.h │ │ │ ├── XYBarView.h │ │ │ ├── XYBarChart.h │ │ │ ├── XYChartItem.h │ │ │ ├── XYLineChart.h │ │ │ ├── XYLinesView.h │ │ │ ├── XYChartConst.h │ │ │ ├── XYLineItemView.h │ │ │ ├── XYChartProtocol.h │ │ │ ├── NSArray+XYChart.h │ │ │ ├── UIColor+XYChart.h │ │ │ ├── XYLineGradientLayer.h │ │ │ └── XYChartDataSourceItem.h │ │ │ └── FORGestureTrackDisplay │ │ │ ├── FORGestureTrack.h │ │ │ └── FORTrackGesture.h │ ├── Target Support Files │ │ ├── XYChart │ │ │ ├── XYChart-dummy.m │ │ │ ├── XYChart-prefix.pch │ │ │ └── XYChart.xcconfig │ │ ├── Pods-XYChart │ │ │ ├── Pods-XYChart-dummy.m │ │ │ ├── Pods-XYChart.debug.xcconfig │ │ │ ├── Pods-XYChart.release.xcconfig │ │ │ ├── Pods-XYChart-acknowledgements.markdown │ │ │ └── Pods-XYChart-acknowledgements.plist │ │ ├── Pods-XYChartTests │ │ │ ├── Pods-XYChartTests-dummy.m │ │ │ ├── Pods-XYChartTests-acknowledgements.markdown │ │ │ ├── Pods-XYChartTests.debug.xcconfig │ │ │ ├── Pods-XYChartTests.release.xcconfig │ │ │ └── Pods-XYChartTests-acknowledgements.plist │ │ ├── Pods-XYChartUITests │ │ │ ├── Pods-XYChartUITests-acknowledgements.markdown │ │ │ ├── Pods-XYChartUITests-dummy.m │ │ │ ├── Pods-XYChartUITests.debug.xcconfig │ │ │ ├── Pods-XYChartUITests.release.xcconfig │ │ │ └── Pods-XYChartUITests-acknowledgements.plist │ │ └── FORGestureTrackDisplay │ │ │ ├── FORGestureTrackDisplay-dummy.m │ │ │ ├── FORGestureTrackDisplay-prefix.pch │ │ │ └── FORGestureTrackDisplay.xcconfig │ ├── FORGestureTrackDisplay │ │ ├── FORGestureTrackDisplay │ │ │ ├── FORGestureTrack.h │ │ │ ├── FORTrackGesture.h │ │ │ ├── FORTrackGesture.m │ │ │ └── FORGestureTrack.m │ │ ├── LICENSE │ │ └── README.md │ ├── Manifest.lock │ └── Local Podspecs │ │ └── XYChart.podspec.json ├── XYChart │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── bar-n.imageset │ │ │ ├── bar-n.png │ │ │ └── Contents.json │ │ ├── line-n.imageset │ │ │ ├── line-n.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── hello.png │ │ │ ├── Group 2@3x.png │ │ │ └── Contents.json │ ├── vc │ │ ├── BarTableViewController.h │ │ ├── LineTableViewController.h │ │ ├── LineTableViewController.m │ │ └── BarTableViewController.m │ ├── AppDelegate.h │ ├── main.m │ ├── AppDelegate.m │ ├── view │ │ ├── ChartViewCell.h │ │ └── ChartViewCell.m │ ├── model │ │ ├── RandomChartDataSource.h │ │ └── RandomChartDataSource.m │ ├── Info.plist │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard ├── XYChart.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── project.pbxproj ├── XYChart.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Podfile ├── Podfile.lock ├── XYChartTests │ ├── Info.plist │ └── XYChartTests.m └── XYChartUITests │ ├── Info.plist │ └── XYChartUITests.m ├── scripts └── push.sh ├── fast_pod_install ├── fast_pod_lint ├── fast_pod_push ├── XYChart ├── model │ ├── XYChartItem.m │ ├── XYChartItem.h │ ├── XYChartDataSourceItem.h │ └── XYChartDataSourceItem.m ├── Line │ ├── XYLinesView.h │ ├── XYLineChart.h │ ├── XYLineItemView.h │ ├── XYLineGradientLayer.h │ ├── XYLineGradientLayer.m │ ├── XYLineChart.m │ ├── XYLinesView.m │ └── XYLineItemView.m ├── Bar │ ├── XYBarChart.h │ ├── XYBarCell.h │ ├── XYBarView.h │ ├── XYBarChart.m │ ├── XYBarCell.m │ └── XYBarView.m ├── Extension │ ├── UIColor+XYChart.h │ ├── NSArray+XYChart.h │ ├── UIColor+XYChart.m │ └── NSArray+XYChart.m ├── XYChart.h ├── Const │ ├── XYChartConst.h │ └── XYChartProtocol.h └── XYChart.m ├── XYChart.podspec ├── .travis.yml ├── .gitignore ├── README.md └── LICENSE /Demo/Pods/Headers/Private/XYChart/XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYBarCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarCell.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYBarView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYBarCell.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarCell.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYBarView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYBarChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYLineChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYLinesView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLinesView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYBarChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Bar/XYBarChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYChartItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/model/XYChartItem.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYLineChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYLinesView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLinesView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYChartConst.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Const/XYChartConst.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYChartItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/model/XYChartItem.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYChartConst.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Const/XYChartConst.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYLineItemView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineItemView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYChartProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Const/XYChartProtocol.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYLineItemView.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineItemView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYChartProtocol.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Const/XYChartProtocol.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/NSArray+XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Extension/NSArray+XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/UIColor+XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Extension/UIColor+XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/NSArray+XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Extension/NSArray+XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/UIColor+XYChart.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Extension/UIColor+XYChart.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYLineGradientLayer.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineGradientLayer.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYLineGradientLayer.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/Line/XYLineGradientLayer.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/XYChart/XYChartDataSourceItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/model/XYChartDataSourceItem.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/XYChart/XYChartDataSourceItem.h: -------------------------------------------------------------------------------- 1 | ../../../../../XYChart/model/XYChartDataSourceItem.h -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /scripts/push.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source ~/.rvm/scripts/rvm 4 | rvm use default 5 | pod trunk push --allow-warnings 6 | -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/FORGestureTrackDisplay/FORGestureTrack.h: -------------------------------------------------------------------------------- 1 | ../../../FORGestureTrackDisplay/FORGestureTrackDisplay/FORGestureTrack.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/FORGestureTrackDisplay/FORTrackGesture.h: -------------------------------------------------------------------------------- 1 | ../../../FORGestureTrackDisplay/FORGestureTrackDisplay/FORTrackGesture.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/FORGestureTrackDisplay/FORGestureTrack.h: -------------------------------------------------------------------------------- 1 | ../../../FORGestureTrackDisplay/FORGestureTrackDisplay/FORGestureTrack.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/FORGestureTrackDisplay/FORTrackGesture.h: -------------------------------------------------------------------------------- 1 | ../../../FORGestureTrackDisplay/FORGestureTrackDisplay/FORTrackGesture.h -------------------------------------------------------------------------------- /fast_pod_install: -------------------------------------------------------------------------------- 1 | SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd) 2 | cd $SCRIPT_DIR 3 | echo "current path:" 4 | pwd 5 | 6 | cd ./Demo 7 | pod install -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/bar-n.imageset/bar-n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhipingYang/XYChart/HEAD/Demo/XYChart/Assets.xcassets/bar-n.imageset/bar-n.png -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/line-n.imageset/line-n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhipingYang/XYChart/HEAD/Demo/XYChart/Assets.xcassets/line-n.imageset/line-n.png -------------------------------------------------------------------------------- /fast_pod_lint: -------------------------------------------------------------------------------- 1 | SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd) 2 | cd $SCRIPT_DIR 3 | echo "current path:" 4 | pwd 5 | 6 | pod lib lint --verbose --allow-warnings -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/AppIcon.appiconset/hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhipingYang/XYChart/HEAD/Demo/XYChart/Assets.xcassets/AppIcon.appiconset/hello.png -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/AppIcon.appiconset/Group 2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhipingYang/XYChart/HEAD/Demo/XYChart/Assets.xcassets/AppIcon.appiconset/Group 2@3x.png -------------------------------------------------------------------------------- /fast_pod_push: -------------------------------------------------------------------------------- 1 | SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd) 2 | cd $SCRIPT_DIR 3 | echo "current path:" 4 | pwd 5 | 6 | pod trunk push XYChart.podspec --verbose --allow-warnings -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/XYChart/XYChart-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_XYChart : NSObject 3 | @end 4 | @implementation PodsDummy_XYChart 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChart/Pods-XYChart-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XYChart : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XYChart 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartTests/Pods-XYChartTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XYChartTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XYChartTests 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/XYChart.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartTests/Pods-XYChartTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XYChartUITests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XYChartUITests 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/FORGestureTrackDisplay/FORGestureTrackDisplay-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FORGestureTrackDisplay : NSObject 3 | @end 4 | @implementation PodsDummy_FORGestureTrackDisplay 5 | @end 6 | -------------------------------------------------------------------------------- /XYChart/model/XYChartItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // UUChartItem.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartItem.h" 10 | 11 | @implementation XYChartItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/XYChart/XYChart-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/XYChart.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/XYChart.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/XYChart/vc/BarTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BarTableViewController : UITableViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Demo/XYChart/vc/LineTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LineTableViewController.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LineTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/FORGestureTrackDisplay/FORGestureTrackDisplay-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/XYChart.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/XYChart/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /XYChart/Line/XYLinesView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UULines.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | @class XYChart; 12 | @interface XYLinesView : UIView 13 | 14 | @property (nonatomic, weak, readonly) XYChart *chartView; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/FORGestureTrackDisplay/FORGestureTrack.h: -------------------------------------------------------------------------------- 1 | // 2 | // FORGestureTrack.h 3 | // FORGestureTrackDisplayDemo 4 | // 5 | // Created by Daniel on 31/05/2017. 6 | // Copyright © 2017 Daniel. All rights reserved. 7 | // 8 | 9 | #import "FORTrackGesture.h" 10 | 11 | @interface UIWindow (tracking) 12 | 13 | - (void)startTracking; 14 | 15 | - (void)endTracking; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Demo/XYChart/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/bar-n.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "bar-n.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/line-n.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "line-n.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /XYChart/Bar/XYBarChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYBarChart.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class XYChart; 14 | @interface XYBarChart : UIView 15 | 16 | @property (nonatomic, weak, readonly) XYChart *chartView; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /XYChart/Line/XYLineChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYLineChart.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #import "XYChartProtocol.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | @class XYChart; 15 | @interface XYLineChart : UIView 16 | 17 | @property (nonatomic, weak, readonly) XYChart *chartView; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /XYChart/Line/XYLineItemView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UULineItemView.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface XYLineItemView : UIView 14 | 15 | - (void)setItems:(NSArray >*)items name:(NSAttributedString *)name range:(XYRange)range; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Demo/XYChart/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | [self.window startTracking]; 17 | return YES; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Demo/XYChart/view/ChartViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewCell.h 3 | // UUChartView 4 | // 5 | // Created by shake on 15/1/4. 6 | // Copyright (c) 2015年 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RandomChartDataSource.h" 11 | 12 | extern NSString *const lineChartReuseIdentifier; 13 | extern NSString *const barChartReuseIdentifier; 14 | 15 | @interface ChartViewCell : UITableViewCell 16 | 17 | @property (nonatomic, strong) RandomChartDataSource *dataSource; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartTests/Pods-XYChartTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartTests/Pods-XYChartTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Demo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'XYChart' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | pod 'XYChart', :path => '../' 8 | pod "FORGestureTrackDisplay" 9 | 10 | 11 | target 'XYChartTests' do 12 | inherit! :search_paths 13 | # Pods for testing 14 | end 15 | 16 | target 'XYChartUITests' do 17 | inherit! :search_paths 18 | # Pods for testing 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /XYChart/model/XYChartItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // UUChartItem.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface XYChartItem : NSObject 14 | 15 | @property (nonatomic) NSNumber *value; 16 | @property (nonatomic) NSTimeInterval duration; 17 | @property (nonatomic, strong) UIColor *color; 18 | @property (nonatomic, readwrite) NSString *showName; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /XYChart/Bar/XYBarCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYBarCell.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class XYChart; 14 | @interface XYBarCell : UICollectionViewCell 15 | 16 | @property (nonatomic, strong) UIView *barContainerView; 17 | @property (nonatomic, strong) UILabel *nameLabel; 18 | 19 | - (void)updateChart:(XYChart *)chart index:(NSUInteger)index animation:(BOOL)animation; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FORGestureTrackDisplay (0.1.0) 3 | - XYChart (0.0.1) 4 | 5 | DEPENDENCIES: 6 | - FORGestureTrackDisplay 7 | - XYChart (from `../`) 8 | 9 | SPEC REPOS: 10 | https://github.com/cocoapods/specs.git: 11 | - FORGestureTrackDisplay 12 | 13 | EXTERNAL SOURCES: 14 | XYChart: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | FORGestureTrackDisplay: a0c14d65cbe49ee54dbc1ca15cfd14d905e0cf79 19 | XYChart: 3c23744432e7ebb11a0c61b5cfba4eb35f12c417 20 | 21 | PODFILE CHECKSUM: a8239684cbc474cac6c5e50fa45e2570dde37a08 22 | 23 | COCOAPODS: 1.7.5 24 | -------------------------------------------------------------------------------- /Demo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FORGestureTrackDisplay (0.1.0) 3 | - XYChart (0.0.1) 4 | 5 | DEPENDENCIES: 6 | - FORGestureTrackDisplay 7 | - XYChart (from `../`) 8 | 9 | SPEC REPOS: 10 | https://github.com/cocoapods/specs.git: 11 | - FORGestureTrackDisplay 12 | 13 | EXTERNAL SOURCES: 14 | XYChart: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | FORGestureTrackDisplay: a0c14d65cbe49ee54dbc1ca15cfd14d905e0cf79 19 | XYChart: 3c23744432e7ebb11a0c61b5cfba4eb35f12c417 20 | 21 | PODFILE CHECKSUM: a8239684cbc474cac6c5e50fa45e2570dde37a08 22 | 23 | COCOAPODS: 1.7.5 24 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/XYChart/XYChart.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/XYChart 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/XYChart" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/XYChart" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChart/Pods-XYChart.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FORGestureTrackDisplay" "${PODS_CONFIGURATION_BUILD_DIR}/XYChart" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FORGestureTrackDisplay" -l"XYChart" -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChart/Pods-XYChart.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public/XYChart" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FORGestureTrackDisplay" "${PODS_CONFIGURATION_BUILD_DIR}/XYChart" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FORGestureTrackDisplay" -l"XYChart" -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /XYChart/Extension/UIColor+XYChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+xy_random.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor(XYChart) 12 | 13 | /** 14 | 随机色 15 | */ 16 | + (UIColor *)xy_random; 17 | /** 18 | 随机-淡色 19 | */ 20 | + (UIColor *)xy_randomLigt; 21 | 22 | + (UIColor *)xy_randomLigtRed; 23 | + (UIColor *)xy_randomLigtGreen; 24 | + (UIColor *)xy_randomLigtBlue; 25 | 26 | /** 27 | 随机-暗色 28 | */ 29 | + (UIColor *)xy_randomDark; 30 | 31 | /** 32 | 分割线颜色 33 | */ 34 | + (UIColor *)xy_separatedColor; 35 | 36 | + (UIColor *)xy_rainBow:(NSInteger)index; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /XYChart.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "XYChart" 3 | s.version = '0.0.1' 4 | 5 | s.source = { 6 | :git => "https://github.com/ZhipingYang/#{s.name}.git", 7 | :tag => s.version.to_s 8 | } 9 | 10 | s.summary = 'The line and bar of chart' 11 | s.description = 'XYChart is designed for line & bar of charts which can compare mutiple datas in form styles, and limited the range of values to show, and so on.' 12 | s.homepage = "https://github.com/ZhipingYang/#{s.name}" 13 | s.license = 'MIT' 14 | s.authors = { 'ZhipingYang' => 'XcodeYang@gmail.com' } 15 | s.platform = :ios, '8.0' 16 | s.requires_arc = true 17 | s.frameworks = 'UIKit' 18 | 19 | s.source_files = [ 20 | "XYChart/**/*.{h,m}", 21 | ] 22 | end 23 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/FORGestureTrackDisplay/FORGestureTrackDisplay.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FORGestureTrackDisplay 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FORGestureTrackDisplay" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FORGestureTrackDisplay" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/FORGestureTrackDisplay 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /XYChart/Bar/XYBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UUBar.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface XYBarView : UIView 14 | { 15 | CAShapeLayer * _shapeLayer; 16 | } 17 | @property (nonatomic, readonly) id chartItem; 18 | @property (nonatomic, readonly) XYRange range; 19 | @property (nonatomic, strong) CALayer * showLayer; 20 | 21 | @property (nonatomic, copy) void(^handleBlock)(XYBarView *view); 22 | 23 | - (void)setChartItem:(id _Nonnull)chartItem range:(XYRange)range; 24 | 25 | - (void)startAnimate:(BOOL)animate; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /Demo/Pods/Local Podspecs/XYChart.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XYChart", 3 | "summary": "The line and bar of chart", 4 | "description": "XYChart is designed for line & bar of charts which can compare mutiple datas in form styles, and limited the range of values to show, and so on.", 5 | "version": "0.0.1", 6 | "homepage": "https://github.com/ZhipingYang/XYChart", 7 | "license": "MIT", 8 | "authors": { 9 | "ZhipingYang": "XcodeYang@gmail.com" 10 | }, 11 | "platforms": { 12 | "ios": "8.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/ZhipingYang/XYChart.git", 16 | "tag": "0.0.1" 17 | }, 18 | "requires_arc": true, 19 | "frameworks": "UIKit", 20 | "source_files": [ 21 | "XYChart/**/*.{h,m}" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /Demo/XYChart/model/RandomChartDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChartGroup.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RandomChartDataSource : XYChartDataSourceItem 12 | 13 | @property (nonatomic, readonly) XYChartType type; 14 | 15 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row; 16 | 17 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row width:(CGFloat)width; 18 | 19 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row width:(CGFloat)width isGroupColor:(BOOL)isGroupColor; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /XYChart/Line/XYLineGradientLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYLineGradientLayer.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "XYChartProtocol.h" 11 | 12 | @interface XYLineGradientLayer : CAGradientLayer 13 | 14 | @property (nonatomic, readonly) id pre; 15 | @property (nonatomic, readonly) id next; 16 | @property (nonatomic, readonly) CAShapeLayer *shapeLayer; 17 | 18 | + (instancetype)layerWithPre:(id)pre next:(id)next range:(XYRange)range; 19 | 20 | - (void)updateWithPre:(id)pre next:(id)next range:(XYRange)range; 21 | 22 | - (void)startAnimate:(BOOL)animate; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Demo/XYChartTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Demo/XYChartUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /XYChart/XYChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYChart.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | 10 | #include "XYChartProtocol.h" 11 | 12 | @import UIKit; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface XYChart : UIView 17 | 18 | @property (nonatomic, weak, nullable) id dataSource; 19 | @property (nonatomic, weak, nullable) id delegate; 20 | 21 | @property (nonatomic, readonly) XYChartType type; 22 | 23 | - (instancetype)initWithFrame:(CGRect)frame type:(XYChartType)type NS_DESIGNATED_INITIALIZER; 24 | - (instancetype)initWithType:(XYChartType)type; 25 | 26 | /** 27 | 更新图标数据 28 | 29 | @param dataSource 数据 30 | @param animation 是否执行动画 31 | */ 32 | - (void)setDataSource:(id)dataSource animation:(BOOL)animation; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/FORGestureTrackDisplay/FORTrackGesture.h: -------------------------------------------------------------------------------- 1 | // 2 | // FORTrackGesture.h 3 | // FORGestureTrackDisplayDemo 4 | // 5 | // Created by Daniel on 31/05/2017. 6 | // Copyright © 2017 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol FORGestureDelegate 12 | 13 | - (void)forTouchesBegan:(NSSet *)touches; 14 | 15 | - (void)forTouchesMoved:(NSSet *)touches; 16 | 17 | - (void)forTouchesEnded:(NSSet *)touches; 18 | 19 | - (void)forTouchesCancelled:(NSSet *)touches; 20 | 21 | @end 22 | 23 | 24 | 25 | @interface FORTrackGesture : UIGestureRecognizer 26 | 27 | @property (readonly) NSSet *activeTouches; 28 | 29 | @property (nonatomic, weak) NSObject* touchDelegate; 30 | 31 | 32 | - (instancetype) init NS_UNAVAILABLE; 33 | 34 | - (instancetype) initWithTarget:(id)target action:(SEL)action NS_UNAVAILABLE; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartTests/Pods-XYChartTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /XYChart/model/XYChartDataSourceItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartDataSource.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface XYChartDataSourceItem : NSObject 14 | 15 | /** 16 | default the min & max of items value with 20% space of (max-min) 17 | */ 18 | @property (nonatomic) XYRange range; 19 | 20 | /** 21 | default 5 22 | */ 23 | @property (nonatomic) NSUInteger numberOfLevels; 24 | 25 | /** 26 | default 60 27 | */ 28 | @property (nonatomic) CGFloat widthOfRow; 29 | 30 | /** 31 | default YES; 32 | */ 33 | @property (nonatomic) BOOL autoSizingRowWidth; 34 | 35 | #pragma mark - 重点 36 | 37 | /** 38 | 必须设置的 39 | */ 40 | @property (nonatomic, readonly) NSArray >*> *dataList; 41 | 42 | - (instancetype)initWithDataList:(NSArray >*> *)dataList; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Demo/XYChartTests/XYChartTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartTests.m 3 | // XYChartTests 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XYChartTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation XYChartTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /XYChart/Extension/NSArray+XYChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+XYChart.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSArray (XYChart) 14 | 15 | /** 16 | 提供数组元素类型转换的方法 比如 @[@(1),@(2),@(3)] => @[@"1",@"2",@"3"] 17 | 转换失败用NSNull替换 18 | 19 | @param block 子元素转换成所对应的id类型, (注意:必有返回值) 20 | @return 新数组 新元素类型 21 | */ 22 | - (NSArray *)xy_mapIndex:(nullable id (^)(ObjectType obj, NSUInteger idx))block; 23 | - (NSArray *)xy_map:(nullable id (^)(ObjectType obj))block; 24 | - (NSArray *)xy_flatMap:(nullable id (^)(id obj))block; 25 | 26 | /** 27 | 安全取值 28 | */ 29 | @property (nonatomic, readonly) ObjectType (^xy_safeIdx)(NSUInteger index); 30 | 31 | @end 32 | 33 | 34 | 35 | @interface NSMutableArray (XYChart) 36 | 37 | - (void)xy_safeAdd:(ObjectType)obj; 38 | - (void)xy_flexibleReuseWithContains:(NSInteger)count map:(ObjectType (^)(void))map handle:(void (^)(ObjectType obj))handle; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /XYChart/Const/XYChartConst.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartConst.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | // 纵轴文案宽度 12 | #define XYChartSectionLabelWidth 30 13 | // 横轴文案高度 14 | #define XYChartRowLabelHeight 20 15 | // 折线图,线条宽度 16 | #define XYChartLineWidth 3 17 | 18 | // 获取宽度 19 | #define xy_width(obj) obj.frame.size.width 20 | // 获取高度 21 | #define xy_height(obj) obj.frame.size.height 22 | #define xy_left(obj) obj.frame.origin.x 23 | #define xy_top(obj) obj.frame.origin.y 24 | 25 | /** 26 | 图表类型 27 | 28 | - UUChartStyleLine: 折线图 29 | - UUChartStyleBar: 条形图 30 | */ 31 | typedef NS_ENUM(NSInteger, XYChartType){ 32 | XYChartTypeLine = 0, 33 | XYChartTypeBar 34 | }; 35 | 36 | //范围 37 | struct xy_range { 38 | CGFloat min; 39 | CGFloat max; 40 | }; 41 | typedef struct xy_range XYRange; 42 | CG_INLINE XYRange XYRangeMake(CGFloat min, CGFloat max); 43 | CG_INLINE XYRange XYRangeMake(CGFloat min, CGFloat max){ 44 | XYRange r; 45 | r.min = min; 46 | r.max = max; 47 | return r; 48 | } 49 | 50 | static const XYRange XYRangeZero = {0,0}; 51 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Zhiping Yang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode10.2 2 | language: objective-c 3 | 4 | notifications: 5 | email: false 6 | 7 | branches: 8 | only: 9 | - master 10 | - /^\d+\.\d+\.\d+$/ 11 | 12 | before_install: 13 | - gem install cocoapods -v '~> 1.7.0' --no-document --quiet 14 | - gem install xcpretty --no-document --quiet 15 | - pod --version 16 | - pod repo update --silent 17 | - xcpretty --version 18 | - xcodebuild -version 19 | - xcodebuild -showsdks 20 | 21 | jobs: 22 | include: 23 | - stage: lint 24 | script: 25 | - pod lib lint --allow-warnings 26 | 27 | - stage: test 28 | script: 29 | - rm -rf ~/Library/Developer/Xcode/DerivedData/ 30 | - cd Demo 31 | - pod install 32 | - xcodebuild clean build -workspace XYChart.xcworkspace -scheme 'XYChart' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug | xcpretty -c 33 | 34 | - stage: deploy 35 | if: tag IS present 36 | before_script: 37 | - echo 'current tag -> $TRAVIS_TAG' 38 | - sed -i '' "s/s.version = '0.0.1'/s.version = '$TRAVIS_TAG'/g" XYChart.podspec 39 | script: 40 | - set -eo pipefail 41 | - pod trunk push --verbose --allow-warnings | ruby -e 'ARGF.each{ print "." }' 42 | -------------------------------------------------------------------------------- /Demo/XYChartUITests/XYChartUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartUITests.m 3 | // XYChartUITests 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface XYChartUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation XYChartUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Demo/XYChart/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Demo/XYChart/vc/LineTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LineTableViewController.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import "LineTableViewController.h" 10 | #import "RandomChartDataSource.h" 11 | #import "ChartViewCell.h" 12 | 13 | @interface LineTableViewController () 14 | 15 | @property (nonatomic, strong) NSArray * dataArray; 16 | 17 | @end 18 | 19 | @implementation LineTableViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | [self.tableView registerClass:[ChartViewCell class] forCellReuseIdentifier:lineChartReuseIdentifier]; 24 | 25 | _dataArray = @[ 26 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeLine section:1 row:5], 27 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeLine section:1 row:15], 28 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeLine section:3 row:5], 29 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeLine section:2 row:15 width:60], 30 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeLine section:2 row:60 width:50 isGroupColor:true] 31 | ]; 32 | [self.tableView reloadData]; 33 | } 34 | 35 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 36 | { 37 | return _dataArray.count; 38 | } 39 | 40 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 41 | { 42 | ChartViewCell *cell = [tableView dequeueReusableCellWithIdentifier:lineChartReuseIdentifier]; 43 | cell.dataSource = _dataArray.xy_safeIdx(indexPath.row); 44 | return cell; 45 | } 46 | 47 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 48 | return 200; 49 | } 50 | 51 | @end 52 | 53 | -------------------------------------------------------------------------------- /Demo/XYChart/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Demo/XYChart/vc/BarTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import "BarTableViewController.h" 10 | #import "RandomChartDataSource.h" 11 | #import "ChartViewCell.h" 12 | 13 | @interface BarTableViewController () 14 | 15 | @property (nonatomic, strong) NSArray * dataArray; 16 | 17 | @end 18 | 19 | @implementation BarTableViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | [self.tableView registerClass:[ChartViewCell class] forCellReuseIdentifier:barChartReuseIdentifier]; 24 | 25 | _dataArray = @[ 26 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:1 row:5], 27 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:1 row:12], 28 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:2 row:5], 29 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:3 row:5], 30 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:4 row:12], 31 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:2 row:15 width:60], 32 | [[RandomChartDataSource alloc] initWithStyle:XYChartTypeBar section:4 row:56 width:80 isGroupColor:true], 33 | ]; 34 | [self.tableView reloadData]; 35 | } 36 | 37 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 38 | { 39 | return _dataArray.count; 40 | } 41 | 42 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 43 | { 44 | ChartViewCell *cell = [tableView dequeueReusableCellWithIdentifier:barChartReuseIdentifier]; 45 | cell.dataSource = _dataArray.xy_safeIdx(indexPath.row); 46 | return cell; 47 | } 48 | 49 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 50 | return 200; 51 | } 52 | 53 | @end 54 | 55 | -------------------------------------------------------------------------------- /Demo/XYChart/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "hello.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Group 2@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "idiom" : "ipad", 47 | "size" : "20x20", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "ipad", 52 | "size" : "20x20", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "idiom" : "ipad", 57 | "size" : "29x29", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "idiom" : "ipad", 62 | "size" : "29x29", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "idiom" : "ipad", 67 | "size" : "40x40", 68 | "scale" : "1x" 69 | }, 70 | { 71 | "idiom" : "ipad", 72 | "size" : "40x40", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "idiom" : "ipad", 77 | "size" : "76x76", 78 | "scale" : "1x" 79 | }, 80 | { 81 | "idiom" : "ipad", 82 | "size" : "76x76", 83 | "scale" : "2x" 84 | }, 85 | { 86 | "idiom" : "ipad", 87 | "size" : "83.5x83.5", 88 | "scale" : "2x" 89 | }, 90 | { 91 | "idiom" : "ios-marketing", 92 | "size" : "1024x1024", 93 | "scale" : "1x" 94 | } 95 | ], 96 | "info" : { 97 | "version" : 1, 98 | "author" : "xcode" 99 | } 100 | } -------------------------------------------------------------------------------- /XYChart/Extension/UIColor+XYChart.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Random.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "UIColor+XYChart.h" 10 | 11 | #define uucc(color) [UIColor color] 12 | 13 | @implementation UIColor(XYChart) 14 | 15 | + (UIColor *)xy_random 16 | { 17 | return [UIColor colorWithRed:arc4random()%255/255.0 18 | green:arc4random()%255/255.0 19 | blue:arc4random()%255/255.0 20 | alpha:1]; 21 | } 22 | 23 | + (UIColor *)xy_randomDark 24 | { 25 | return [UIColor colorWithRed:arc4random()%100/255.0 26 | green:arc4random()%100/255.0 27 | blue:arc4random()%100/255.0 28 | alpha:1]; 29 | } 30 | 31 | + (UIColor *)xy_randomLigt 32 | { 33 | return [UIColor colorWithRed:(arc4random()%100+155)/255.0 34 | green:(arc4random()%100+155)/255.0 35 | blue:(arc4random()%100+155)/255.0 36 | alpha:1]; 37 | } 38 | 39 | + (UIColor *)xy_randomLigtRed 40 | { 41 | return [UIColor colorWithRed:(arc4random()%100+155)/255.0 42 | green:155/255.0 43 | blue:155/255.0 44 | alpha:1]; 45 | } 46 | 47 | + (UIColor *)xy_randomLigtGreen 48 | { 49 | return [UIColor colorWithRed:155/255.0 50 | green:(arc4random()%100+155)/255.0 51 | blue:155/255.0 52 | alpha:1]; 53 | } 54 | 55 | + (UIColor *)xy_randomLigtBlue 56 | { 57 | return [UIColor colorWithRed:155/255.0 58 | green:155/255.0 59 | blue:(arc4random()%100+155)/255.0 60 | alpha:1]; 61 | } 62 | 63 | + (UIColor *)xy_separatedColor 64 | { 65 | return [UIColor colorWithWhite:0 alpha:0.4]; 66 | } 67 | 68 | + (UIColor *)xy_rainBow:(NSInteger)index 69 | { 70 | return @[ 71 | uucc(redColor), 72 | uucc(orangeColor), 73 | uucc(yellowColor), 74 | uucc(greenColor), 75 | uucc(blueColor), 76 | uucc(cyanColor), 77 | uucc(purpleColor) 78 | ][index%7]; 79 | } 80 | @end 81 | 82 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/README.md: -------------------------------------------------------------------------------- 1 | # FORGestureTrackDisplay 2 | > FORGestureTrackDisplay is debug tool to displaying and tracking all kinds of gustures when user touch the screen. 3 | 4 | ![untitled](https://cloud.githubusercontent.com/assets/9360037/26645883/43bc2508-466c-11e7-99ec-baebdbf91257.gif) 5 | 6 | ## Usage 7 | 8 | **first method ( Manual )** 9 | 10 | > in this way, just the appdelegate.window can track gustures. 11 | 12 | ```objective-c 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | 15 | [self.window startTracking]; 16 | 17 | return YES; 18 | } 19 | ``` 20 | 21 | **second method ( auto )** 22 | > I highly recommend this way for auto track gestures in all windows. 23 | 24 | ```objective-c 25 | @implementation NSObject (Runtime) 26 | 27 | + (void)swizzleInstanceMethodWithOriginSel:(SEL)oriSel swizzledSel:(SEL)swiSel { 28 | Method originAddObserverMethod = class_getInstanceMethod(self, oriSel); 29 | Method swizzledAddObserverMethod = class_getInstanceMethod(self, swiSel); 30 | 31 | [self swizzleMethodWithOriginSel:oriSel oriMethod:originAddObserverMethod swizzledSel:swiSel swizzledMethod:swizzledAddObserverMethod class:self]; 32 | } 33 | 34 | + (void)swizzleMethodWithOriginSel:(SEL)oriSel 35 | oriMethod:(Method)oriMethod 36 | swizzledSel:(SEL)swizzledSel 37 | swizzledMethod:(Method)swizzledMethod 38 | class:(Class)cls { 39 | BOOL didAddMethod = class_addMethod(cls, oriSel, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod)); 40 | 41 | if (didAddMethod) { 42 | class_replaceMethod(cls, swizzledSel, method_getImplementation(oriMethod), method_getTypeEncoding(oriMethod)); 43 | } else { 44 | method_exchangeImplementations(oriMethod, swizzledMethod); 45 | } 46 | } 47 | @end 48 | ``` 49 | 50 | ```objective-c 51 | @implementation UIWindow (Runtime) 52 | 53 | + (void)load { 54 | static dispatch_once_t onceToken; 55 | dispatch_once(&onceToken, ^{ 56 | [self swizzleInstanceMethodWithOriginSel:@selector(becomeKeyWindow) swizzledSel:@selector(xy_becomeKeyWindow)]; 57 | [self swizzleInstanceMethodWithOriginSel:@selector(resignKeyWindow) swizzledSel:@selector(xy_resignKeyWindow)]; 58 | }); 59 | } 60 | 61 | - (void)xy_becomeKeyWindow 62 | { 63 | [self xy_becomeKeyWindow]; 64 | [self startTracking]; 65 | } 66 | 67 | - (void)xy_resignKeyWindow 68 | { 69 | [self xy_resignKeyWindow]; 70 | [self endTracking]; 71 | } 72 | @end 73 | ``` 74 | -------------------------------------------------------------------------------- /Demo/XYChart/view/ChartViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewCell.m 3 | // UUChartView 4 | // 5 | // Created by shake on 15/1/4. 6 | // Copyright (c) 2015年 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "ChartViewCell.h" 10 | #import 11 | 12 | NSString *const lineChartReuseIdentifier = @"lineChartReuseIdentifier"; 13 | NSString *const barChartReuseIdentifier = @"barChartReuseIdentifier"; 14 | 15 | @interface ChartViewCell () 16 | { 17 | XYChart *_chartView; 18 | } 19 | @end 20 | 21 | @implementation ChartViewCell 22 | 23 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 24 | { 25 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 26 | if (self) { 27 | XYChartType type = [reuseIdentifier isEqualToString:lineChartReuseIdentifier] 28 | ? XYChartTypeLine : XYChartTypeBar; 29 | _chartView = [[XYChart alloc] initWithFrame:CGRectZero type:type]; 30 | _chartView.delegate = self; 31 | [self.contentView addSubview:_chartView]; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)layoutSubviews 37 | { 38 | [super layoutSubviews]; 39 | if (@available(iOS 11.0, *)) { 40 | CGFloat safeSpace = self.safeAreaInsets.left+self.safeAreaInsets.right; 41 | _chartView.frame = CGRectMake(0, 30, xy_width(self)-20-safeSpace, xy_height(self)-40); 42 | } else { 43 | _chartView.frame = CGRectMake(0, 30, xy_width(self)-20, xy_height(self)-40); 44 | } 45 | } 46 | 47 | - (void)setDataSource:(RandomChartDataSource *)dataSource 48 | { 49 | _dataSource = dataSource; 50 | [_chartView setDataSource:dataSource animation:YES]; 51 | } 52 | 53 | #pragma mark - XYChartDelegate 54 | 55 | - (BOOL)chart:(XYChart *)chart shouldShowMenu:(NSIndexPath *)index 56 | { 57 | return YES; 58 | } 59 | 60 | - (void)chart:(XYChart *)chart itemDidClick:(id)item 61 | { 62 | // actions 63 | } 64 | 65 | - (CAAnimation *)chart:(XYChart *)chart clickAnimationOfIndex:(NSIndexPath *)index 66 | { 67 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"]; 68 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 69 | animation.duration = 0.3; 70 | animation.repeatCount = 1; 71 | animation.removedOnCompletion = true; 72 | 73 | int style = arc4random()%3; 74 | if (style == 0) { 75 | animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1, 1.1, 1.0)]; 76 | animation.autoreverses = true; 77 | } else if (style == 1) { 78 | CATransform3D rotate = CATransform3DMakeRotation(M_PI, 1, 0, 0); 79 | rotate.m34 = 1.0/100.0; 80 | animation.toValue = [NSValue valueWithCATransform3D:rotate]; 81 | } else if (style == 2) { 82 | CATransform3D rotate = CATransform3DMakeRotation(M_PI, 0, 1, 0); 83 | rotate.m34 = -1.0/100.0; 84 | animation.toValue = [NSValue valueWithCATransform3D:rotate]; 85 | } 86 | return animation; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /XYChart/Const/XYChartProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartProtocol.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "XYChartConst.h" 11 | #import "UIColor+XYChart.h" 12 | #import "NSArray+XYChart.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - UUChartItem 17 | 18 | /** 19 | 单个数据展示 20 | */ 21 | @protocol XYChartItem 22 | 23 | @required 24 | /** 25 | 值大小 26 | */ 27 | @property (nonatomic, readonly) NSNumber *value; 28 | /** 29 | 动画时间 30 | */ 31 | @property (nonatomic, readonly) NSTimeInterval duration; 32 | /** 33 | 当前颜色 34 | */ 35 | @property (nonatomic, readonly) UIColor *color; 36 | 37 | @optional 38 | /** 39 | 名称 40 | */ 41 | @property (nonatomic, readonly, nullable) NSString *showName; 42 | 43 | @end 44 | 45 | 46 | 47 | 48 | 49 | 50 | #pragma mark - XYChartDataSource 51 | 52 | @class XYChart; 53 | /** 54 | 多套对比数据展示 55 | */ 56 | @protocol XYChartDataSource 57 | 58 | /** 59 | 多少条并行对比数据,折线图表现多条线,柱状图表现一列中有几条柱状图 60 | */ 61 | - (NSUInteger)numberOfSectionsInChart:(XYChart *)chart; 62 | 63 | /** 64 | 完整的周期内,数据的个数,横向列数 65 | */ 66 | - (NSUInteger)numberOfRowsInChart:(XYChart *)chart; 67 | 68 | /** 69 | x坐标的标题 70 | */ 71 | - (NSAttributedString *)chart:(XYChart *)chart titleOfRowAtIndex:(NSUInteger)index; 72 | 73 | /** 74 | x坐标的标题 75 | */ 76 | - (NSAttributedString *)chart:(XYChart *)chart titleOfSectionAtValue:(CGFloat)sectionValue; 77 | 78 | /** 79 | index下的数据模型 80 | */ 81 | - (id)chart:(XYChart *)chart itemOfIndex:(NSIndexPath *)index; 82 | 83 | /** 84 | 标记y轴方向高亮区间 85 | */ 86 | - (XYRange)visibleRangeInChart:(XYChart *)chart; 87 | 88 | /** 89 | y轴方向分段,5就分5段 90 | */ 91 | - (NSUInteger)numberOfLevelInChart:(XYChart *)chart; 92 | 93 | /** 94 | 横向一栏的宽度 95 | */ 96 | - (CGFloat)rowWidthOfChart:(XYChart *)chart; 97 | 98 | /** 99 | 自适应平均分横向栏目的宽度 100 | */ 101 | - (BOOL)autoSizingRowInChart:(XYChart *)chart; 102 | 103 | @end 104 | 105 | 106 | #pragma mark - XYChartDelegate 107 | 108 | @protocol XYChartDelegate 109 | @optional 110 | 111 | /** 112 | 是否展示UIMenuController 113 | */ 114 | - (BOOL)chart:(XYChart *)chart shouldShowMenu:(NSIndexPath *)index; 115 | 116 | /** 117 | 点击后的action,重载一般就不show UIMenuController了 118 | */ 119 | - (void)chart:(XYChart *)chart itemDidClick:(id)item; 120 | 121 | /** 122 | line用于展示圆圈,bar用于柱形图的动画 123 | */ 124 | - (CAAnimation *)chart:(XYChart *)chart clickAnimationOfIndex:(NSIndexPath *)index; 125 | 126 | @end 127 | 128 | 129 | 130 | 131 | #pragma mark - UUChartContainer 132 | 133 | 134 | @protocol XYChartReload 135 | 136 | /** 137 | 重载数据 138 | 139 | @param animation 是否执行动画 140 | */ 141 | - (void)reloadData:(BOOL)animation; 142 | 143 | @end 144 | 145 | /** 146 | 图标容器 147 | */ 148 | @protocol XYChartContainer 149 | 150 | @property (nonatomic, weak, readonly, nullable) XYChart *chartView; 151 | 152 | - (instancetype)initWithChartView:(XYChart *)chartView; 153 | 154 | @end 155 | 156 | NS_ASSUME_NONNULL_END 157 | -------------------------------------------------------------------------------- /XYChart/Extension/NSArray+XYChart.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Map1.h 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "NSArray+XYChart.h" 10 | 11 | @implementation NSArray (XYChart) 12 | 13 | - (NSArray *)xy_mapIndex:(id _Nonnull (^)(id _Nonnull, NSUInteger))block 14 | { 15 | NSAssert(block!=nil, @"block can't be nil"); 16 | 17 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count]; 18 | 19 | [self enumerateObjectsUsingBlock:^(id _Nonnull object, NSUInteger index, BOOL * _Nonnull stop) { 20 | id value = block(object, index); 21 | [result xy_safeAdd:value]; 22 | }]; 23 | 24 | return [NSArray arrayWithArray:result]; 25 | } 26 | 27 | - (NSArray *)xy_map:(id _Nonnull (^)(id _Nonnull))block 28 | { 29 | NSAssert(block!=nil, @"block can't be nil"); 30 | 31 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count]; 32 | 33 | [self enumerateObjectsUsingBlock:^(id _Nonnull object, NSUInteger index, BOOL * _Nonnull stop) { 34 | id value = block(object); 35 | [result xy_safeAdd:value]; 36 | }]; 37 | 38 | return [NSArray arrayWithArray:result]; 39 | } 40 | 41 | - (NSArray *)_xy_recurrenceAllSubelement 42 | { 43 | NSMutableArray *all = @[].mutableCopy; 44 | void (^getSubViewsBlock)(id current) = ^(id current){ 45 | if ([current isKindOfClass:[NSArray class]]) { 46 | [all addObjectsFromArray:[(NSArray *)current _xy_recurrenceAllSubelement]]; 47 | } else { 48 | [all xy_safeAdd:current]; 49 | } 50 | }; 51 | [self enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 52 | getSubViewsBlock(obj); 53 | }]; 54 | return [NSArray arrayWithArray:all]; 55 | } 56 | 57 | - (NSArray *)xy_flatMap:(id _Nonnull (^)(id _Nonnull))block { 58 | return [[self _xy_recurrenceAllSubelement] xy_map:block]; 59 | } 60 | 61 | - (id _Nonnull (^)(NSUInteger))xy_safeIdx 62 | { 63 | __weak typeof(self) weakSelf = self; 64 | id (^block)(NSUInteger index) = ^(NSUInteger index) { 65 | return (weakSelf.count-1) self.count) { 85 | for (int i=0; i<(count-self.count); i++) { 86 | [self addObject:map()]; 87 | } 88 | } else if (count < self.count) { 89 | NSRange range = NSMakeRange(self.count-1, self.count-count); 90 | NSArray *spareArr = [self subarrayWithRange:range]; 91 | [spareArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 92 | handle(obj); 93 | }]; 94 | [self removeObjectsInRange:range]; 95 | } 96 | } 97 | @end 98 | -------------------------------------------------------------------------------- /XYChart/Bar/XYBarChart.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYBarChart.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | 10 | #import "XYBarChart.h" 11 | #import "XYBarView.h" 12 | #import "XYBarCell.h" 13 | #import "XYChart.h" 14 | 15 | @interface XYBarChart () 16 | { 17 | BOOL _shouldAnimation; 18 | } 19 | @property (nonatomic, strong) UICollectionView *collectionView; 20 | 21 | @end 22 | 23 | @implementation XYBarChart 24 | 25 | - (instancetype)initWithChartView:(XYChart *)chartView 26 | { 27 | self = [super init]; 28 | if (self) { 29 | _chartView = chartView; 30 | [self initBaseUIElements]; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)initBaseUIElements 36 | { 37 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 38 | layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; 39 | layout.minimumLineSpacing = 0; 40 | _collectionView = [[UICollectionView alloc] initWithFrame:self.bounds collectionViewLayout:layout]; 41 | _collectionView.backgroundColor = [UIColor clearColor]; 42 | _collectionView.dataSource = self; 43 | _collectionView.delegate = self; 44 | _collectionView.showsVerticalScrollIndicator = NO; 45 | _collectionView.showsHorizontalScrollIndicator = NO; 46 | [self addSubview:_collectionView]; 47 | [_collectionView registerClass:[XYBarCell class] forCellWithReuseIdentifier:NSStringFromClass([XYBarCell class])]; 48 | } 49 | 50 | - (void)layoutSubviews 51 | { 52 | [super layoutSubviews]; 53 | _collectionView.frame = self.bounds; 54 | [_collectionView reloadData]; 55 | } 56 | 57 | #pragma mark - XYChartContainer 58 | 59 | - (void)reloadData:(BOOL)animation 60 | { 61 | _shouldAnimation = animation; 62 | [self.collectionView reloadData]; 63 | } 64 | 65 | #pragma mark - UICollectionViewDelegate & UICollectionViewDataSource 66 | 67 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 68 | { 69 | return [_chartView.dataSource numberOfRowsInChart:_chartView]; 70 | } 71 | 72 | - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 73 | { 74 | XYBarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XYBarCell class]) forIndexPath:indexPath]; 75 | [cell updateChart:_chartView index:indexPath.row animation:_shouldAnimation]; 76 | return cell; 77 | } 78 | 79 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath 80 | { 81 | const BOOL isAutoSizing = [_chartView.dataSource autoSizingRowInChart:_chartView]; 82 | CGFloat rows = [_chartView.dataSource numberOfRowsInChart:_chartView]; 83 | rows = rows>0 ? rows : 1; 84 | const CGFloat rowWidth = isAutoSizing ? xy_width(self)/rows : [_chartView.dataSource rowWidthOfChart:_chartView]; 85 | return CGSizeMake(rowWidth, xy_height(self)); 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/FORGestureTrackDisplay/FORTrackGesture.m: -------------------------------------------------------------------------------- 1 | // 2 | // FORTrackGesture.m 3 | // FORGestureTrackDisplayDemo 4 | // 5 | // Created by Daniel on 31/05/2017. 6 | // Copyright © 2017 Daniel. All rights reserved. 7 | // 8 | 9 | #import "FORTrackGesture.h" 10 | #import 11 | 12 | @implementation FORTrackGesture{ 13 | NSMutableSet* activeTouches; 14 | } 15 | 16 | static FORTrackGesture* _instance = nil; 17 | 18 | - (id)init { 19 | if(_instance) return _instance; 20 | if((self = [super init])){ 21 | _instance = self; 22 | self.delaysTouchesBegan = NO; 23 | self.delaysTouchesEnded = NO; 24 | self.cancelsTouchesInView = NO; 25 | 26 | activeTouches = [NSMutableSet set]; 27 | } 28 | return _instance; 29 | } 30 | 31 | @synthesize activeTouches; 32 | 33 | + (FORTrackGesture*)sharedInstace { 34 | if(!_instance){ 35 | _instance = [[[FORTrackGesture class] alloc] init]; 36 | _instance.delegate = _instance; 37 | } 38 | return _instance; 39 | } 40 | 41 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 42 | [activeTouches unionSet:touches]; 43 | if(self.state == UIGestureRecognizerStatePossible){ 44 | self.state = UIGestureRecognizerStateBegan; 45 | }else{ 46 | self.state = UIGestureRecognizerStateChanged; 47 | } 48 | [_touchDelegate forTouchesBegan:touches]; 49 | } 50 | 51 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 52 | self.state = UIGestureRecognizerStateChanged; 53 | [_touchDelegate forTouchesMoved:touches]; 54 | } 55 | 56 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { 57 | [activeTouches minusSet:touches]; 58 | if(![activeTouches count]){ 59 | self.state = UIGestureRecognizerStateEnded; 60 | } 61 | [_touchDelegate forTouchesEnded:touches]; 62 | } 63 | 64 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { 65 | [activeTouches minusSet:touches]; 66 | if(![activeTouches count]){ 67 | self.state = UIGestureRecognizerStateEnded; 68 | } 69 | [_touchDelegate forTouchesCancelled:touches]; 70 | } 71 | 72 | #pragma mark - UIGestureRecognizer 73 | 74 | - (BOOL) canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer{ 75 | return NO; 76 | } 77 | 78 | - (BOOL) shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ 79 | return NO; 80 | } 81 | 82 | 83 | #pragma mark - UIGestureRecognizerDelegate 84 | 85 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ 86 | return YES; 87 | } 88 | 89 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ 90 | return NO; 91 | } 92 | 93 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ 94 | return NO; 95 | } 96 | 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /XYChart/Line/XYLineGradientLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYLineGradientLayer.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYLineGradientLayer.h" 10 | 11 | @interface XYLineGradientLayer() 12 | 13 | @property (nonatomic, strong) CAShapeLayer *shapeLayer; 14 | @property (nonatomic, strong) id pre; 15 | @property (nonatomic, strong) id next; 16 | @property (nonatomic) XYRange range; 17 | 18 | @property (nonatomic, strong) CADisplayLink *link; 19 | 20 | @end 21 | 22 | @implementation XYLineGradientLayer 23 | 24 | + (instancetype)layerWithPre:(id)pre next:(id)next range:(XYRange)range 25 | { 26 | XYLineGradientLayer *gradient = [super layer]; 27 | [gradient updateWithPre:pre next:next range:range]; 28 | return gradient; 29 | } 30 | 31 | - (void)dealloc 32 | { 33 | [_link invalidate]; 34 | } 35 | 36 | - (void)updateWithPre:(id)pre next:(id)next range:(XYRange)range 37 | { 38 | self.hidden = !pre || !next; 39 | if (self.hidden) { return; } 40 | 41 | _pre = pre; 42 | _next = next; 43 | _range = range; 44 | 45 | CGFloat startY = pre.value.floatValue > next.value.floatValue ? 0:1; 46 | CGFloat endY = pre.value.floatValue > next.value.floatValue ? 1:0; 47 | self.colors = @[(id)pre.color.CGColor, (id)next.color.CGColor]; 48 | self.startPoint = CGPointMake(0, startY); 49 | self.endPoint = CGPointMake(1, endY); 50 | 51 | if (_shapeLayer == nil) { 52 | _shapeLayer = [CAShapeLayer layer]; 53 | _shapeLayer.lineWidth = XYChartLineWidth; 54 | _shapeLayer.strokeColor = [UIColor redColor].CGColor; 55 | [self addSublayer:_shapeLayer]; 56 | self.mask = _shapeLayer; 57 | } 58 | } 59 | 60 | - (void)layoutSublayers 61 | { 62 | [super layoutSublayers]; 63 | 64 | CGFloat topY = XYChartLineWidth*2; 65 | CGFloat bottomY = (xy_height(self)-XYChartLineWidth*2); 66 | 67 | CGMutablePathRef path = CGPathCreateMutable(); 68 | CGPathMoveToPoint(path, NULL, 0, _pre.value.floatValue>_next.value.floatValue ? topY : bottomY); 69 | CGPathAddLineToPoint(path, NULL, xy_width(self), _pre.value.floatValue>_next.value.floatValue ? bottomY : topY); 70 | _shapeLayer.frame = CGRectMake(0, 0, xy_width(self), xy_height(self)); 71 | _shapeLayer.path = path; 72 | CGPathRelease(path); 73 | } 74 | 75 | - (void)startAnimate:(BOOL)animate 76 | { 77 | if (animate == NO) { return; } 78 | if (_shapeLayer.strokeEnd > 0 && _shapeLayer.strokeEnd < 1) { return; } 79 | 80 | _shapeLayer.strokeEnd = 0; 81 | if (_link == nil) { 82 | _link = [CADisplayLink displayLinkWithTarget:self selector:@selector(animateFlipAction)]; 83 | [_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; 84 | } 85 | } 86 | 87 | - (void)animateFlipAction 88 | { 89 | _shapeLayer.strokeEnd += 1/(60.0 * self.pre.duration); 90 | if (_shapeLayer.strokeEnd > 1) { 91 | [_link invalidate]; 92 | _link = nil; 93 | _shapeLayer.strokeEnd = 1; 94 | } 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /Demo/XYChart/model/RandomChartDataSource.m: -------------------------------------------------------------------------------- 1 | // 2 | // ChartGroup.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 Daniel. All rights reserved. 7 | // 8 | 9 | #import "RandomChartDataSource.h" 10 | #import 11 | 12 | @implementation RandomChartDataSource 13 | 14 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row 15 | { 16 | self = [self initWithDataList:[RandomChartDataSource getDataListWithSection:section 17 | row:row 18 | isGroupColor: false]]; 19 | if (self) { 20 | _type = type; 21 | self.autoSizingRowWidth = YES; 22 | } 23 | return self; 24 | } 25 | 26 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row width:(CGFloat)width 27 | { 28 | self = [self initWithDataList:[RandomChartDataSource getDataListWithSection:section 29 | row:row 30 | isGroupColor: false]]; 31 | if (self) { 32 | _type = type; 33 | self.widthOfRow = width; 34 | self.autoSizingRowWidth = NO; 35 | } 36 | return self; 37 | } 38 | 39 | - (instancetype)initWithStyle:(XYChartType)type section:(NSUInteger)section row:(NSUInteger)row width:(CGFloat)width isGroupColor:(BOOL)isGroupColor 40 | { 41 | self = [self initWithDataList:[RandomChartDataSource getDataListWithSection:section row:row isGroupColor: true]]; 42 | if (self) { 43 | _type = type; 44 | self.widthOfRow = width; 45 | self.autoSizingRowWidth = NO; 46 | } 47 | return self; 48 | } 49 | 50 | + (NSArray> *> *)getDataListWithSection:(NSUInteger)section 51 | row:(NSUInteger)row 52 | isGroupColor:(BOOL)isGroupColor 53 | { 54 | NSArray * dataList = [[self randomSection:section row:row] xy_map:^id(NSArray *obj1) { 55 | UIColor *color = [UIColor xy_random]; 56 | return [obj1 xy_map:^id(NSNumber *obj) { 57 | XYChartItem *item = [[XYChartItem alloc] init]; 58 | item.value = obj; 59 | item.color = isGroupColor ? color : [UIColor xy_random]; 60 | item.duration = 0.6; 61 | item.showName = obj.stringValue; 62 | return item; 63 | }]; 64 | }]; 65 | 66 | return dataList; 67 | } 68 | 69 | #pragma mark - helper 70 | 71 | + (NSArray *)randomStrings:(NSUInteger)count 72 | { 73 | NSMutableArray *mArr = @[].mutableCopy; 74 | for (int i=0; i*>*)randomSection:(NSUInteger)section row:(NSUInteger)row 82 | { 83 | NSMutableArray *>*mArr = @[].mutableCopy; 84 | for (int i=0; i* itemViews; 21 | 22 | @end 23 | 24 | @implementation XYLineChart 25 | 26 | - (instancetype)initWithChartView:(XYChart *)chartView 27 | { 28 | self = [super init]; 29 | if (self) { 30 | _chartView = chartView; 31 | _itemViews = @[].mutableCopy; 32 | _scrolView = [[UIScrollView alloc] initWithFrame:self.bounds]; 33 | _scrolView.showsVerticalScrollIndicator = NO; 34 | _scrolView.showsHorizontalScrollIndicator = NO; 35 | [self addSubview:_scrolView]; 36 | 37 | _linesView = [[XYLinesView alloc] initWithChartView:chartView]; 38 | [_scrolView addSubview:_linesView]; 39 | } 40 | return self; 41 | } 42 | 43 | - (void)layoutSubviews 44 | { 45 | [super layoutSubviews]; 46 | 47 | const BOOL isAutoSizing = [_chartView.dataSource autoSizingRowInChart:_chartView]; 48 | const CGFloat rowWidth = isAutoSizing ? xy_width(self)/self.itemViews.count 49 | : [_chartView.dataSource rowWidthOfChart:_chartView]; 50 | 51 | _scrolView.frame = self.bounds; 52 | _scrolView.contentSize = CGSizeMake(rowWidth * _itemViews.count, xy_height(_scrolView)); 53 | _linesView.frame = CGRectMake(0, 0, _scrolView.contentSize.width, _scrolView.contentSize.height-XYChartRowLabelHeight); 54 | 55 | [_itemViews enumerateObjectsUsingBlock:^(XYLineItemView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 56 | obj.frame = CGRectMake(idx*rowWidth, 0, rowWidth, xy_height(self)); 57 | }]; 58 | } 59 | 60 | #pragma mark - XYChartContainer 61 | 62 | - (void)reloadData:(BOOL)animation 63 | { 64 | [_itemViews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 65 | [_itemViews removeAllObjects]; 66 | 67 | [_linesView reloadData:animation]; 68 | 69 | const NSUInteger rows = [_chartView.dataSource numberOfRowsInChart:_chartView]; 70 | const XYRange range = [_chartView.dataSource visibleRangeInChart:_chartView]; 71 | 72 | for (int index=0; index>*mArr = @[].mutableCopy; 77 | for (int section=0; section<[_chartView.dataSource numberOfSectionsInChart:_chartView]; section++) { 78 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:section]; 79 | id item = [_chartView.dataSource chart:_chartView itemOfIndex:indexPath]; 80 | if (item) { 81 | [mArr addObject:item]; 82 | } 83 | } 84 | NSAttributedString *name = [_chartView.dataSource chart:_chartView titleOfRowAtIndex:index]; 85 | [itemView setItems:mArr name:name range:range]; 86 | [self.scrolView addSubview:itemView]; 87 | [_itemViews addObject:itemView]; 88 | } 89 | [self setNeedsLayout]; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /XYChart/Line/XYLinesView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UULines.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/22. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYLinesView.h" 10 | #import "XYLineGradientLayer.h" 11 | #import "XYChart.h" 12 | 13 | @interface XYLinesView() 14 | 15 | @property (nonatomic, strong) NSMutableArray *>* sections; 16 | 17 | @end 18 | 19 | @implementation XYLinesView 20 | 21 | - (instancetype)initWithFrame:(CGRect)frame 22 | { 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | _sections = @[].mutableCopy; 26 | } 27 | return self; 28 | } 29 | 30 | - (instancetype)initWithChartView:(XYChart *)chartView; 31 | { 32 | self = [self initWithFrame:CGRectZero]; 33 | if (self) { 34 | _chartView = chartView; 35 | } 36 | return self; 37 | } 38 | 39 | - (void)layoutSubviews 40 | { 41 | [super layoutSubviews]; 42 | [self updateLinesShape:NO]; 43 | } 44 | 45 | - (void)reloadData:(BOOL)animation 46 | { 47 | // clean 48 | [_sections enumerateObjectsUsingBlock:^(NSArray * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 49 | [obj makeObjectsPerformSelector:@selector(removeFromSuperlayer)]; 50 | }]; 51 | [_sections removeAllObjects]; 52 | 53 | 54 | NSUInteger section = [_chartView.dataSource numberOfSectionsInChart:_chartView]; 55 | NSUInteger row = [_chartView.dataSource numberOfRowsInChart:_chartView]; 56 | XYRange range = [_chartView.dataSource visibleRangeInChart:_chartView]; 57 | 58 | for (int sectionIdx=0; sectionIdx*mArr = @[].mutableCopy; 60 | for (int rowIdx=0; rowIdx preItem = [_chartView.dataSource chart:_chartView itemOfIndex:preIndex]; 64 | id nextItem = [_chartView.dataSource chart:_chartView itemOfIndex:nextIndex]; 65 | 66 | XYLineGradientLayer *gradient = [XYLineGradientLayer layerWithPre:preItem next:nextItem range:range]; 67 | gradient.zPosition = -100; 68 | [self.layer addSublayer:gradient]; 69 | [mArr addObject:gradient]; 70 | } 71 | [self.sections addObject:[NSArray arrayWithArray:mArr]]; 72 | } 73 | 74 | [self updateLinesShape:animation]; 75 | } 76 | 77 | - (void)updateLinesShape:(BOOL)animate 78 | { 79 | XYRange range = [_chartView.dataSource visibleRangeInChart:_chartView]; 80 | 81 | [_sections enumerateObjectsUsingBlock:^(NSArray * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 82 | const CGFloat itemWidth = xy_width(self)/(float)(obj.count>0 ? (obj.count+1) : 1); 83 | [obj enumerateObjectsUsingBlock:^(XYLineGradientLayer * _Nonnull gradient, NSUInteger sub_idx, BOOL * _Nonnull sub_stop) { 84 | CGFloat circleLenght = XYChartLineWidth*4; 85 | CGFloat prePercent = (gradient.pre.value.floatValue-range.min)/(range.max-range.min); 86 | CGFloat nextPercent = (gradient.next.value.floatValue-range.min)/(range.max-range.min); 87 | gradient.frame = CGRectMake(itemWidth * (sub_idx + 0.5), 88 | xy_height(self)*(1-MAX(prePercent, nextPercent))-circleLenght/2, 89 | itemWidth, 90 | xy_height(self)*fabs(prePercent-nextPercent)+circleLenght); 91 | [gradient startAnimate:animate]; 92 | }]; 93 | }]; 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /XYChart/Bar/XYBarCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYBarCell.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYBarCell.h" 10 | #import "XYBarView.h" 11 | #import "XYChart.h" 12 | 13 | @interface XYBarCell() 14 | { 15 | NSInteger _row; 16 | } 17 | @property (nonatomic, weak) id dataSource; 18 | @property (nonatomic, weak) XYChart *chartView; 19 | 20 | @property (nonatomic, strong) NSArray >*barsDataArray; 21 | 22 | @end 23 | 24 | @implementation XYBarCell 25 | 26 | - (instancetype)initWithFrame:(CGRect)frame 27 | { 28 | self = [super initWithFrame:frame]; 29 | if (self) { 30 | _barContainerView = [UIView new]; 31 | [self.contentView addSubview:_barContainerView]; 32 | _nameLabel = [UILabel new]; 33 | _nameLabel.textAlignment = NSTextAlignmentCenter; 34 | [self addSubview:_nameLabel]; 35 | } 36 | return self; 37 | } 38 | 39 | - (void)layoutSubviews 40 | { 41 | [super layoutSubviews]; 42 | 43 | _barContainerView.frame = CGRectMake(4, 0, xy_width(self.contentView)-8, xy_height(self)-XYChartRowLabelHeight); 44 | _nameLabel.frame = CGRectMake(0, xy_height(self)-XYChartRowLabelHeight, xy_width(self), XYChartRowLabelHeight); 45 | [self updateBarFrames]; 46 | } 47 | 48 | - (void)updateBarFrames 49 | { 50 | const CGFloat count = self.barContainerView.subviews.count; 51 | const CGSize size = self.barContainerView.bounds.size; 52 | [self.barContainerView.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 53 | obj.frame = CGRectMake((size.width/count)*idx, 0, size.width/count, size.height); 54 | [obj setNeedsLayout]; 55 | }]; 56 | } 57 | 58 | - (void)updateChart:(XYChart *)chart index:(NSUInteger)index animation:(BOOL)animation 59 | { 60 | _dataSource = chart.dataSource; 61 | _chartView = chart; 62 | _row = index; 63 | self.nameLabel.attributedText = [_dataSource chart:chart titleOfRowAtIndex:index]; 64 | 65 | NSMutableArray >*mArr = @[].mutableCopy; 66 | 67 | const NSUInteger sections = [_dataSource numberOfSectionsInChart:chart]; 68 | for (int section=0; section item = [_dataSource chart:_chartView itemOfIndex:indexPath]; 71 | [mArr xy_safeAdd:item]; 72 | } 73 | _barsDataArray = [NSArray arrayWithArray:mArr]; 74 | [self reloadBars:animation]; 75 | } 76 | 77 | - (void)reloadBars:(BOOL)animation 78 | { 79 | const CGFloat count = _barsDataArray.count; 80 | [_barContainerView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 81 | 82 | [_barsDataArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 83 | XYBarView *bar = [[XYBarView alloc] initWithFrame:CGRectMake((xy_width(self.barContainerView)/count)*idx, 0, xy_width(self.barContainerView)/count, xy_height(self.barContainerView))]; 84 | [bar setChartItem:obj range:[self.dataSource visibleRangeInChart:self.chartView]]; 85 | [self.barContainerView addSubview:bar]; 86 | [bar startAnimate:animation]; 87 | 88 | __weak typeof(self) weakSelf = self; 89 | bar.handleBlock = ^(XYBarView * _Nonnull view) { 90 | [weakSelf handleAnimationIfNeed:view]; 91 | }; 92 | }]; 93 | } 94 | 95 | - (void)handleAnimationIfNeed:(XYBarView *)view 96 | { 97 | [self.barContainerView bringSubviewToFront:view]; 98 | 99 | NSIndexPath *path = [NSIndexPath indexPathForRow:_row inSection:[_barContainerView.subviews indexOfObject:view]]; 100 | CAAnimation *animation = [_chartView.delegate chart:_chartView clickAnimationOfIndex:path]; 101 | [view.showLayer addAnimation:animation forKey:@"Bar_CAAnimation"]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /XYChart/model/XYChartDataSourceItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYChartDataSource.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYChartDataSourceItem.h" 10 | #import "XYChartItem.h" 11 | 12 | @interface XYChartDataSourceItem() 13 | { 14 | 15 | } 16 | 17 | @property (nonatomic, strong) NSArray >*> *dataList; 18 | 19 | @end 20 | 21 | @implementation XYChartDataSourceItem 22 | 23 | - (instancetype)initWithDataList:(NSArray >*> *)dataList 24 | { 25 | self = [super init]; 26 | if (self) { 27 | self.range = XYRangeMake(0, 100); 28 | self.numberOfLevels = 5; 29 | self.widthOfRow = 60; 30 | self.autoSizingRowWidth = YES; 31 | self.dataList = dataList; 32 | } 33 | return self; 34 | } 35 | 36 | - (instancetype)init 37 | { 38 | return [self initWithDataList:@[]]; 39 | } 40 | 41 | - (void)setDataList:(NSArray> *> *)dataList 42 | { 43 | _dataList = dataList; 44 | NSUInteger count = _dataList.firstObject.count; 45 | [dataList enumerateObjectsUsingBlock:^(NSArray> * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 46 | NSAssert(obj.count == count, @"dataList的子数组个数不一致"); 47 | }]; 48 | 49 | if (_dataList.count>0 & _dataList.firstObject.count>0) { 50 | NSArray *numbers = [_dataList xy_flatMap:^id _Nonnull(XYChartItem * _Nonnull obj) { 51 | return obj.value; 52 | }]; 53 | NSNumber * max = [numbers valueForKeyPath:@"@max.intValue"]; 54 | NSNumber * min = [numbers valueForKeyPath:@"@min.intValue"]; 55 | if (max.floatValue > min.floatValue) { 56 | CGFloat distance = (max.floatValue - min.floatValue) * 0.2; 57 | self.range = XYRangeMake(min.floatValue - distance, max.floatValue + distance); 58 | } 59 | } 60 | } 61 | 62 | #pragma mark - XYChartDataSource 63 | 64 | - (NSUInteger)numberOfSectionsInChart:(XYChart *)chart 65 | { 66 | return self.dataList.count; 67 | } 68 | 69 | - (NSUInteger)numberOfRowsInChart:(XYChart *)chart 70 | { 71 | NSArray *numers = [_dataList xy_map:^id _Nonnull(NSArray> * _Nonnull obj) { 72 | return [NSNumber numberWithInt:(int)obj.count]; 73 | }]; 74 | __block NSInteger number = 0; 75 | [numers enumerateObjectsUsingBlock:^(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 76 | if (obj.intValue > number) { 77 | number = obj.intValue; 78 | } 79 | }]; 80 | return number; 81 | } 82 | 83 | - (NSAttributedString *)chart:(XYChart *)chart titleOfRowAtIndex:(NSUInteger)index 84 | { 85 | NSArray * names = [self.dataList xy_map:^id _Nonnull(NSArray> * _Nonnull obj) { 86 | return obj.xy_safeIdx(index).value.stringValue ?: @"unkown"; 87 | }]; 88 | NSString *showName = [names componentsJoinedByString:@":"]; 89 | NSDictionary *dic = @{ 90 | NSFontAttributeName: [UIFont systemFontOfSize:10], 91 | NSForegroundColorAttributeName: [UIColor xy_separatedColor] 92 | }; 93 | return [[NSMutableAttributedString alloc] initWithString:showName attributes:dic]; 94 | } 95 | 96 | - (NSAttributedString *)chart:(XYChart *)chart titleOfSectionAtValue:(CGFloat)sectionValue 97 | { 98 | return [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%.f",sectionValue] 99 | attributes: 100 | @{ 101 | NSFontAttributeName: [UIFont systemFontOfSize:10], 102 | NSForegroundColorAttributeName: [UIColor lightGrayColor], 103 | } 104 | ]; 105 | } 106 | 107 | - (id)chart:(XYChart *)chart itemOfIndex:(NSIndexPath *)index 108 | { 109 | return self.dataList.xy_safeIdx(index.section).xy_safeIdx(index.row); 110 | } 111 | 112 | - (XYRange)visibleRangeInChart:(XYChart *)chart 113 | { 114 | return self.range; 115 | } 116 | 117 | - (NSUInteger)numberOfLevelInChart:(XYChart *)chart 118 | { 119 | return self.numberOfLevels; 120 | } 121 | 122 | - (CGFloat)rowWidthOfChart:(XYChart *)chart 123 | { 124 | return self.widthOfRow; 125 | } 126 | 127 | - (BOOL)autoSizingRowInChart:(XYChart *)chart 128 | { 129 | return self.autoSizingRowWidth; 130 | } 131 | 132 | @end 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/swift,xcode,cocoapods,objective-c 3 | # Edit at https://www.gitignore.io/?templates=swift,xcode,cocoapods,objective-c 4 | 5 | ### CocoaPods ### 6 | ## CocoaPods GitIgnore Template 7 | 8 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 9 | # - Also handy if you have a large number of dependant pods 10 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 11 | Demo/Pods/ 12 | 13 | ### Objective-C ### 14 | # Xcode 15 | # 16 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 17 | 18 | ## Build generated 19 | build/ 20 | DerivedData/ 21 | 22 | ## Various settings 23 | *.pbxuser 24 | !default.pbxuser 25 | *.mode1v3 26 | !default.mode1v3 27 | *.mode2v3 28 | !default.mode2v3 29 | *.perspectivev3 30 | !default.perspectivev3 31 | xcuserdata/ 32 | 33 | ## Other 34 | *.moved-aside 35 | *.xccheckout 36 | *.xcscmblueprint 37 | 38 | ## Obj-C/Swift specific 39 | *.hmap 40 | *.ipa 41 | *.dSYM.zip 42 | *.dSYM 43 | 44 | # CocoaPods 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # Pods/ 49 | # Add this line if you want to avoid checking in source code from the Xcode workspace 50 | # *.xcworkspace 51 | 52 | # Carthage 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots/**/*.png 67 | fastlane/test_output 68 | 69 | # Code Injection 70 | # After new code Injection tools there's a generated folder /iOSInjectionProject 71 | # https://github.com/johnno1962/injectionforxcode 72 | 73 | iOSInjectionProject/ 74 | 75 | ### Objective-C Patch ### 76 | 77 | ### Swift ### 78 | # Xcode 79 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 80 | 81 | 82 | 83 | 84 | 85 | ## Playgrounds 86 | timeline.xctimeline 87 | playground.xcworkspace 88 | 89 | # Swift Package Manager 90 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 91 | # Packages/ 92 | # Package.pins 93 | # Package.resolved 94 | .build/ 95 | 96 | # CocoaPods 97 | # We recommend against adding the Pods directory to your .gitignore. However 98 | # you should judge for yourself, the pros and cons are mentioned at: 99 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 100 | # Pods/ 101 | # Add this line if you want to avoid checking in source code from the Xcode workspace 102 | # *.xcworkspace 103 | 104 | # Carthage 105 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 106 | # Carthage/Checkouts 107 | 108 | 109 | # fastlane 110 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 111 | # screenshots whenever they are needed. 112 | # For more information about the recommended setup visit: 113 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 114 | 115 | 116 | # Code Injection 117 | # After new code Injection tools there's a generated folder /iOSInjectionProject 118 | # https://github.com/johnno1962/injectionforxcode 119 | 120 | 121 | ### Xcode ### 122 | # Xcode 123 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 124 | 125 | ## User settings 126 | 127 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 128 | 129 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 130 | 131 | ### Xcode Patch ### 132 | *.xcodeproj/* 133 | !*.xcodeproj/project.pbxproj 134 | !*.xcodeproj/xcshareddata/ 135 | !*.xcworkspace/contents.xcworkspacedata 136 | /*.gcno 137 | **/xcshareddata/WorkspaceSettings.xcsettings 138 | 139 | # End of https://www.gitignore.io/api/swift,xcode,cocoapods,objective-c -------------------------------------------------------------------------------- /XYChart/Bar/XYBarView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UUBar.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYBarView.h" 10 | 11 | 12 | @interface XYBarView () 13 | 14 | @property (nonatomic, strong) CADisplayLink *link; 15 | 16 | @end 17 | 18 | @implementation XYBarView 19 | 20 | - (void)dealloc 21 | { 22 | [_link invalidate]; 23 | } 24 | 25 | - (id)initWithFrame:(CGRect)frame 26 | { 27 | self = [super initWithFrame:frame]; 28 | if (self) { 29 | _shapeLayer = [CAShapeLayer layer]; 30 | _shapeLayer.lineCap = kCALineCapSquare; 31 | _shapeLayer.strokeEnd = 1.0; 32 | _shapeLayer.strokeColor = [UIColor whiteColor].CGColor; 33 | 34 | _showLayer = [CALayer layer]; 35 | [_showLayer addSublayer:_shapeLayer]; 36 | _showLayer.mask = _shapeLayer; 37 | [self.layer addSublayer:_showLayer]; 38 | 39 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self 40 | action:@selector(handleTap:)]; 41 | [self addGestureRecognizer:tap]; 42 | } 43 | return self; 44 | } 45 | 46 | - (void)layoutSubviews 47 | { 48 | [super layoutSubviews]; 49 | [self updateLineFrame]; 50 | } 51 | 52 | #pragma mark - private 53 | 54 | - (void)updateLineFrame 55 | { 56 | const CGSize selfSize = self.bounds.size; 57 | const CGFloat percent = (_chartItem.value.floatValue-_range.min)/((_range.max-_range.min)==0 ? 1:(_range.max-_range.min)); 58 | 59 | _showLayer.frame = CGRectMake(0, selfSize.height*(1-percent), selfSize.width, selfSize.height * percent); 60 | 61 | UIBezierPath *bezierPath = [UIBezierPath bezierPath]; 62 | [bezierPath moveToPoint:CGPointMake(xy_width(_showLayer)/2.0, xy_height(_showLayer))]; 63 | [bezierPath addLineToPoint:CGPointMake(xy_width(_showLayer)/2.0, 0)]; 64 | _shapeLayer.path = bezierPath.CGPath; 65 | _shapeLayer.lineWidth = xy_width(_showLayer); 66 | } 67 | 68 | #pragma mark - public 69 | 70 | - (void)setChartItem:(id)chartItem range:(XYRange)range 71 | { 72 | if (_chartItem.value.floatValue == chartItem.value.floatValue && (range.min == _range.min && range.max == _range.max)) { return; } 73 | _chartItem = chartItem; 74 | _range = range; 75 | _showLayer.backgroundColor = chartItem.color.CGColor; 76 | 77 | [self updateLineFrame]; 78 | } 79 | 80 | #pragma mark - animation 81 | 82 | - (void)startAnimate:(BOOL)animate 83 | { 84 | if (animate == NO) { return; } 85 | if (_shapeLayer.strokeEnd > 0 && _shapeLayer.strokeEnd < 1) { return; } 86 | 87 | _shapeLayer.strokeEnd = 0; 88 | if (_link == nil) { 89 | _link = [CADisplayLink displayLinkWithTarget:self selector:@selector(animateFlipAction)]; 90 | [_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; 91 | } 92 | } 93 | 94 | - (void)animateFlipAction 95 | { 96 | _shapeLayer.strokeEnd += 1/(60.0 * self.chartItem.duration); 97 | if (_shapeLayer.strokeEnd > 1) { 98 | [_link invalidate]; 99 | _link = nil; 100 | _shapeLayer.strokeEnd = 1; 101 | } 102 | } 103 | 104 | #pragma mark - UIMenu 105 | 106 | - (BOOL)canBecomeFirstResponder 107 | { 108 | return YES; 109 | } 110 | 111 | - (void)handleTap:(UIGestureRecognizer*)recognizer 112 | { 113 | !_handleBlock ?: _handleBlock(self); 114 | if (_chartItem.showName.length > 0) { 115 | const CGFloat percent = (_chartItem.value.floatValue-_range.min)/(_range.max-_range.min); 116 | 117 | [self becomeFirstResponder]; 118 | UIMenuController *menu = [UIMenuController sharedMenuController]; 119 | UIMenuItem *item = [[UIMenuItem alloc] initWithTitle:_chartItem.showName action:@selector(showItemName:)]; 120 | menu.menuItems = @[item]; 121 | 122 | [menu setTargetRect:CGRectMake(xy_left(self), xy_top(self)+xy_height(self)*(1-percent), xy_width(self), xy_height(self)*percent) inView:self.superview]; 123 | [menu setMenuVisible:YES animated:YES]; 124 | } 125 | } 126 | 127 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender 128 | { 129 | BOOL can = (action == @selector(showItemName:)) && sender == [UIMenuController sharedMenuController]; 130 | return can ?: [super canPerformAction:action withSender:sender]; 131 | } 132 | 133 | - (void)showItemName:(id)sender 134 | { 135 | // do nothing 136 | } 137 | 138 | @end 139 | -------------------------------------------------------------------------------- /XYChart/Line/XYLineItemView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UULineItemView.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 2018/7/21. 6 | // Copyright © 2018 uyiuyao. All rights reserved. 7 | // 8 | 9 | #import "XYLineItemView.h" 10 | #import "XYChartItem.h" 11 | 12 | @interface XYLineItemView() 13 | { 14 | CALayer *_separatedLine; 15 | } 16 | 17 | @property (nonatomic, strong) NSArray >* chartItems; 18 | @property (nonatomic) XYRange range; 19 | 20 | @property (nonatomic, strong) UILabel *nameLabel; 21 | @property (nonatomic, strong) NSMutableArray * circles; 22 | 23 | @end 24 | 25 | @implementation XYLineItemView 26 | 27 | - (instancetype)initWithFrame:(CGRect)frame 28 | { 29 | self = [super initWithFrame:frame]; 30 | if (self) { 31 | _circles = @[].mutableCopy; 32 | _nameLabel = [UILabel new]; 33 | _nameLabel.textAlignment = NSTextAlignmentCenter; 34 | [self addSubview:_nameLabel]; 35 | 36 | _separatedLine = [CALayer layer]; 37 | _separatedLine.zPosition = -100; 38 | _separatedLine.backgroundColor = [UIColor xy_separatedColor].CGColor; 39 | [self.layer addSublayer:_separatedLine]; 40 | 41 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self 42 | action:@selector(handleTap:)]; 43 | [self addGestureRecognizer:tap]; 44 | } 45 | return self; 46 | } 47 | 48 | - (void)layoutSubviews 49 | { 50 | [super layoutSubviews]; 51 | 52 | _separatedLine.frame = CGRectMake(0, 0, 1/[UIScreen mainScreen].scale, xy_height(self)-XYChartRowLabelHeight); 53 | _nameLabel.frame = CGRectMake(0, xy_height(self)-XYChartRowLabelHeight, xy_width(self), XYChartRowLabelHeight); 54 | 55 | const CGFloat circleLength = XYChartLineWidth*4; 56 | __weak typeof(self) weakSelf = self; 57 | [_circles enumerateObjectsUsingBlock:^(CALayer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 58 | CGFloat value = weakSelf.chartItems.xy_safeIdx(idx).value.floatValue; 59 | CGFloat percent = (value - weakSelf.range.min)/(weakSelf.range.max - weakSelf.range.min); 60 | obj.frame = CGRectMake((xy_width(self)-circleLength)/2.0, 61 | (xy_height(self)-XYChartRowLabelHeight)*(1-percent) - circleLength/2.0, 62 | circleLength, circleLength); 63 | }]; 64 | } 65 | 66 | - (void)setItems:(NSArray >*)items name:(NSAttributedString *)name range:(XYRange)range 67 | { 68 | [_circles makeObjectsPerformSelector:@selector(removeFromSuperlayer)]; 69 | [_circles removeAllObjects]; 70 | 71 | _chartItems = items; 72 | _range = range; 73 | _nameLabel.attributedText = name; 74 | 75 | [_chartItems enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 76 | CALayer *circle = [CALayer layer]; 77 | circle.backgroundColor = [UIColor whiteColor].CGColor; 78 | circle.cornerRadius = XYChartLineWidth*2; 79 | circle.borderColor = obj.color.CGColor; 80 | circle.borderWidth = XYChartLineWidth; 81 | [self.layer addSublayer:circle]; 82 | [self.circles addObject:circle]; 83 | }]; 84 | [self setNeedsLayout]; 85 | } 86 | 87 | - (BOOL)canBecomeFirstResponder 88 | { 89 | return YES; 90 | } 91 | 92 | - (void)handleTap:(UIGestureRecognizer*)recognizer 93 | { 94 | CGPoint touchpoint = [recognizer locationInView:self]; 95 | NSMutableArray >* inTouchItems = @[].mutableCopy; 96 | NSMutableArray * inTouchCircles = @[].mutableCopy; 97 | [_circles enumerateObjectsUsingBlock:^(CALayer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 98 | CGRect rect = obj.frame; 99 | id item = self.chartItems[idx]; 100 | if (xy_width(obj)<=30) { 101 | rect = CGRectInset(rect, xy_width(obj)-30, xy_width(obj)-30); 102 | } 103 | if (CGRectContainsPoint(rect, touchpoint) && item.showName.length>0) { 104 | [inTouchItems addObject:item]; 105 | [inTouchCircles addObject:obj]; 106 | } 107 | }]; 108 | 109 | if (inTouchItems.count > 0) { 110 | [self becomeFirstResponder]; 111 | UIMenuController *menu = [UIMenuController sharedMenuController]; 112 | NSMutableArray *menus = @[].mutableCopy; 113 | [inTouchItems enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 114 | UIMenuItem *item = [[UIMenuItem alloc] initWithTitle:obj.showName action:@selector(showItemName:)]; 115 | [menus addObject:item]; 116 | }]; 117 | menu.menuItems = menus; 118 | 119 | [menu setTargetRect:inTouchCircles.lastObject.frame inView:self]; 120 | [menu setMenuVisible:YES animated:YES]; 121 | } 122 | } 123 | 124 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender 125 | { 126 | BOOL can = (action == @selector(showItemName:)) && sender == [UIMenuController sharedMenuController]; 127 | return can ?: [super canPerformAction:action withSender:sender]; 128 | } 129 | 130 | - (void)showItemName:(id)sender 131 | { 132 | // do nothing 133 | } 134 | 135 | @end 136 | -------------------------------------------------------------------------------- /Demo/Pods/FORGestureTrackDisplay/FORGestureTrackDisplay/FORGestureTrack.m: -------------------------------------------------------------------------------- 1 | // 2 | // FORGestureTrack.m 3 | // FORGestureTrackDisplayDemo 4 | // 5 | // Created by Daniel on 31/05/2017. 6 | // Copyright © 2017 Daniel. All rights reserved. 7 | // 8 | 9 | #import "FORGestureTrack.h" 10 | #import 11 | 12 | #pragma mark - FORTrackGesture Category 13 | 14 | @interface FORTrackGesture (Private) 15 | + (FORTrackGesture *) sharedInstace; 16 | @end 17 | 18 | #pragma mark - FORGestureTrack 19 | 20 | @interface FORGestureTrack : UIView 21 | 22 | @property (nonatomic, strong) UIColor* dotColor; 23 | 24 | @property (nonatomic, assign) CGFloat dotWidth; 25 | 26 | @end 27 | 28 | @implementation FORGestureTrack{ 29 | FORTrackGesture* touchGesture; 30 | NSMutableDictionary* dots; 31 | } 32 | 33 | - (id)initWithCoder:(NSCoder *)aDecoder { 34 | if (self = [super initWithCoder:aDecoder]) { 35 | [self finishInit]; 36 | } 37 | return self; 38 | } 39 | 40 | - (id)initWithFrame:(CGRect)frame 41 | { 42 | if (self = [super initWithFrame:frame]) { 43 | [self finishInit]; 44 | } 45 | return self; 46 | } 47 | 48 | -(void)finishInit { 49 | self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 50 | touchGesture = [FORTrackGesture sharedInstace]; 51 | [touchGesture setTouchDelegate:self]; 52 | dots = [NSMutableDictionary dictionary]; 53 | self.dotWidth = 44; 54 | self.dotColor = [UIColor lightGrayColor]; 55 | self.userInteractionEnabled = YES; 56 | self.backgroundColor = [UIColor clearColor]; 57 | self.opaque = NO; 58 | } 59 | 60 | -(void)setDotColor:(UIColor *)dotColor { 61 | if(!dotColor) { 62 | dotColor = [UIColor lightGrayColor]; 63 | } 64 | _dotColor = dotColor; 65 | } 66 | 67 | -(void)updateTouch:(UITouch *)t { 68 | 69 | NSMutableSet* seenKeys = [NSMutableSet set]; 70 | CGPoint loc = [t locationInView:self]; 71 | NSNumber* key = [NSNumber numberWithUnsignedInteger:t.hash]; 72 | [seenKeys addObject:key]; 73 | 74 | UIView* dot = [dots objectForKey:key]; 75 | 76 | if(!dot){ 77 | dot = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _dotWidth, _dotWidth)]; 78 | dot.backgroundColor = _dotColor; 79 | dot.layer.cornerRadius = _dotWidth/2; 80 | dot.tag = key.unsignedIntegerValue; 81 | [self addSubview:dot]; 82 | [dots setObject:dot forKey:key]; 83 | 84 | UIView* anim = [[UIView alloc] initWithFrame:dot.frame]; 85 | anim.opaque = NO; 86 | anim.backgroundColor = [UIColor clearColor]; 87 | anim.layer.cornerRadius = _dotWidth/2; 88 | anim.layer.borderColor = _dotColor.CGColor; 89 | anim.layer.borderWidth = 3; 90 | anim.center = loc; 91 | anim.tag = NSUIntegerMax; 92 | [self addSubview:anim]; 93 | [UIView animateWithDuration:.3 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 94 | anim.transform = CGAffineTransformMakeScale(1.5, 1.5); 95 | anim.alpha = 0; 96 | } completion:^(BOOL finished){ 97 | [anim removeFromSuperview]; 98 | }]; 99 | } 100 | dot.center = loc; 101 | } 102 | 103 | -(void)removeViewFor:(UITouch *)t { 104 | NSNumber* key = [NSNumber numberWithUnsignedInteger:t.hash]; 105 | UIView* dot = [dots objectForKey:key]; 106 | [dot removeFromSuperview]; 107 | [dots removeObjectForKey:key]; 108 | } 109 | 110 | -(void)didMoveToSuperview { 111 | [touchGesture.view removeGestureRecognizer:touchGesture]; 112 | [self.superview addGestureRecognizer:touchGesture]; 113 | } 114 | 115 | -(void)forTouchesBegan:(NSSet *)touches { 116 | NSArray* siblings = self.superview.subviews; 117 | if([siblings indexOfObject:self] != [siblings count]-1){ 118 | // ensure we are the top most view 119 | [self.superview addSubview:self]; 120 | } 121 | for(UITouch* t in touches){ 122 | [self updateTouch:t]; 123 | } 124 | } 125 | 126 | -(void)forTouchesMoved:(NSSet *)touches { 127 | for(UITouch* t in touches){ 128 | [self updateTouch:t]; 129 | } 130 | } 131 | 132 | -(void)forTouchesEnded:(NSSet *)touches { 133 | for(UITouch* t in touches){ 134 | [self removeViewFor:t]; 135 | } 136 | } 137 | 138 | -(void)forTouchesCancelled:(NSSet *)touches { 139 | for(UITouch* t in touches){ 140 | [self removeViewFor:t]; 141 | } 142 | } 143 | 144 | #pragma mark - Ignore Touches 145 | 146 | -(UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event { 147 | return nil; 148 | } 149 | 150 | -(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 151 | return NO; 152 | } 153 | 154 | @end 155 | 156 | 157 | const static char * FORGestureTrackView = "FORGestureTrackView"; 158 | 159 | @implementation UIWindow (tracking) 160 | 161 | - (void)startTracking 162 | { 163 | self.for_track = [[FORGestureTrack alloc] initWithFrame:self.bounds]; 164 | self.for_track.layer.zPosition = CGFLOAT_MAX; 165 | [self addSubview:self.for_track]; 166 | } 167 | 168 | - (void)endTracking 169 | { 170 | if (self.for_track) { 171 | [self.for_track removeFromSuperview]; 172 | self.for_track = nil; 173 | } 174 | } 175 | 176 | - (void)setFor_track:(FORGestureTrack *)for_track 177 | { 178 | objc_setAssociatedObject(self, FORGestureTrackView, for_track, OBJC_ASSOCIATION_RETAIN); 179 | } 180 | 181 | - (FORGestureTrack *)for_track 182 | { 183 | id obj = objc_getAssociatedObject(self, FORGestureTrackView); 184 | if ([obj isKindOfClass:[FORGestureTrack class]]) { 185 | return (FORGestureTrack *)obj; 186 | } 187 | return nil; 188 | } 189 | 190 | @end 191 | 192 | 193 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | Version 8 | 9 | 10 | License 11 | 12 | 13 | Platform 14 | 15 | 16 | CI Status 17 | 18 |

19 | 20 |
21 | 22 | > **XYChart** is designed for line & bar of charts which can compare mutiple datas in form styles, and limited the range of values to show, and so on. 23 | 24 | | **LineChart** | **BarChart** | 25 | |:-------:|:---------:| 26 | | ![WechatIMG65](https://user-images.githubusercontent.com/9360037/62707044-4671de00-ba23-11e9-9ddc-57509edba0dc.jpeg) | ![WechatIMG66](https://user-images.githubusercontent.com/9360037/62707048-47a30b00-ba23-11e9-90a9-c414a92da2cc.jpeg) | 27 | | single datas in linechart | single datas in linechart | 28 | | ![WechatIMG70](https://user-images.githubusercontent.com/9360037/62711726-20047080-ba2c-11e9-8890-022fe4e58df9.jpeg) | ![click](https://user-images.githubusercontent.com/9360037/62712419-5ee6f600-ba2d-11e9-9605-aeaba3097e9b.gif) | 29 | | **LineDotsClicked:** show all if the dots closed in multi-datas | **BarClicked:** custom click effects in multi-datas | 30 | | ![gif](https://user-images.githubusercontent.com/9360037/62709107-54c1f900-ba27-11e9-8312-8fcec88a58d5.gif) | ![gif](https://user-images.githubusercontent.com/9360037/62709087-48d63700-ba27-11e9-86f3-e92e4e1bd094.gif) | 31 | | scrolling linechart (did set row width) | scrolling barchart (did set row width) | 32 | 33 | 34 | ## Install 35 | 36 | > required `iOS >= 8.0` with [Cocoapods](https://cocoapods.org/) 37 | > 38 | > ```ruby 39 | > pod 'XYChart' 40 | > ``` 41 | 42 | ## Usage 43 | 44 |
Expand for XYChart details 45 |
46 | 47 | ```objective-c 48 | @interface XYChart : UIView 49 | 50 | @property (nonatomic, weak, nullable) id dataSource; 51 | @property (nonatomic, weak, nullable) id delegate; 52 | 53 | @property (nonatomic, readonly) XYChartType chartType; 54 | 55 | - (instancetype)initWithFrame:(CGRect)frame type:(XYChartType)type NS_DESIGNATED_INITIALIZER; 56 | - (instancetype)initWithType:(XYChartType)type; 57 | 58 | /** 59 | 更新图标数据 60 | 61 | @param dataSource 数据 62 | @param animation 是否执行动画 63 | */ 64 | - (void)setDataSource:(id)dataSource animation:(BOOL)animation; 65 | 66 | /** 67 | 重载数据 68 | 69 | @param animation 是否执行动画 70 | */ 71 | - (void)reloadData:(BOOL)animation; 72 | 73 | @end 74 | ``` 75 | 76 |
77 | 78 | 79 | **Method 1:** 80 | [details](https://github.com/ZhipingYang/XYChart/issues/50) 81 | 82 | ```objective-c 83 | _chartView = [[XYChart alloc] initWithFrame:CGRectMake(0, 0, 300, 100) chartType:XYChartTypeLine]; 84 | _chartView.dataSource = self; 85 | _chartView.delegate = self; 86 | [self.view addSubview:_chartView]; 87 | ``` 88 | 89 | **Method 2:** 90 | 91 | ```objective-c 92 | // the obj follow the XYChartDataSource protocol 93 | _datasource = [[XYChartDataSourceItem alloc] init]; 94 | 95 | _chartView = [[XYChart alloc] initWithType:XYChartTypeLine]; 96 | _chartView.dataSource = _datasource; 97 | [self.view addSubview:_chartView]; 98 | ``` 99 | 100 | 101 |
Expand for XYChartDelegate protocol details 102 |
103 | 104 | ```objective-c 105 | @protocol XYChartDelegate 106 | @optional 107 | 108 | /** 109 | 是否展示UIMenuController 110 | */ 111 | - (BOOL)chart:(XYChart *)chart shouldShowMenu:(NSIndexPath *)index; 112 | 113 | /** 114 | 点击后的action,重载一般就不show UIMenuController了 115 | */ 116 | - (void)chart:(XYChart *)chart itemDidClick:(id)item; 117 | 118 | /** 119 | line用于展示圆圈,bar用于柱形图的动画 120 | */ 121 | - (CAAnimation *)chart:(XYChart *)chart clickAnimationOfIndex:(NSIndexPath *)index; 122 | 123 | @end 124 | ``` 125 |
126 | 127 |
Expand for XYChartDataSource protocol details 128 |
129 | 130 | ```objective-c 131 | /** 132 | 多套对比数据展示 133 | */ 134 | @protocol XYChartDataSource 135 | 136 | /** 137 | 多少条并行对比数据,折线图表现多条线,柱状图表现一列中有几条柱状图 138 | */ 139 | - (NSUInteger)numberOfSectionsInChart:(XYChart *)chart; 140 | 141 | /** 142 | 完整的周期内,数据的个数,横向列数 143 | */ 144 | - (NSUInteger)numberOfRowsInChart:(XYChart *)chart; 145 | 146 | /** 147 | x坐标的标题 148 | */ 149 | - (NSAttributedString *)chart:(XYChart *)chart titleOfRowAtIndex:(NSUInteger)index; 150 | 151 | /** 152 | x坐标的标题 153 | */ 154 | - (NSAttributedString *)chart:(XYChart *)chart titleOfSectionAtValue:(CGFloat)sectionValue; 155 | 156 | /** 157 | index下的数据模型 158 | */ 159 | - (id)chart:(XYChart *)chart itemOfIndex:(NSIndexPath *)index; 160 | 161 | /** 162 | 标记y轴方向高亮区间 163 | */ 164 | - (XYRange)visibleRangeInChart:(XYChart *)chart; 165 | 166 | /** 167 | y轴方向分段,5就分5段 168 | */ 169 | - (NSUInteger)numberOfLevelInChart:(XYChart *)chart; 170 | 171 | /** 172 | 横向一栏的宽度 173 | */ 174 | - (CGFloat)rowWidthOfChart:(XYChart *)chart; 175 | 176 | /** 177 | 自适应平均分横向栏目的宽度 178 | */ 179 | - (BOOL)autoSizingRowInChart:(XYChart *)chart; 180 | 181 | @end 182 | ``` 183 |
184 | 185 | 186 | 187 | ## Author 188 | 189 | XcodeYang, xcodeyang@gmail.com 190 | 191 | ## License 192 | 193 | XYChart is available under the MIT license. See the LICENSE file for more info. 194 | -------------------------------------------------------------------------------- /XYChart/XYChart.m: -------------------------------------------------------------------------------- 1 | // 2 | // XYChart.m 3 | // XYChart 4 | // 5 | // Created by Daniel on 14-7-24. 6 | // Copyright (c) 2014年 uyiuyao. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #import "XYChart.h" 12 | #import "XYLineChart.h" 13 | #import "XYBarChart.h" 14 | 15 | @interface XYChart () 16 | { 17 | CALayer *_leftSeparatedLine; 18 | CALayer *_rightSeparatedLine; 19 | NSMutableArray *_horizonLines; 20 | } 21 | 22 | @property (nonatomic, strong) UIView *chartContainer; 23 | 24 | @property (nonatomic) XYChartType type; 25 | 26 | @property (nonatomic, strong) NSMutableArray * sectionLabels; 27 | 28 | @end 29 | 30 | @implementation XYChart 31 | 32 | - (id)initWithFrame:(CGRect)frame type:(XYChartType)type 33 | { 34 | self = [super initWithFrame:frame]; 35 | if (self) { 36 | self.sectionLabels = @[].mutableCopy; 37 | _horizonLines = @[].mutableCopy; 38 | _type = type; 39 | [self setUpChartElements]; 40 | } 41 | return self; 42 | } 43 | 44 | - (instancetype)initWithType:(XYChartType)type 45 | { 46 | return [self initWithFrame:CGRectZero type:type]; 47 | } 48 | 49 | - (instancetype)initWithCoder:(NSCoder *)aDecoder 50 | { 51 | return [self initWithFrame:CGRectZero type:XYChartTypeLine]; 52 | } 53 | 54 | - (instancetype)initWithFrame:(CGRect)frame 55 | { 56 | return [self initWithFrame:frame type:XYChartTypeLine]; 57 | } 58 | 59 | - (void)setUpChartElements 60 | { 61 | if (!_leftSeparatedLine) { 62 | _leftSeparatedLine = [CALayer layer]; 63 | _leftSeparatedLine.backgroundColor = [UIColor xy_separatedColor].CGColor; 64 | _leftSeparatedLine.zPosition = -1; 65 | [self.layer addSublayer:_leftSeparatedLine]; 66 | } 67 | if (!_rightSeparatedLine) { 68 | _rightSeparatedLine = [CALayer layer]; 69 | _rightSeparatedLine.backgroundColor = [UIColor xy_separatedColor].CGColor; 70 | _rightSeparatedLine.zPosition = -1; 71 | [self.layer addSublayer:_rightSeparatedLine]; 72 | } 73 | 74 | if (_type == XYChartTypeLine) { 75 | _chartContainer = [[XYLineChart alloc] initWithChartView:self]; 76 | } else if (_type == XYChartTypeBar) { 77 | _chartContainer = [[XYBarChart alloc] initWithChartView:self]; 78 | } 79 | [self addSubview:_chartContainer]; 80 | } 81 | 82 | - (void)layoutSubviews 83 | { 84 | [super layoutSubviews]; 85 | 86 | const CGSize size = self.bounds.size; 87 | 88 | CGFloat labelHeight = (size.height-XYChartRowLabelHeight)/(_sectionLabels.count>1 ? _sectionLabels.count-1 : 1); 89 | 90 | [_sectionLabels enumerateObjectsUsingBlock:^(UILabel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 91 | obj.frame = CGRectMake(0, labelHeight*(idx-0.5), XYChartSectionLabelWidth-4, labelHeight); 92 | }]; 93 | 94 | _chartContainer.frame = CGRectMake(XYChartSectionLabelWidth, 0, size.width-XYChartSectionLabelWidth, size.height); 95 | [_chartContainer setNeedsLayout]; 96 | [self justLinesLayout]; 97 | } 98 | 99 | #pragma mark - public 100 | 101 | - (void)setDataSource:(id)dataSource 102 | { 103 | [self setDataSource:dataSource animation:NO]; 104 | } 105 | 106 | - (void)setDataSource:(id)dataSource animation:(BOOL)animation 107 | { 108 | _dataSource = dataSource; 109 | 110 | // 容器 111 | _chartContainer.frame = CGRectMake(XYChartSectionLabelWidth, 0, xy_width(self)-XYChartSectionLabelWidth, xy_height(self)); 112 | [_chartContainer reloadData:animation]; 113 | 114 | [self resetSectionLabels]; 115 | [self resetHorizonLines]; 116 | [self setNeedsLayout]; 117 | } 118 | 119 | #pragma mark - private 120 | 121 | - (void)justLinesLayout 122 | { 123 | const CGFloat pixel = 1/[UIScreen mainScreen].scale; 124 | const CGSize size = self.bounds.size; 125 | const NSUInteger levels = [_dataSource numberOfLevelInChart:self]; 126 | CGFloat count = levels>0 ? levels : 1; 127 | const CGFloat sectionHeight = (size.height-XYChartRowLabelHeight)/count; 128 | _leftSeparatedLine.frame = CGRectMake(XYChartSectionLabelWidth, 0, pixel, size.height-XYChartRowLabelHeight); 129 | _rightSeparatedLine.frame = CGRectMake(size.width-pixel, 0, pixel, size.height-XYChartRowLabelHeight); 130 | [_horizonLines enumerateObjectsUsingBlock:^(CALayer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 131 | obj.frame = CGRectMake(XYChartSectionLabelWidth, sectionHeight * idx, size.width-XYChartSectionLabelWidth, pixel); 132 | }]; 133 | } 134 | 135 | - (void)resetSectionLabels 136 | { 137 | [_sectionLabels makeObjectsPerformSelector:@selector(removeFromSuperview)]; 138 | [_sectionLabels removeAllObjects]; 139 | 140 | const NSUInteger levels = [_dataSource numberOfLevelInChart:self]; 141 | const XYRange range = [_dataSource visibleRangeInChart:self]; 142 | const CGFloat sectionValue = (range.max-range.min)/(CGFloat)levels; 143 | 144 | for (NSUInteger i=0; i *)_dataSource respondsToSelector:@selector(chart:titleOfSectionAtValue:)]) { 150 | label.attributedText = [_dataSource chart:self titleOfSectionAtValue:value]; 151 | } else { 152 | label.font = [UIFont systemFontOfSize:11]; 153 | label.textColor = [UIColor lightGrayColor]; 154 | label.text = [NSString stringWithFormat:@"%.f",range.max - sectionValue*i]; 155 | } 156 | [self addSubview:label]; 157 | [_sectionLabels addObject:label]; 158 | } 159 | } 160 | 161 | - (void)resetHorizonLines 162 | { 163 | [_horizonLines makeObjectsPerformSelector:@selector(removeFromSuperlayer)]; 164 | [_horizonLines removeAllObjects]; 165 | 166 | for (int i=0; i<[_dataSource numberOfLevelInChart:self]+1; i++) { 167 | CALayer *hori = [CALayer layer]; 168 | hori.backgroundColor = [UIColor xy_separatedColor].CGColor; 169 | hori.zPosition = -1; 170 | [self.layer addSublayer:hori]; 171 | [_horizonLines addObject:hori]; 172 | } 173 | [self justLinesLayout]; 174 | } 175 | 176 | #pragma mark - XYChartReload 177 | 178 | - (void)reloadData:(BOOL)animation 179 | { 180 | [self setDataSource:_dataSource animation:animation]; 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /Demo/XYChart/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChart/Pods-XYChart-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FORGestureTrackDisplay 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Zhiping Yang 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | ## XYChart 30 | 31 | Apache License 32 | Version 2.0, January 2004 33 | http://www.apache.org/licenses/ 34 | 35 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 36 | 37 | 1. Definitions. 38 | 39 | "License" shall mean the terms and conditions for use, reproduction, 40 | and distribution as defined by Sections 1 through 9 of this document. 41 | 42 | "Licensor" shall mean the copyright owner or entity authorized by 43 | the copyright owner that is granting the License. 44 | 45 | "Legal Entity" shall mean the union of the acting entity and all 46 | other entities that control, are controlled by, or are under common 47 | control with that entity. For the purposes of this definition, 48 | "control" means (i) the power, direct or indirect, to cause the 49 | direction or management of such entity, whether by contract or 50 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 51 | outstanding shares, or (iii) beneficial ownership of such entity. 52 | 53 | "You" (or "Your") shall mean an individual or Legal Entity 54 | exercising permissions granted by this License. 55 | 56 | "Source" form shall mean the preferred form for making modifications, 57 | including but not limited to software source code, documentation 58 | source, and configuration files. 59 | 60 | "Object" form shall mean any form resulting from mechanical 61 | transformation or translation of a Source form, including but 62 | not limited to compiled object code, generated documentation, 63 | and conversions to other media types. 64 | 65 | "Work" shall mean the work of authorship, whether in Source or 66 | Object form, made available under the License, as indicated by a 67 | copyright notice that is included in or attached to the work 68 | (an example is provided in the Appendix below). 69 | 70 | "Derivative Works" shall mean any work, whether in Source or Object 71 | form, that is based on (or derived from) the Work and for which the 72 | editorial revisions, annotations, elaborations, or other modifications 73 | represent, as a whole, an original work of authorship. For the purposes 74 | of this License, Derivative Works shall not include works that remain 75 | separable from, or merely link (or bind by name) to the interfaces of, 76 | the Work and Derivative Works thereof. 77 | 78 | "Contribution" shall mean any work of authorship, including 79 | the original version of the Work and any modifications or additions 80 | to that Work or Derivative Works thereof, that is intentionally 81 | submitted to Licensor for inclusion in the Work by the copyright owner 82 | or by an individual or Legal Entity authorized to submit on behalf of 83 | the copyright owner. For the purposes of this definition, "submitted" 84 | means any form of electronic, verbal, or written communication sent 85 | to the Licensor or its representatives, including but not limited to 86 | communication on electronic mailing lists, source code control systems, 87 | and issue tracking systems that are managed by, or on behalf of, the 88 | Licensor for the purpose of discussing and improving the Work, but 89 | excluding communication that is conspicuously marked or otherwise 90 | designated in writing by the copyright owner as "Not a Contribution." 91 | 92 | "Contributor" shall mean Licensor and any individual or Legal Entity 93 | on behalf of whom a Contribution has been received by Licensor and 94 | subsequently incorporated within the Work. 95 | 96 | 2. Grant of Copyright License. Subject to the terms and conditions of 97 | this License, each Contributor hereby grants to You a perpetual, 98 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 99 | copyright license to reproduce, prepare Derivative Works of, 100 | publicly display, publicly perform, sublicense, and distribute the 101 | Work and such Derivative Works in Source or Object form. 102 | 103 | 3. Grant of Patent License. Subject to the terms and conditions of 104 | this License, each Contributor hereby grants to You a perpetual, 105 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 106 | (except as stated in this section) patent license to make, have made, 107 | use, offer to sell, sell, import, and otherwise transfer the Work, 108 | where such license applies only to those patent claims licensable 109 | by such Contributor that are necessarily infringed by their 110 | Contribution(s) alone or by combination of their Contribution(s) 111 | with the Work to which such Contribution(s) was submitted. If You 112 | institute patent litigation against any entity (including a 113 | cross-claim or counterclaim in a lawsuit) alleging that the Work 114 | or a Contribution incorporated within the Work constitutes direct 115 | or contributory patent infringement, then any patent licenses 116 | granted to You under this License for that Work shall terminate 117 | as of the date such litigation is filed. 118 | 119 | 4. Redistribution. You may reproduce and distribute copies of the 120 | Work or Derivative Works thereof in any medium, with or without 121 | modifications, and in Source or Object form, provided that You 122 | meet the following conditions: 123 | 124 | (a) You must give any other recipients of the Work or 125 | Derivative Works a copy of this License; and 126 | 127 | (b) You must cause any modified files to carry prominent notices 128 | stating that You changed the files; and 129 | 130 | (c) You must retain, in the Source form of any Derivative Works 131 | that You distribute, all copyright, patent, trademark, and 132 | attribution notices from the Source form of the Work, 133 | excluding those notices that do not pertain to any part of 134 | the Derivative Works; and 135 | 136 | (d) If the Work includes a "NOTICE" text file as part of its 137 | distribution, then any Derivative Works that You distribute must 138 | include a readable copy of the attribution notices contained 139 | within such NOTICE file, excluding those notices that do not 140 | pertain to any part of the Derivative Works, in at least one 141 | of the following places: within a NOTICE text file distributed 142 | as part of the Derivative Works; within the Source form or 143 | documentation, if provided along with the Derivative Works; or, 144 | within a display generated by the Derivative Works, if and 145 | wherever such third-party notices normally appear. The contents 146 | of the NOTICE file are for informational purposes only and 147 | do not modify the License. You may add Your own attribution 148 | notices within Derivative Works that You distribute, alongside 149 | or as an addendum to the NOTICE text from the Work, provided 150 | that such additional attribution notices cannot be construed 151 | as modifying the License. 152 | 153 | You may add Your own copyright statement to Your modifications and 154 | may provide additional or different license terms and conditions 155 | for use, reproduction, or distribution of Your modifications, or 156 | for any such Derivative Works as a whole, provided Your use, 157 | reproduction, and distribution of the Work otherwise complies with 158 | the conditions stated in this License. 159 | 160 | 5. Submission of Contributions. Unless You explicitly state otherwise, 161 | any Contribution intentionally submitted for inclusion in the Work 162 | by You to the Licensor shall be under the terms and conditions of 163 | this License, without any additional terms or conditions. 164 | Notwithstanding the above, nothing herein shall supersede or modify 165 | the terms of any separate license agreement you may have executed 166 | with Licensor regarding such Contributions. 167 | 168 | 6. Trademarks. This License does not grant permission to use the trade 169 | names, trademarks, service marks, or product names of the Licensor, 170 | except as required for reasonable and customary use in describing the 171 | origin of the Work and reproducing the content of the NOTICE file. 172 | 173 | 7. Disclaimer of Warranty. Unless required by applicable law or 174 | agreed to in writing, Licensor provides the Work (and each 175 | Contributor provides its Contributions) on an "AS IS" BASIS, 176 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 177 | implied, including, without limitation, any warranties or conditions 178 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 179 | PARTICULAR PURPOSE. You are solely responsible for determining the 180 | appropriateness of using or redistributing the Work and assume any 181 | risks associated with Your exercise of permissions under this License. 182 | 183 | 8. Limitation of Liability. In no event and under no legal theory, 184 | whether in tort (including negligence), contract, or otherwise, 185 | unless required by applicable law (such as deliberate and grossly 186 | negligent acts) or agreed to in writing, shall any Contributor be 187 | liable to You for damages, including any direct, indirect, special, 188 | incidental, or consequential damages of any character arising as a 189 | result of this License or out of the use or inability to use the 190 | Work (including but not limited to damages for loss of goodwill, 191 | work stoppage, computer failure or malfunction, or any and all 192 | other commercial damages or losses), even if such Contributor 193 | has been advised of the possibility of such damages. 194 | 195 | 9. Accepting Warranty or Additional Liability. While redistributing 196 | the Work or Derivative Works thereof, You may choose to offer, 197 | and charge a fee for, acceptance of support, warranty, indemnity, 198 | or other liability obligations and/or rights consistent with this 199 | License. However, in accepting such obligations, You may act only 200 | on Your own behalf and on Your sole responsibility, not on behalf 201 | of any other Contributor, and only if You agree to indemnify, 202 | defend, and hold each Contributor harmless for any liability 203 | incurred by, or claims asserted against, such Contributor by reason 204 | of your accepting any such warranty or additional liability. 205 | 206 | END OF TERMS AND CONDITIONS 207 | 208 | APPENDIX: How to apply the Apache License to your work. 209 | 210 | To apply the Apache License to your work, attach the following 211 | boilerplate notice, with the fields enclosed by brackets "{}" 212 | replaced with your own identifying information. (Don't include 213 | the brackets!) The text should be enclosed in the appropriate 214 | comment syntax for the file format. We also recommend that a 215 | file or class name and description of purpose be included on the 216 | same "printed page" as the copyright notice for easier 217 | identification within third-party archives. 218 | 219 | Copyright {yyyy} {name of copyright owner} 220 | 221 | Licensed under the Apache License, Version 2.0 (the "License"); 222 | you may not use this file except in compliance with the License. 223 | You may obtain a copy of the License at 224 | 225 | http://www.apache.org/licenses/LICENSE-2.0 226 | 227 | Unless required by applicable law or agreed to in writing, software 228 | distributed under the License is distributed on an "AS IS" BASIS, 229 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 230 | See the License for the specific language governing permissions and 231 | limitations under the License. 232 | 233 | 234 | Generated by CocoaPods - https://cocoapods.org 235 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-XYChart/Pods-XYChart-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2017 Zhiping Yang 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | FORGestureTrackDisplay 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Apache License 49 | Version 2.0, January 2004 50 | http://www.apache.org/licenses/ 51 | 52 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 53 | 54 | 1. Definitions. 55 | 56 | "License" shall mean the terms and conditions for use, reproduction, 57 | and distribution as defined by Sections 1 through 9 of this document. 58 | 59 | "Licensor" shall mean the copyright owner or entity authorized by 60 | the copyright owner that is granting the License. 61 | 62 | "Legal Entity" shall mean the union of the acting entity and all 63 | other entities that control, are controlled by, or are under common 64 | control with that entity. For the purposes of this definition, 65 | "control" means (i) the power, direct or indirect, to cause the 66 | direction or management of such entity, whether by contract or 67 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 68 | outstanding shares, or (iii) beneficial ownership of such entity. 69 | 70 | "You" (or "Your") shall mean an individual or Legal Entity 71 | exercising permissions granted by this License. 72 | 73 | "Source" form shall mean the preferred form for making modifications, 74 | including but not limited to software source code, documentation 75 | source, and configuration files. 76 | 77 | "Object" form shall mean any form resulting from mechanical 78 | transformation or translation of a Source form, including but 79 | not limited to compiled object code, generated documentation, 80 | and conversions to other media types. 81 | 82 | "Work" shall mean the work of authorship, whether in Source or 83 | Object form, made available under the License, as indicated by a 84 | copyright notice that is included in or attached to the work 85 | (an example is provided in the Appendix below). 86 | 87 | "Derivative Works" shall mean any work, whether in Source or Object 88 | form, that is based on (or derived from) the Work and for which the 89 | editorial revisions, annotations, elaborations, or other modifications 90 | represent, as a whole, an original work of authorship. For the purposes 91 | of this License, Derivative Works shall not include works that remain 92 | separable from, or merely link (or bind by name) to the interfaces of, 93 | the Work and Derivative Works thereof. 94 | 95 | "Contribution" shall mean any work of authorship, including 96 | the original version of the Work and any modifications or additions 97 | to that Work or Derivative Works thereof, that is intentionally 98 | submitted to Licensor for inclusion in the Work by the copyright owner 99 | or by an individual or Legal Entity authorized to submit on behalf of 100 | the copyright owner. For the purposes of this definition, "submitted" 101 | means any form of electronic, verbal, or written communication sent 102 | to the Licensor or its representatives, including but not limited to 103 | communication on electronic mailing lists, source code control systems, 104 | and issue tracking systems that are managed by, or on behalf of, the 105 | Licensor for the purpose of discussing and improving the Work, but 106 | excluding communication that is conspicuously marked or otherwise 107 | designated in writing by the copyright owner as "Not a Contribution." 108 | 109 | "Contributor" shall mean Licensor and any individual or Legal Entity 110 | on behalf of whom a Contribution has been received by Licensor and 111 | subsequently incorporated within the Work. 112 | 113 | 2. Grant of Copyright License. Subject to the terms and conditions of 114 | this License, each Contributor hereby grants to You a perpetual, 115 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 116 | copyright license to reproduce, prepare Derivative Works of, 117 | publicly display, publicly perform, sublicense, and distribute the 118 | Work and such Derivative Works in Source or Object form. 119 | 120 | 3. Grant of Patent License. Subject to the terms and conditions of 121 | this License, each Contributor hereby grants to You a perpetual, 122 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 123 | (except as stated in this section) patent license to make, have made, 124 | use, offer to sell, sell, import, and otherwise transfer the Work, 125 | where such license applies only to those patent claims licensable 126 | by such Contributor that are necessarily infringed by their 127 | Contribution(s) alone or by combination of their Contribution(s) 128 | with the Work to which such Contribution(s) was submitted. If You 129 | institute patent litigation against any entity (including a 130 | cross-claim or counterclaim in a lawsuit) alleging that the Work 131 | or a Contribution incorporated within the Work constitutes direct 132 | or contributory patent infringement, then any patent licenses 133 | granted to You under this License for that Work shall terminate 134 | as of the date such litigation is filed. 135 | 136 | 4. Redistribution. You may reproduce and distribute copies of the 137 | Work or Derivative Works thereof in any medium, with or without 138 | modifications, and in Source or Object form, provided that You 139 | meet the following conditions: 140 | 141 | (a) You must give any other recipients of the Work or 142 | Derivative Works a copy of this License; and 143 | 144 | (b) You must cause any modified files to carry prominent notices 145 | stating that You changed the files; and 146 | 147 | (c) You must retain, in the Source form of any Derivative Works 148 | that You distribute, all copyright, patent, trademark, and 149 | attribution notices from the Source form of the Work, 150 | excluding those notices that do not pertain to any part of 151 | the Derivative Works; and 152 | 153 | (d) If the Work includes a "NOTICE" text file as part of its 154 | distribution, then any Derivative Works that You distribute must 155 | include a readable copy of the attribution notices contained 156 | within such NOTICE file, excluding those notices that do not 157 | pertain to any part of the Derivative Works, in at least one 158 | of the following places: within a NOTICE text file distributed 159 | as part of the Derivative Works; within the Source form or 160 | documentation, if provided along with the Derivative Works; or, 161 | within a display generated by the Derivative Works, if and 162 | wherever such third-party notices normally appear. The contents 163 | of the NOTICE file are for informational purposes only and 164 | do not modify the License. You may add Your own attribution 165 | notices within Derivative Works that You distribute, alongside 166 | or as an addendum to the NOTICE text from the Work, provided 167 | that such additional attribution notices cannot be construed 168 | as modifying the License. 169 | 170 | You may add Your own copyright statement to Your modifications and 171 | may provide additional or different license terms and conditions 172 | for use, reproduction, or distribution of Your modifications, or 173 | for any such Derivative Works as a whole, provided Your use, 174 | reproduction, and distribution of the Work otherwise complies with 175 | the conditions stated in this License. 176 | 177 | 5. Submission of Contributions. Unless You explicitly state otherwise, 178 | any Contribution intentionally submitted for inclusion in the Work 179 | by You to the Licensor shall be under the terms and conditions of 180 | this License, without any additional terms or conditions. 181 | Notwithstanding the above, nothing herein shall supersede or modify 182 | the terms of any separate license agreement you may have executed 183 | with Licensor regarding such Contributions. 184 | 185 | 6. Trademarks. This License does not grant permission to use the trade 186 | names, trademarks, service marks, or product names of the Licensor, 187 | except as required for reasonable and customary use in describing the 188 | origin of the Work and reproducing the content of the NOTICE file. 189 | 190 | 7. Disclaimer of Warranty. Unless required by applicable law or 191 | agreed to in writing, Licensor provides the Work (and each 192 | Contributor provides its Contributions) on an "AS IS" BASIS, 193 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 194 | implied, including, without limitation, any warranties or conditions 195 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 196 | PARTICULAR PURPOSE. You are solely responsible for determining the 197 | appropriateness of using or redistributing the Work and assume any 198 | risks associated with Your exercise of permissions under this License. 199 | 200 | 8. Limitation of Liability. In no event and under no legal theory, 201 | whether in tort (including negligence), contract, or otherwise, 202 | unless required by applicable law (such as deliberate and grossly 203 | negligent acts) or agreed to in writing, shall any Contributor be 204 | liable to You for damages, including any direct, indirect, special, 205 | incidental, or consequential damages of any character arising as a 206 | result of this License or out of the use or inability to use the 207 | Work (including but not limited to damages for loss of goodwill, 208 | work stoppage, computer failure or malfunction, or any and all 209 | other commercial damages or losses), even if such Contributor 210 | has been advised of the possibility of such damages. 211 | 212 | 9. Accepting Warranty or Additional Liability. While redistributing 213 | the Work or Derivative Works thereof, You may choose to offer, 214 | and charge a fee for, acceptance of support, warranty, indemnity, 215 | or other liability obligations and/or rights consistent with this 216 | License. However, in accepting such obligations, You may act only 217 | on Your own behalf and on Your sole responsibility, not on behalf 218 | of any other Contributor, and only if You agree to indemnify, 219 | defend, and hold each Contributor harmless for any liability 220 | incurred by, or claims asserted against, such Contributor by reason 221 | of your accepting any such warranty or additional liability. 222 | 223 | END OF TERMS AND CONDITIONS 224 | 225 | APPENDIX: How to apply the Apache License to your work. 226 | 227 | To apply the Apache License to your work, attach the following 228 | boilerplate notice, with the fields enclosed by brackets "{}" 229 | replaced with your own identifying information. (Don't include 230 | the brackets!) The text should be enclosed in the appropriate 231 | comment syntax for the file format. We also recommend that a 232 | file or class name and description of purpose be included on the 233 | same "printed page" as the copyright notice for easier 234 | identification within third-party archives. 235 | 236 | Copyright {yyyy} {name of copyright owner} 237 | 238 | Licensed under the Apache License, Version 2.0 (the "License"); 239 | you may not use this file except in compliance with the License. 240 | You may obtain a copy of the License at 241 | 242 | http://www.apache.org/licenses/LICENSE-2.0 243 | 244 | Unless required by applicable law or agreed to in writing, software 245 | distributed under the License is distributed on an "AS IS" BASIS, 246 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 247 | See the License for the specific language governing permissions and 248 | limitations under the License. 249 | 250 | 251 | License 252 | MIT 253 | Title 254 | XYChart 255 | Type 256 | PSGroupSpecifier 257 | 258 | 259 | FooterText 260 | Generated by CocoaPods - https://cocoapods.org 261 | Title 262 | 263 | Type 264 | PSGroupSpecifier 265 | 266 | 267 | StringsTable 268 | Acknowledgements 269 | Title 270 | Acknowledgements 271 | 272 | 273 | -------------------------------------------------------------------------------- /Demo/XYChart.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6246DC9A53E3F120277B37A2 /* libPods-XYChartUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C99176A3B6C3E56762496340 /* libPods-XYChartUITests.a */; }; 11 | 65CB0EC92104416A0065236D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0EC82104416A0065236D /* AppDelegate.m */; }; 12 | 65CB0ECC2104416A0065236D /* BarTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0ECB2104416A0065236D /* BarTableViewController.m */; }; 13 | 65CB0ECF2104416A0065236D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65CB0ECD2104416A0065236D /* Main.storyboard */; }; 14 | 65CB0ED12104416B0065236D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 65CB0ED02104416B0065236D /* Assets.xcassets */; }; 15 | 65CB0ED42104416B0065236D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65CB0ED22104416B0065236D /* LaunchScreen.storyboard */; }; 16 | 65CB0ED72104416B0065236D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0ED62104416B0065236D /* main.m */; }; 17 | 65CB0EE12104416B0065236D /* XYChartTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0EE02104416B0065236D /* XYChartTests.m */; }; 18 | 65CB0EEC2104416B0065236D /* XYChartUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0EEB2104416B0065236D /* XYChartUITests.m */; }; 19 | 65CB0F26210443A80065236D /* LineTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0F25210443A80065236D /* LineTableViewController.m */; }; 20 | 65CB0F2C21044B7A0065236D /* ChartViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CB0F2B21044B7A0065236D /* ChartViewCell.m */; }; 21 | 65E9A36F2104541F00277206 /* RandomChartDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 65E9A36E2104541F00277206 /* RandomChartDataSource.m */; }; 22 | 76F18BE624E6A6ACF3160BB7 /* libPods-XYChart.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BBB216DD8F1FF4643902D69 /* libPods-XYChart.a */; }; 23 | DBBA7ED522C3E7540062EC7F /* XYChart.podspec in Resources */ = {isa = PBXBuildFile; fileRef = DBBA7ED122C3E7540062EC7F /* XYChart.podspec */; }; 24 | DBBA7ED622C3E7540062EC7F /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = DBBA7ED222C3E7540062EC7F /* LICENSE */; }; 25 | DBBA7ED722C3E7540062EC7F /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DBBA7ED322C3E7540062EC7F /* README.md */; }; 26 | DBBA7ED822C3E7540062EC7F /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = DBBA7ED422C3E7540062EC7F /* .travis.yml */; }; 27 | F42CEC4A4688F402225CE643 /* libPods-XYChartTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C774217CD033256611AE05D3 /* libPods-XYChartTests.a */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 65CB0EDD2104416B0065236D /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 65CB0EBC2104416A0065236D /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 65CB0EC32104416A0065236D; 36 | remoteInfo = XYChart; 37 | }; 38 | 65CB0EE82104416B0065236D /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 65CB0EBC2104416A0065236D /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 65CB0EC32104416A0065236D; 43 | remoteInfo = XYChart; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 347F558E0B1F63B14CA2E9DA /* Pods-XYChartUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChartUITests.release.xcconfig"; path = "Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests.release.xcconfig"; sourceTree = ""; }; 49 | 4631504D8C3A879BA79CB68F /* Pods-XYChart.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChart.release.xcconfig"; path = "Target Support Files/Pods-XYChart/Pods-XYChart.release.xcconfig"; sourceTree = ""; }; 50 | 65CB0EC42104416A0065236D /* XYChart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XYChart.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 65CB0EC72104416A0065236D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 52 | 65CB0EC82104416A0065236D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 53 | 65CB0ECA2104416A0065236D /* BarTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BarTableViewController.h; sourceTree = ""; }; 54 | 65CB0ECB2104416A0065236D /* BarTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BarTableViewController.m; sourceTree = ""; }; 55 | 65CB0ECE2104416A0065236D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 65CB0ED02104416B0065236D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 65CB0ED32104416B0065236D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 65CB0ED52104416B0065236D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 65CB0ED62104416B0065236D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 60 | 65CB0EDC2104416B0065236D /* XYChartTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XYChartTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 65CB0EE02104416B0065236D /* XYChartTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XYChartTests.m; sourceTree = ""; }; 62 | 65CB0EE22104416B0065236D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | 65CB0EE72104416B0065236D /* XYChartUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XYChartUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | 65CB0EEB2104416B0065236D /* XYChartUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XYChartUITests.m; sourceTree = ""; }; 65 | 65CB0EED2104416B0065236D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 65CB0F24210443A80065236D /* LineTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LineTableViewController.h; sourceTree = ""; }; 67 | 65CB0F25210443A80065236D /* LineTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LineTableViewController.m; sourceTree = ""; }; 68 | 65CB0F2A21044B790065236D /* ChartViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChartViewCell.h; sourceTree = ""; }; 69 | 65CB0F2B21044B7A0065236D /* ChartViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChartViewCell.m; sourceTree = ""; }; 70 | 65E9A36D2104541F00277206 /* RandomChartDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RandomChartDataSource.h; sourceTree = ""; }; 71 | 65E9A36E2104541F00277206 /* RandomChartDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RandomChartDataSource.m; sourceTree = ""; }; 72 | 756382B9108270A2738D435B /* Pods-XYChartTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChartTests.debug.xcconfig"; path = "Target Support Files/Pods-XYChartTests/Pods-XYChartTests.debug.xcconfig"; sourceTree = ""; }; 73 | 9471408379734E056B32DB45 /* Pods-XYChartUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChartUITests.debug.xcconfig"; path = "Target Support Files/Pods-XYChartUITests/Pods-XYChartUITests.debug.xcconfig"; sourceTree = ""; }; 74 | 9BBB216DD8F1FF4643902D69 /* libPods-XYChart.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XYChart.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | BEC88D6770F530436456A215 /* Pods-XYChart.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChart.debug.xcconfig"; path = "Target Support Files/Pods-XYChart/Pods-XYChart.debug.xcconfig"; sourceTree = ""; }; 76 | C774217CD033256611AE05D3 /* libPods-XYChartTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XYChartTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | C99176A3B6C3E56762496340 /* libPods-XYChartUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XYChartUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | DBBA7ED122C3E7540062EC7F /* XYChart.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; name = XYChart.podspec; path = ../XYChart.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 79 | DBBA7ED222C3E7540062EC7F /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 80 | DBBA7ED322C3E7540062EC7F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 81 | DBBA7ED422C3E7540062EC7F /* .travis.yml */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; name = .travis.yml; path = ../.travis.yml; sourceTree = ""; }; 82 | F7C76DE31496D921F91576E7 /* Pods-XYChartTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XYChartTests.release.xcconfig"; path = "Target Support Files/Pods-XYChartTests/Pods-XYChartTests.release.xcconfig"; sourceTree = ""; }; 83 | /* End PBXFileReference section */ 84 | 85 | /* Begin PBXFrameworksBuildPhase section */ 86 | 65CB0EC12104416A0065236D /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | 76F18BE624E6A6ACF3160BB7 /* libPods-XYChart.a in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | 65CB0ED92104416B0065236D /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | F42CEC4A4688F402225CE643 /* libPods-XYChartTests.a in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | 65CB0EE42104416B0065236D /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | 6246DC9A53E3F120277B37A2 /* libPods-XYChartUITests.a in Frameworks */, 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXFrameworksBuildPhase section */ 111 | 112 | /* Begin PBXGroup section */ 113 | 61C04307A20851A1F4D37DCB /* Frameworks */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 9BBB216DD8F1FF4643902D69 /* libPods-XYChart.a */, 117 | C774217CD033256611AE05D3 /* libPods-XYChartTests.a */, 118 | C99176A3B6C3E56762496340 /* libPods-XYChartUITests.a */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | 65CB0EBB2104416A0065236D = { 124 | isa = PBXGroup; 125 | children = ( 126 | DBBA7ED422C3E7540062EC7F /* .travis.yml */, 127 | DBBA7ED222C3E7540062EC7F /* LICENSE */, 128 | DBBA7ED322C3E7540062EC7F /* README.md */, 129 | DBBA7ED122C3E7540062EC7F /* XYChart.podspec */, 130 | 65CB0EC62104416A0065236D /* XYChart */, 131 | 65CB0EDF2104416B0065236D /* XYChartTests */, 132 | 65CB0EEA2104416B0065236D /* XYChartUITests */, 133 | 65CB0EC52104416A0065236D /* Products */, 134 | 7C8D71D8A37484F78BF5A4D7 /* Pods */, 135 | 61C04307A20851A1F4D37DCB /* Frameworks */, 136 | ); 137 | sourceTree = ""; 138 | }; 139 | 65CB0EC52104416A0065236D /* Products */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 65CB0EC42104416A0065236D /* XYChart.app */, 143 | 65CB0EDC2104416B0065236D /* XYChartTests.xctest */, 144 | 65CB0EE72104416B0065236D /* XYChartUITests.xctest */, 145 | ); 146 | name = Products; 147 | sourceTree = ""; 148 | }; 149 | 65CB0EC62104416A0065236D /* XYChart */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | DBEC2CA622C3DB8C007F282C /* view */, 153 | DBEC2CA522C3DB76007F282C /* vc */, 154 | DBEC2CA422C3DB6E007F282C /* model */, 155 | 65CB0ECD2104416A0065236D /* Main.storyboard */, 156 | 65CB0EC72104416A0065236D /* AppDelegate.h */, 157 | 65CB0EC82104416A0065236D /* AppDelegate.m */, 158 | 65CB0ED02104416B0065236D /* Assets.xcassets */, 159 | 65CB0ED22104416B0065236D /* LaunchScreen.storyboard */, 160 | 65CB0ED52104416B0065236D /* Info.plist */, 161 | 65CB0ED62104416B0065236D /* main.m */, 162 | ); 163 | path = XYChart; 164 | sourceTree = ""; 165 | }; 166 | 65CB0EDF2104416B0065236D /* XYChartTests */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 65CB0EE02104416B0065236D /* XYChartTests.m */, 170 | 65CB0EE22104416B0065236D /* Info.plist */, 171 | ); 172 | path = XYChartTests; 173 | sourceTree = ""; 174 | }; 175 | 65CB0EEA2104416B0065236D /* XYChartUITests */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 65CB0EEB2104416B0065236D /* XYChartUITests.m */, 179 | 65CB0EED2104416B0065236D /* Info.plist */, 180 | ); 181 | path = XYChartUITests; 182 | sourceTree = ""; 183 | }; 184 | 7C8D71D8A37484F78BF5A4D7 /* Pods */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | BEC88D6770F530436456A215 /* Pods-XYChart.debug.xcconfig */, 188 | 4631504D8C3A879BA79CB68F /* Pods-XYChart.release.xcconfig */, 189 | 756382B9108270A2738D435B /* Pods-XYChartTests.debug.xcconfig */, 190 | F7C76DE31496D921F91576E7 /* Pods-XYChartTests.release.xcconfig */, 191 | 9471408379734E056B32DB45 /* Pods-XYChartUITests.debug.xcconfig */, 192 | 347F558E0B1F63B14CA2E9DA /* Pods-XYChartUITests.release.xcconfig */, 193 | ); 194 | path = Pods; 195 | sourceTree = ""; 196 | }; 197 | DBEC2CA422C3DB6E007F282C /* model */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | 65E9A36D2104541F00277206 /* RandomChartDataSource.h */, 201 | 65E9A36E2104541F00277206 /* RandomChartDataSource.m */, 202 | ); 203 | path = model; 204 | sourceTree = ""; 205 | }; 206 | DBEC2CA522C3DB76007F282C /* vc */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | 65CB0ECA2104416A0065236D /* BarTableViewController.h */, 210 | 65CB0ECB2104416A0065236D /* BarTableViewController.m */, 211 | 65CB0F24210443A80065236D /* LineTableViewController.h */, 212 | 65CB0F25210443A80065236D /* LineTableViewController.m */, 213 | ); 214 | path = vc; 215 | sourceTree = ""; 216 | }; 217 | DBEC2CA622C3DB8C007F282C /* view */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 65CB0F2A21044B790065236D /* ChartViewCell.h */, 221 | 65CB0F2B21044B7A0065236D /* ChartViewCell.m */, 222 | ); 223 | path = view; 224 | sourceTree = ""; 225 | }; 226 | /* End PBXGroup section */ 227 | 228 | /* Begin PBXNativeTarget section */ 229 | 65CB0EC32104416A0065236D /* XYChart */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = 65CB0EF02104416B0065236D /* Build configuration list for PBXNativeTarget "XYChart" */; 232 | buildPhases = ( 233 | 195272D02D3F256627CAA43C /* [CP] Check Pods Manifest.lock */, 234 | 65CB0EC02104416A0065236D /* Sources */, 235 | 65CB0EC12104416A0065236D /* Frameworks */, 236 | 65CB0EC22104416A0065236D /* Resources */, 237 | ); 238 | buildRules = ( 239 | ); 240 | dependencies = ( 241 | ); 242 | name = XYChart; 243 | productName = XYChart; 244 | productReference = 65CB0EC42104416A0065236D /* XYChart.app */; 245 | productType = "com.apple.product-type.application"; 246 | }; 247 | 65CB0EDB2104416B0065236D /* XYChartTests */ = { 248 | isa = PBXNativeTarget; 249 | buildConfigurationList = 65CB0EF32104416B0065236D /* Build configuration list for PBXNativeTarget "XYChartTests" */; 250 | buildPhases = ( 251 | 1AD5F35322A07388EB809F19 /* [CP] Check Pods Manifest.lock */, 252 | 65CB0ED82104416B0065236D /* Sources */, 253 | 65CB0ED92104416B0065236D /* Frameworks */, 254 | 65CB0EDA2104416B0065236D /* Resources */, 255 | ); 256 | buildRules = ( 257 | ); 258 | dependencies = ( 259 | 65CB0EDE2104416B0065236D /* PBXTargetDependency */, 260 | ); 261 | name = XYChartTests; 262 | productName = XYChartTests; 263 | productReference = 65CB0EDC2104416B0065236D /* XYChartTests.xctest */; 264 | productType = "com.apple.product-type.bundle.unit-test"; 265 | }; 266 | 65CB0EE62104416B0065236D /* XYChartUITests */ = { 267 | isa = PBXNativeTarget; 268 | buildConfigurationList = 65CB0EF62104416B0065236D /* Build configuration list for PBXNativeTarget "XYChartUITests" */; 269 | buildPhases = ( 270 | 712A231EBE3054ECACA069A6 /* [CP] Check Pods Manifest.lock */, 271 | 65CB0EE32104416B0065236D /* Sources */, 272 | 65CB0EE42104416B0065236D /* Frameworks */, 273 | 65CB0EE52104416B0065236D /* Resources */, 274 | ); 275 | buildRules = ( 276 | ); 277 | dependencies = ( 278 | 65CB0EE92104416B0065236D /* PBXTargetDependency */, 279 | ); 280 | name = XYChartUITests; 281 | productName = XYChartUITests; 282 | productReference = 65CB0EE72104416B0065236D /* XYChartUITests.xctest */; 283 | productType = "com.apple.product-type.bundle.ui-testing"; 284 | }; 285 | /* End PBXNativeTarget section */ 286 | 287 | /* Begin PBXProject section */ 288 | 65CB0EBC2104416A0065236D /* Project object */ = { 289 | isa = PBXProject; 290 | attributes = { 291 | LastUpgradeCheck = 0940; 292 | ORGANIZATIONNAME = Daniel; 293 | TargetAttributes = { 294 | 65CB0EC32104416A0065236D = { 295 | CreatedOnToolsVersion = 9.4.1; 296 | }; 297 | 65CB0EDB2104416B0065236D = { 298 | CreatedOnToolsVersion = 9.4.1; 299 | TestTargetID = 65CB0EC32104416A0065236D; 300 | }; 301 | 65CB0EE62104416B0065236D = { 302 | CreatedOnToolsVersion = 9.4.1; 303 | TestTargetID = 65CB0EC32104416A0065236D; 304 | }; 305 | }; 306 | }; 307 | buildConfigurationList = 65CB0EBF2104416A0065236D /* Build configuration list for PBXProject "XYChart" */; 308 | compatibilityVersion = "Xcode 9.3"; 309 | developmentRegion = en; 310 | hasScannedForEncodings = 0; 311 | knownRegions = ( 312 | en, 313 | Base, 314 | ); 315 | mainGroup = 65CB0EBB2104416A0065236D; 316 | productRefGroup = 65CB0EC52104416A0065236D /* Products */; 317 | projectDirPath = ""; 318 | projectRoot = ""; 319 | targets = ( 320 | 65CB0EC32104416A0065236D /* XYChart */, 321 | 65CB0EDB2104416B0065236D /* XYChartTests */, 322 | 65CB0EE62104416B0065236D /* XYChartUITests */, 323 | ); 324 | }; 325 | /* End PBXProject section */ 326 | 327 | /* Begin PBXResourcesBuildPhase section */ 328 | 65CB0EC22104416A0065236D /* Resources */ = { 329 | isa = PBXResourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | DBBA7ED722C3E7540062EC7F /* README.md in Resources */, 333 | 65CB0ED42104416B0065236D /* LaunchScreen.storyboard in Resources */, 334 | 65CB0ED12104416B0065236D /* Assets.xcassets in Resources */, 335 | DBBA7ED522C3E7540062EC7F /* XYChart.podspec in Resources */, 336 | 65CB0ECF2104416A0065236D /* Main.storyboard in Resources */, 337 | DBBA7ED822C3E7540062EC7F /* .travis.yml in Resources */, 338 | DBBA7ED622C3E7540062EC7F /* LICENSE in Resources */, 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | 65CB0EDA2104416B0065236D /* Resources */ = { 343 | isa = PBXResourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | 65CB0EE52104416B0065236D /* Resources */ = { 350 | isa = PBXResourcesBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | ); 354 | runOnlyForDeploymentPostprocessing = 0; 355 | }; 356 | /* End PBXResourcesBuildPhase section */ 357 | 358 | /* Begin PBXShellScriptBuildPhase section */ 359 | 195272D02D3F256627CAA43C /* [CP] Check Pods Manifest.lock */ = { 360 | isa = PBXShellScriptBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | ); 364 | inputFileListPaths = ( 365 | ); 366 | inputPaths = ( 367 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 368 | "${PODS_ROOT}/Manifest.lock", 369 | ); 370 | name = "[CP] Check Pods Manifest.lock"; 371 | outputFileListPaths = ( 372 | ); 373 | outputPaths = ( 374 | "$(DERIVED_FILE_DIR)/Pods-XYChart-checkManifestLockResult.txt", 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 379 | showEnvVarsInLog = 0; 380 | }; 381 | 1AD5F35322A07388EB809F19 /* [CP] Check Pods Manifest.lock */ = { 382 | isa = PBXShellScriptBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | inputFileListPaths = ( 387 | ); 388 | inputPaths = ( 389 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 390 | "${PODS_ROOT}/Manifest.lock", 391 | ); 392 | name = "[CP] Check Pods Manifest.lock"; 393 | outputFileListPaths = ( 394 | ); 395 | outputPaths = ( 396 | "$(DERIVED_FILE_DIR)/Pods-XYChartTests-checkManifestLockResult.txt", 397 | ); 398 | runOnlyForDeploymentPostprocessing = 0; 399 | shellPath = /bin/sh; 400 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 401 | showEnvVarsInLog = 0; 402 | }; 403 | 712A231EBE3054ECACA069A6 /* [CP] Check Pods Manifest.lock */ = { 404 | isa = PBXShellScriptBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | ); 408 | inputFileListPaths = ( 409 | ); 410 | inputPaths = ( 411 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 412 | "${PODS_ROOT}/Manifest.lock", 413 | ); 414 | name = "[CP] Check Pods Manifest.lock"; 415 | outputFileListPaths = ( 416 | ); 417 | outputPaths = ( 418 | "$(DERIVED_FILE_DIR)/Pods-XYChartUITests-checkManifestLockResult.txt", 419 | ); 420 | runOnlyForDeploymentPostprocessing = 0; 421 | shellPath = /bin/sh; 422 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 423 | showEnvVarsInLog = 0; 424 | }; 425 | /* End PBXShellScriptBuildPhase section */ 426 | 427 | /* Begin PBXSourcesBuildPhase section */ 428 | 65CB0EC02104416A0065236D /* Sources */ = { 429 | isa = PBXSourcesBuildPhase; 430 | buildActionMask = 2147483647; 431 | files = ( 432 | 65CB0ECC2104416A0065236D /* BarTableViewController.m in Sources */, 433 | 65CB0ED72104416B0065236D /* main.m in Sources */, 434 | 65CB0F26210443A80065236D /* LineTableViewController.m in Sources */, 435 | 65E9A36F2104541F00277206 /* RandomChartDataSource.m in Sources */, 436 | 65CB0F2C21044B7A0065236D /* ChartViewCell.m in Sources */, 437 | 65CB0EC92104416A0065236D /* AppDelegate.m in Sources */, 438 | ); 439 | runOnlyForDeploymentPostprocessing = 0; 440 | }; 441 | 65CB0ED82104416B0065236D /* Sources */ = { 442 | isa = PBXSourcesBuildPhase; 443 | buildActionMask = 2147483647; 444 | files = ( 445 | 65CB0EE12104416B0065236D /* XYChartTests.m in Sources */, 446 | ); 447 | runOnlyForDeploymentPostprocessing = 0; 448 | }; 449 | 65CB0EE32104416B0065236D /* Sources */ = { 450 | isa = PBXSourcesBuildPhase; 451 | buildActionMask = 2147483647; 452 | files = ( 453 | 65CB0EEC2104416B0065236D /* XYChartUITests.m in Sources */, 454 | ); 455 | runOnlyForDeploymentPostprocessing = 0; 456 | }; 457 | /* End PBXSourcesBuildPhase section */ 458 | 459 | /* Begin PBXTargetDependency section */ 460 | 65CB0EDE2104416B0065236D /* PBXTargetDependency */ = { 461 | isa = PBXTargetDependency; 462 | target = 65CB0EC32104416A0065236D /* XYChart */; 463 | targetProxy = 65CB0EDD2104416B0065236D /* PBXContainerItemProxy */; 464 | }; 465 | 65CB0EE92104416B0065236D /* PBXTargetDependency */ = { 466 | isa = PBXTargetDependency; 467 | target = 65CB0EC32104416A0065236D /* XYChart */; 468 | targetProxy = 65CB0EE82104416B0065236D /* PBXContainerItemProxy */; 469 | }; 470 | /* End PBXTargetDependency section */ 471 | 472 | /* Begin PBXVariantGroup section */ 473 | 65CB0ECD2104416A0065236D /* Main.storyboard */ = { 474 | isa = PBXVariantGroup; 475 | children = ( 476 | 65CB0ECE2104416A0065236D /* Base */, 477 | ); 478 | name = Main.storyboard; 479 | sourceTree = ""; 480 | }; 481 | 65CB0ED22104416B0065236D /* LaunchScreen.storyboard */ = { 482 | isa = PBXVariantGroup; 483 | children = ( 484 | 65CB0ED32104416B0065236D /* Base */, 485 | ); 486 | name = LaunchScreen.storyboard; 487 | sourceTree = ""; 488 | }; 489 | /* End PBXVariantGroup section */ 490 | 491 | /* Begin XCBuildConfiguration section */ 492 | 65CB0EEE2104416B0065236D /* Debug */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | ALWAYS_SEARCH_USER_PATHS = NO; 496 | CLANG_ANALYZER_NONNULL = YES; 497 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 498 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 499 | CLANG_CXX_LIBRARY = "libc++"; 500 | CLANG_ENABLE_MODULES = YES; 501 | CLANG_ENABLE_OBJC_ARC = YES; 502 | CLANG_ENABLE_OBJC_WEAK = YES; 503 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 504 | CLANG_WARN_BOOL_CONVERSION = YES; 505 | CLANG_WARN_COMMA = YES; 506 | CLANG_WARN_CONSTANT_CONVERSION = YES; 507 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 508 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 509 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 510 | CLANG_WARN_EMPTY_BODY = YES; 511 | CLANG_WARN_ENUM_CONVERSION = YES; 512 | CLANG_WARN_INFINITE_RECURSION = YES; 513 | CLANG_WARN_INT_CONVERSION = YES; 514 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 515 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 516 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 517 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 518 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 519 | CLANG_WARN_STRICT_PROTOTYPES = YES; 520 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 521 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 522 | CLANG_WARN_UNREACHABLE_CODE = YES; 523 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 524 | CODE_SIGN_IDENTITY = "iPhone Developer"; 525 | COPY_PHASE_STRIP = NO; 526 | DEBUG_INFORMATION_FORMAT = dwarf; 527 | ENABLE_STRICT_OBJC_MSGSEND = YES; 528 | ENABLE_TESTABILITY = YES; 529 | GCC_C_LANGUAGE_STANDARD = gnu11; 530 | GCC_DYNAMIC_NO_PIC = NO; 531 | GCC_NO_COMMON_BLOCKS = YES; 532 | GCC_OPTIMIZATION_LEVEL = 0; 533 | GCC_PREPROCESSOR_DEFINITIONS = ( 534 | "DEBUG=1", 535 | "$(inherited)", 536 | ); 537 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 538 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 539 | GCC_WARN_UNDECLARED_SELECTOR = YES; 540 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 541 | GCC_WARN_UNUSED_FUNCTION = YES; 542 | GCC_WARN_UNUSED_VARIABLE = YES; 543 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 544 | MTL_ENABLE_DEBUG_INFO = YES; 545 | ONLY_ACTIVE_ARCH = YES; 546 | SDKROOT = iphoneos; 547 | }; 548 | name = Debug; 549 | }; 550 | 65CB0EEF2104416B0065236D /* Release */ = { 551 | isa = XCBuildConfiguration; 552 | buildSettings = { 553 | ALWAYS_SEARCH_USER_PATHS = NO; 554 | CLANG_ANALYZER_NONNULL = YES; 555 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 556 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 557 | CLANG_CXX_LIBRARY = "libc++"; 558 | CLANG_ENABLE_MODULES = YES; 559 | CLANG_ENABLE_OBJC_ARC = YES; 560 | CLANG_ENABLE_OBJC_WEAK = YES; 561 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 562 | CLANG_WARN_BOOL_CONVERSION = YES; 563 | CLANG_WARN_COMMA = YES; 564 | CLANG_WARN_CONSTANT_CONVERSION = YES; 565 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 566 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 567 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 568 | CLANG_WARN_EMPTY_BODY = YES; 569 | CLANG_WARN_ENUM_CONVERSION = YES; 570 | CLANG_WARN_INFINITE_RECURSION = YES; 571 | CLANG_WARN_INT_CONVERSION = YES; 572 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 573 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 574 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 575 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 576 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 577 | CLANG_WARN_STRICT_PROTOTYPES = YES; 578 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 579 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 580 | CLANG_WARN_UNREACHABLE_CODE = YES; 581 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 582 | CODE_SIGN_IDENTITY = "iPhone Developer"; 583 | COPY_PHASE_STRIP = NO; 584 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 585 | ENABLE_NS_ASSERTIONS = NO; 586 | ENABLE_STRICT_OBJC_MSGSEND = YES; 587 | GCC_C_LANGUAGE_STANDARD = gnu11; 588 | GCC_NO_COMMON_BLOCKS = YES; 589 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 590 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 591 | GCC_WARN_UNDECLARED_SELECTOR = YES; 592 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 593 | GCC_WARN_UNUSED_FUNCTION = YES; 594 | GCC_WARN_UNUSED_VARIABLE = YES; 595 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 596 | MTL_ENABLE_DEBUG_INFO = NO; 597 | SDKROOT = iphoneos; 598 | VALIDATE_PRODUCT = YES; 599 | }; 600 | name = Release; 601 | }; 602 | 65CB0EF12104416B0065236D /* Debug */ = { 603 | isa = XCBuildConfiguration; 604 | baseConfigurationReference = BEC88D6770F530436456A215 /* Pods-XYChart.debug.xcconfig */; 605 | buildSettings = { 606 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 607 | CODE_SIGN_STYLE = Automatic; 608 | DEVELOPMENT_TEAM = 34768TZSZ3; 609 | INFOPLIST_FILE = XYChart/Info.plist; 610 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 611 | LD_RUNPATH_SEARCH_PATHS = ( 612 | "$(inherited)", 613 | "@executable_path/Frameworks", 614 | ); 615 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChart; 616 | PRODUCT_NAME = "$(TARGET_NAME)"; 617 | TARGETED_DEVICE_FAMILY = "1,2"; 618 | }; 619 | name = Debug; 620 | }; 621 | 65CB0EF22104416B0065236D /* Release */ = { 622 | isa = XCBuildConfiguration; 623 | baseConfigurationReference = 4631504D8C3A879BA79CB68F /* Pods-XYChart.release.xcconfig */; 624 | buildSettings = { 625 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 626 | CODE_SIGN_STYLE = Automatic; 627 | DEVELOPMENT_TEAM = 34768TZSZ3; 628 | INFOPLIST_FILE = XYChart/Info.plist; 629 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 630 | LD_RUNPATH_SEARCH_PATHS = ( 631 | "$(inherited)", 632 | "@executable_path/Frameworks", 633 | ); 634 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChart; 635 | PRODUCT_NAME = "$(TARGET_NAME)"; 636 | TARGETED_DEVICE_FAMILY = "1,2"; 637 | }; 638 | name = Release; 639 | }; 640 | 65CB0EF42104416B0065236D /* Debug */ = { 641 | isa = XCBuildConfiguration; 642 | baseConfigurationReference = 756382B9108270A2738D435B /* Pods-XYChartTests.debug.xcconfig */; 643 | buildSettings = { 644 | BUNDLE_LOADER = "$(TEST_HOST)"; 645 | CODE_SIGN_STYLE = Automatic; 646 | INFOPLIST_FILE = XYChartTests/Info.plist; 647 | LD_RUNPATH_SEARCH_PATHS = ( 648 | "$(inherited)", 649 | "@executable_path/Frameworks", 650 | "@loader_path/Frameworks", 651 | ); 652 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChartTests; 653 | PRODUCT_NAME = "$(TARGET_NAME)"; 654 | TARGETED_DEVICE_FAMILY = "1,2"; 655 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XYChart.app/XYChart"; 656 | }; 657 | name = Debug; 658 | }; 659 | 65CB0EF52104416B0065236D /* Release */ = { 660 | isa = XCBuildConfiguration; 661 | baseConfigurationReference = F7C76DE31496D921F91576E7 /* Pods-XYChartTests.release.xcconfig */; 662 | buildSettings = { 663 | BUNDLE_LOADER = "$(TEST_HOST)"; 664 | CODE_SIGN_STYLE = Automatic; 665 | INFOPLIST_FILE = XYChartTests/Info.plist; 666 | LD_RUNPATH_SEARCH_PATHS = ( 667 | "$(inherited)", 668 | "@executable_path/Frameworks", 669 | "@loader_path/Frameworks", 670 | ); 671 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChartTests; 672 | PRODUCT_NAME = "$(TARGET_NAME)"; 673 | TARGETED_DEVICE_FAMILY = "1,2"; 674 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XYChart.app/XYChart"; 675 | }; 676 | name = Release; 677 | }; 678 | 65CB0EF72104416B0065236D /* Debug */ = { 679 | isa = XCBuildConfiguration; 680 | baseConfigurationReference = 9471408379734E056B32DB45 /* Pods-XYChartUITests.debug.xcconfig */; 681 | buildSettings = { 682 | CODE_SIGN_STYLE = Automatic; 683 | INFOPLIST_FILE = XYChartUITests/Info.plist; 684 | LD_RUNPATH_SEARCH_PATHS = ( 685 | "$(inherited)", 686 | "@executable_path/Frameworks", 687 | "@loader_path/Frameworks", 688 | ); 689 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChartUITests; 690 | PRODUCT_NAME = "$(TARGET_NAME)"; 691 | TARGETED_DEVICE_FAMILY = "1,2"; 692 | TEST_TARGET_NAME = XYChart; 693 | }; 694 | name = Debug; 695 | }; 696 | 65CB0EF82104416B0065236D /* Release */ = { 697 | isa = XCBuildConfiguration; 698 | baseConfigurationReference = 347F558E0B1F63B14CA2E9DA /* Pods-XYChartUITests.release.xcconfig */; 699 | buildSettings = { 700 | CODE_SIGN_STYLE = Automatic; 701 | INFOPLIST_FILE = XYChartUITests/Info.plist; 702 | LD_RUNPATH_SEARCH_PATHS = ( 703 | "$(inherited)", 704 | "@executable_path/Frameworks", 705 | "@loader_path/Frameworks", 706 | ); 707 | PRODUCT_BUNDLE_IDENTIFIER = com.xcodeyang.XYChartUITests; 708 | PRODUCT_NAME = "$(TARGET_NAME)"; 709 | TARGETED_DEVICE_FAMILY = "1,2"; 710 | TEST_TARGET_NAME = XYChart; 711 | }; 712 | name = Release; 713 | }; 714 | /* End XCBuildConfiguration section */ 715 | 716 | /* Begin XCConfigurationList section */ 717 | 65CB0EBF2104416A0065236D /* Build configuration list for PBXProject "XYChart" */ = { 718 | isa = XCConfigurationList; 719 | buildConfigurations = ( 720 | 65CB0EEE2104416B0065236D /* Debug */, 721 | 65CB0EEF2104416B0065236D /* Release */, 722 | ); 723 | defaultConfigurationIsVisible = 0; 724 | defaultConfigurationName = Release; 725 | }; 726 | 65CB0EF02104416B0065236D /* Build configuration list for PBXNativeTarget "XYChart" */ = { 727 | isa = XCConfigurationList; 728 | buildConfigurations = ( 729 | 65CB0EF12104416B0065236D /* Debug */, 730 | 65CB0EF22104416B0065236D /* Release */, 731 | ); 732 | defaultConfigurationIsVisible = 0; 733 | defaultConfigurationName = Release; 734 | }; 735 | 65CB0EF32104416B0065236D /* Build configuration list for PBXNativeTarget "XYChartTests" */ = { 736 | isa = XCConfigurationList; 737 | buildConfigurations = ( 738 | 65CB0EF42104416B0065236D /* Debug */, 739 | 65CB0EF52104416B0065236D /* Release */, 740 | ); 741 | defaultConfigurationIsVisible = 0; 742 | defaultConfigurationName = Release; 743 | }; 744 | 65CB0EF62104416B0065236D /* Build configuration list for PBXNativeTarget "XYChartUITests" */ = { 745 | isa = XCConfigurationList; 746 | buildConfigurations = ( 747 | 65CB0EF72104416B0065236D /* Debug */, 748 | 65CB0EF82104416B0065236D /* Release */, 749 | ); 750 | defaultConfigurationIsVisible = 0; 751 | defaultConfigurationName = Release; 752 | }; 753 | /* End XCConfigurationList section */ 754 | }; 755 | rootObject = 65CB0EBC2104416A0065236D /* Project object */; 756 | } 757 | --------------------------------------------------------------------------------