├── .gitignore
├── .swift-version
├── Colours
├── Colours.h
├── Colours.m
└── Info.plist
├── LICENSE
├── Podfile
├── Podfile.lock
├── Pods
├── Manifest.lock
├── Masonry
│ ├── LICENSE
│ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ ├── View+MASShorthandAdditions.h
│ │ ├── ViewController+MASAdditions.h
│ │ └── ViewController+MASAdditions.m
│ └── README.md
├── Pods.xcodeproj
│ └── project.pbxproj
└── Target Support Files
│ ├── Masonry
│ ├── Info.plist
│ ├── Masonry-dummy.m
│ ├── Masonry-prefix.pch
│ ├── Masonry-umbrella.h
│ ├── Masonry.modulemap
│ └── Masonry.xcconfig
│ ├── Pods-XJYChartDemo-Swift
│ ├── Info.plist
│ ├── Pods-XJYChartDemo-Swift-acknowledgements.markdown
│ ├── Pods-XJYChartDemo-Swift-acknowledgements.plist
│ ├── Pods-XJYChartDemo-Swift-dummy.m
│ ├── Pods-XJYChartDemo-Swift-frameworks.sh
│ ├── Pods-XJYChartDemo-Swift-resources.sh
│ ├── Pods-XJYChartDemo-Swift-umbrella.h
│ ├── Pods-XJYChartDemo-Swift.debug.xcconfig
│ ├── Pods-XJYChartDemo-Swift.modulemap
│ └── Pods-XJYChartDemo-Swift.release.xcconfig
│ └── Pods-XJYChartDemo
│ ├── Info.plist
│ ├── Pods-XJYChartDemo-acknowledgements.markdown
│ ├── Pods-XJYChartDemo-acknowledgements.plist
│ ├── Pods-XJYChartDemo-dummy.m
│ ├── Pods-XJYChartDemo-frameworks.sh
│ ├── Pods-XJYChartDemo-resources.sh
│ ├── Pods-XJYChartDemo-umbrella.h
│ ├── Pods-XJYChartDemo.debug.xcconfig
│ ├── Pods-XJYChartDemo.modulemap
│ └── Pods-XJYChartDemo.release.xcconfig
├── Products
├── Colours.framework
│ ├── Colours
│ ├── Headers
│ │ └── Colours.h
│ ├── Info.plist
│ └── Modules
│ │ └── module.modulemap
└── XJYChart.framework
│ ├── Headers
│ ├── CAKeyframeAnimation+AHEasing.h
│ ├── CALayer+XLayerSelectHelper.h
│ ├── CAShapeLayer+XLayerHelper.h
│ ├── OrdinateView.h
│ ├── UIGestureRecognizer+XGesHelper.h
│ ├── XAbscissaView.h
│ ├── XAlignLabel.h
│ ├── XAnimation.h
│ ├── XAnimationLabel.h
│ ├── XAnimationPath.h
│ ├── XAnimator.h
│ ├── XAreaLineChartConfiguration.h
│ ├── XAreaLineContainerView.h
│ ├── XAuxiliaryCalculationHelper.h
│ ├── XBarChart.h
│ ├── XBarChartConfiguration.h
│ ├── XBarChartView.h
│ ├── XBarContainerView.h
│ ├── XBarItem.h
│ ├── XBaseChartConfiguration.h
│ ├── XColor.h
│ ├── XCycleView.h
│ ├── XEnumHeader.h
│ ├── XJYChart.h
│ ├── XJYChartDelegate.h
│ ├── XLineChart.h
│ ├── XLineChartConfiguration.h
│ ├── XLineChartItem.h
│ ├── XLineChartView.h
│ ├── XLineContainerView.h
│ ├── XNormalLineChartConfiguration.h
│ ├── XNotificationBridge.h
│ ├── XPieChart.h
│ ├── XPieItem.h
│ ├── XPointDetect.h
│ ├── XPositiveNegativeBarChart.h
│ ├── XPositiveNegativeBarChartView.h
│ ├── XPositiveNegativeBarContainerView.h
│ ├── XRandomNumerHelper.h
│ ├── XStackAreaLineChartConfiguration.h
│ └── XStackAreaLineContainerView.h
│ ├── Info.plist
│ ├── Modules
│ └── module.modulemap
│ └── XJYChart
├── README.md
├── XJYChart.podspec
├── XJYChart.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── junyixie.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcshareddata
│ └── xcschemes
│ │ ├── BuildUniversal.xcscheme
│ │ ├── Colours.xcscheme
│ │ └── XJYChart.xcscheme
└── xcuserdata
│ ├── junyixie.xcuserdatad
│ └── xcschemes
│ │ ├── XJYChart.xcscheme
│ │ └── xcschememanagement.plist
│ └── xiejunyi.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── XJYChart.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── XJYChart
├── AHEasing
│ ├── CAKeyframeAnimation+AHEasing.h
│ └── CAKeyframeAnimation+AHEasing.m
├── Animator
│ ├── XAnimation.h
│ ├── XAnimation.m
│ ├── XAnimationPath.h
│ ├── XAnimationPath.m
│ ├── XAnimator.h
│ └── XAnimator.m
├── CALayerTouch
│ ├── XPointDetect.h
│ └── XPointDetect.m
├── Calculate
│ ├── XAuxiliaryCalculationHelper.h
│ ├── XAuxiliaryCalculationHelper.m
│ ├── XRandomNumerHelper.h
│ └── XRandomNumerHelper.m
├── Category
│ ├── CALayer+XLayerSelectHelper.h
│ ├── CALayer+XLayerSelectHelper.m
│ ├── CAShapeLayer+XLayerHelper.h
│ ├── CAShapeLayer+XLayerHelper.m
│ ├── UIGestureRecognizer+XGesHelper.h
│ └── UIGestureRecognizer+XGesHelper.m
├── ChartView
│ ├── Decoration
│ │ ├── XJYNumberLabelDecoration.h
│ │ └── XJYNumberLabelDecoration.m
│ ├── OrdinateView.h
│ ├── OrdinateView.m
│ ├── XAbscissaView.h
│ ├── XAbscissaView.m
│ ├── XAlignLabel.h
│ ├── XAlignLabel.m
│ ├── XAnimationLabel.h
│ ├── XAnimationLabel.m
│ ├── XAreaLineContainerView.h
│ ├── XAreaLineContainerView.m
│ ├── XBarChart.h
│ ├── XBarChart.m
│ ├── XBarChartView.h
│ ├── XBarChartView.m
│ ├── XBarContainerView.h
│ ├── XBarContainerView.m
│ ├── XCycleView.h
│ ├── XCycleView.m
│ ├── XLineChart.h
│ ├── XLineChart.m
│ ├── XLineChartView.h
│ ├── XLineChartView.m
│ ├── XLineContainerView.h
│ ├── XLineContainerView.m
│ ├── XPieChart.h
│ ├── XPieChart.m
│ ├── XPositiveNegativeBarChart.h
│ ├── XPositiveNegativeBarChart.m
│ ├── XPositiveNegativeBarChartView.h
│ ├── XPositiveNegativeBarChartView.m
│ ├── XPositiveNegativeBarContainerView.h
│ ├── XPositiveNegativeBarContainerView.m
│ ├── XStackAreaLineContainerView.h
│ └── XStackAreaLineContainerView.m
├── Color
│ ├── XColor.h
│ └── XColor.m
├── Configuration
│ ├── BarChartConfiguration
│ │ ├── XBarChartConfiguration.h
│ │ └── XBarChartConfiguration.m
│ ├── LineChartConfiguration
│ │ ├── XAreaLineChartConfiguration.h
│ │ ├── XAreaLineChartConfiguration.m
│ │ ├── XLineChartConfiguration.h
│ │ ├── XLineChartConfiguration.m
│ │ ├── XNormalLineChartConfiguration.h
│ │ ├── XNormalLineChartConfiguration.m
│ │ ├── XStackAreaLineChartConfiguration.h
│ │ └── XStackAreaLineChartConfiguration.m
│ ├── XBaseChartConfiguration.h
│ └── XBaseChartConfiguration.m
├── DataModel
│ ├── XBarItem.h
│ ├── XBarItem.m
│ ├── XLineChartItem.h
│ ├── XLineChartItem.m
│ ├── XPieItem.h
│ └── XPieItem.m
├── Helper
│ ├── XEnumHeader.h
│ ├── XNotificationBridge.h
│ └── XNotificationBridge.m
├── Info.plist
├── XJYChart.h
└── XJYChartDelegate.h
├── XJYChartDemo
├── XJYChartDemo-Swift
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-40.png
│ │ │ ├── Icon-40@2x.png
│ │ │ ├── Icon-40@3x.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-72.png
│ │ │ ├── Icon-72@2x.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-83.5@2x.png
│ │ │ ├── Icon-Small-50.png
│ │ │ ├── Icon-Small-50@2x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ ├── Icon.png
│ │ │ ├── Icon@2x.png
│ │ │ ├── NotificationIcon@2x.png
│ │ │ ├── NotificationIcon@3x.png
│ │ │ ├── NotificationIcon~ipad.png
│ │ │ ├── NotificationIcon~ipad@2x.png
│ │ │ └── ios-marketing.png
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ └── View
│ │ ├── AreaLineTableViewCell.swift
│ │ ├── BarChartCell.swift
│ │ ├── Constants.swift
│ │ ├── CycleTableViewCell.swift
│ │ ├── CycleTableViewCell.xib
│ │ ├── HomeViewController.swift
│ │ ├── LineChartCell.swift
│ │ ├── PieChartCell.swift
│ │ ├── PositiveNegativeBarChartCell.swift
│ │ ├── SingleLineChartTableViewCell.swift
│ │ ├── StackAreaTableViewCell.swift
│ │ ├── XJYTableViewCell.swift
│ │ └── XJYViewController.swift
├── XJYChartDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── junyixie.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── XJYChartDemo-Swift.xcscheme
│ │ │ └── XJYChartDemo.xcscheme
│ └── xcuserdata
│ │ ├── junyixie.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── XJYChartDemo.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── xiejunyi.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── XJYChartDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-40.png
│ │ ├── Icon-40@2x.png
│ │ ├── Icon-40@3x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-72.png
│ │ ├── Icon-72@2x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-83.5@2x.png
│ │ ├── Icon-Small-50.png
│ │ ├── Icon-Small-50@2x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ ├── Icon.png
│ │ ├── Icon@2x.png
│ │ ├── NotificationIcon@2x.png
│ │ ├── NotificationIcon@3x.png
│ │ ├── NotificationIcon~ipad.png
│ │ ├── NotificationIcon~ipad@2x.png
│ │ └── ios-marketing.png
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── View
│ ├── AreaLineTableViewCell.h
│ ├── AreaLineTableViewCell.m
│ ├── BarChartCell.h
│ ├── BarChartCell.m
│ ├── CycleTableViewCell.h
│ ├── CycleTableViewCell.m
│ ├── CycleTableViewCell.xib
│ ├── HomeViewController.h
│ ├── HomeViewController.m
│ ├── LineChartCell.h
│ ├── LineChartCell.m
│ ├── PieChartCell.h
│ ├── PieChartCell.m
│ ├── PositiveNegativeBarChartCell.h
│ ├── PositiveNegativeBarChartCell.m
│ ├── SingleLineChartTableViewCell.h
│ ├── SingleLineChartTableViewCell.m
│ ├── StackAreaTableViewCell.h
│ ├── StackAreaTableViewCell.m
│ ├── XJYTableViewCell.h
│ ├── XJYTableViewCell.m
│ ├── XJYViewController.h
│ └── XJYViewController.m
│ └── main.m
└── photos
├── icon.png
├── image1.PNG
├── image4.PNG
└── image5.PNG
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | # CocoaPods
32 | #
33 | # We recommend against adding the Pods directory to your .gitignore. However
34 | # you should judge for yourself, the pros and cons are mentioned at:
35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36 | #
37 | # Pods/
38 |
39 | # Carthage
40 | #
41 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
42 | # Carthage/Checkouts
43 |
44 | Carthage/Build
45 |
46 | # fastlane
47 | #
48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49 | # screenshots whenever they are needed.
50 | # For more information about the recommended setup visit:
51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
52 |
53 | fastlane/report.xml
54 | fastlane/Preview.html
55 | fastlane/screenshots
56 | fastlane/test_output
57 |
58 | # Code Injection
59 | #
60 | # After new code Injection tools there's a generated folder /iOSInjectionProject
61 | # https://github.com/johnno1962/injectionforxcode
62 |
63 | iOSInjectionProject/
64 |
65 | .DS_Store
66 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/Colours/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 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 谢俊逸
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 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :ios, '8.0'
3 |
4 | workspace 'XJYChart'
5 | project 'XJYChart.xcodeproj'
6 | project 'XJYChartDemo/XJYChartDemo.xcodeproj'
7 |
8 | target 'XJYChartDemo' do
9 | project 'XJYChartDemo/XJYChartDemo.xcodeproj'
10 | use_frameworks!
11 | pod 'Masonry'
12 | end
13 |
14 | target 'XJYChartDemo-Swift' do
15 | project 'XJYChartDemo/XJYChartDemo.xcodeproj'
16 | use_frameworks!
17 | pod 'Masonry'
18 | end
19 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.1.0)
3 |
4 | DEPENDENCIES:
5 | - Masonry
6 |
7 | SPEC REPOS:
8 | https://github.com/cocoapods/specs.git:
9 | - Masonry
10 |
11 | SPEC CHECKSUMS:
12 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
13 |
14 | PODFILE CHECKSUM: 2ab2823ad0cb5900bd8c33318094ce35578b6b21
15 |
16 | COCOAPODS: 1.5.3
17 |
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Masonry (1.1.0)
3 |
4 | DEPENDENCIES:
5 | - Masonry
6 |
7 | SPEC REPOS:
8 | https://github.com/cocoapods/specs.git:
9 | - Masonry
10 |
11 | SPEC CHECKSUMS:
12 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
13 |
14 | PODFILE CHECKSUM: 2ab2823ad0cb5900bd8c33318094ce35578b6b21
15 |
16 | COCOAPODS: 1.5.3
17 |
--------------------------------------------------------------------------------
/Pods/Masonry/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint+Private.h
3 | // Masonry
4 | //
5 | // Created by Nick Tymchenko on 29/04/14.
6 | // Copyright (c) 2014 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 |
11 | @protocol MASConstraintDelegate;
12 |
13 |
14 | @interface MASConstraint ()
15 |
16 | /**
17 | * Whether or not to check for an existing constraint instead of adding constraint
18 | */
19 | @property (nonatomic, assign) BOOL updateExisting;
20 |
21 | /**
22 | * Usually MASConstraintMaker but could be a parent MASConstraint
23 | */
24 | @property (nonatomic, weak) id delegate;
25 |
26 | /**
27 | * Based on a provided value type, is equal to calling:
28 | * NSNumber - setOffset:
29 | * NSValue with CGPoint - setPointOffset:
30 | * NSValue with CGSize - setSizeOffset:
31 | * NSValue with MASEdgeInsets - setInsets:
32 | */
33 | - (void)setLayoutConstantWithValue:(NSValue *)value;
34 |
35 | @end
36 |
37 |
38 | @interface MASConstraint (Abstract)
39 |
40 | /**
41 | * Sets the constraint relation to given NSLayoutRelation
42 | * returns a block which accepts one of the following:
43 | * MASViewAttribute, UIView, NSValue, NSArray
44 | * see readme for more details.
45 | */
46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
47 |
48 | /**
49 | * Override to set a custom chaining behaviour
50 | */
51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
52 |
53 | @end
54 |
55 |
56 | @protocol MASConstraintDelegate
57 |
58 | /**
59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example
60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
61 | */
62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
63 |
64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewAttribute.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * An immutable tuple which stores the view and the related NSLayoutAttribute.
13 | * Describes part of either the left or right hand side of a constraint equation
14 | */
15 | @interface MASViewAttribute : NSObject
16 |
17 | /**
18 | * The view which the reciever relates to. Can be nil if item is not a view.
19 | */
20 | @property (nonatomic, weak, readonly) MAS_VIEW *view;
21 |
22 | /**
23 | * The item which the reciever relates to.
24 | */
25 | @property (nonatomic, weak, readonly) id item;
26 |
27 | /**
28 | * The attribute which the reciever relates to
29 | */
30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
31 |
32 | /**
33 | * Convenience initializer.
34 | */
35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
36 |
37 | /**
38 | * The designated initializer.
39 | */
40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
41 |
42 | /**
43 | * Determine whether the layoutAttribute is a size attribute
44 | *
45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
46 | */
47 | - (BOOL)isSizeAttribute;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASViewConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 | #import "MASConstraint.h"
11 | #import "MASLayoutConstraint.h"
12 | #import "MASUtilities.h"
13 |
14 | /**
15 | * A single constraint.
16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
17 | */
18 | @interface MASViewConstraint : MASConstraint
19 |
20 | /**
21 | * First item/view and first attribute of the NSLayoutConstraint
22 | */
23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
24 |
25 | /**
26 | * Second item/view and second attribute of the NSLayoutConstraint
27 | */
28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
29 |
30 | /**
31 | * initialises the MASViewConstraint with the first part of the equation
32 | *
33 | * @param firstViewAttribute view.mas_left, view.mas_width etc.
34 | *
35 | * @return a new view constraint
36 | */
37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
38 |
39 | /**
40 | * Returns all MASViewConstraints installed with this view as a first item.
41 | *
42 | * @param view A view to retrieve constraints for.
43 | *
44 | * @return An array of MASViewConstraints.
45 | */
46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.h
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | typedef NS_ENUM(NSUInteger, MASAxisType) {
14 | MASAxisTypeHorizontal,
15 | MASAxisTypeVertical
16 | };
17 |
18 | @interface NSArray (MASAdditions)
19 |
20 | /**
21 | * Creates a MASConstraintMaker with each view in the callee.
22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
23 | *
24 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
25 | *
26 | * @return Array of created MASConstraints
27 | */
28 | - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
29 |
30 | /**
31 | * Creates a MASConstraintMaker with each view in the callee.
32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
33 | * If an existing constraint exists then it will be updated instead.
34 | *
35 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
36 | *
37 | * @return Array of created/updated MASConstraints
38 | */
39 | - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
40 |
41 | /**
42 | * Creates a MASConstraintMaker with each view in the callee.
43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
44 | * All constraints previously installed for the views will be removed.
45 | *
46 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
47 | *
48 | * @return Array of created/updated MASConstraints
49 | */
50 | - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
51 |
52 | /**
53 | * distribute with fixed spacing
54 | *
55 | * @param axisType which axis to distribute items along
56 | * @param fixedSpacing the spacing between each item
57 | * @param leadSpacing the spacing before the first item and the container
58 | * @param tailSpacing the spacing after the last item and the container
59 | */
60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
61 |
62 | /**
63 | * distribute with fixed item size
64 | *
65 | * @param axisType which axis to distribute items along
66 | * @param fixedItemLength the fixed length of each item
67 | * @param leadSpacing the spacing before the first item and the container
68 | * @param tailSpacing the spacing after the last item and the container
69 | */
70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
26 |
27 |
28 | @end
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 | - (MASViewAttribute *)mas_topLayoutGuideTop {
19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
20 | }
21 | - (MASViewAttribute *)mas_topLayoutGuideBottom {
22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
23 | }
24 |
25 | - (MASViewAttribute *)mas_bottomLayoutGuide {
26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
27 | }
28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop {
29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
30 | }
31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
33 | }
34 |
35 |
36 |
37 | @end
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-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 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry-umbrella.h:
--------------------------------------------------------------------------------
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 | #import "MASCompositeConstraint.h"
14 | #import "MASConstraint+Private.h"
15 | #import "MASConstraint.h"
16 | #import "MASConstraintMaker.h"
17 | #import "MASLayoutConstraint.h"
18 | #import "Masonry.h"
19 | #import "MASUtilities.h"
20 | #import "MASViewAttribute.h"
21 | #import "MASViewConstraint.h"
22 | #import "NSArray+MASAdditions.h"
23 | #import "NSArray+MASShorthandAdditions.h"
24 | #import "NSLayoutConstraint+MASDebugAdditions.h"
25 | #import "View+MASAdditions.h"
26 | #import "View+MASShorthandAdditions.h"
27 | #import "ViewController+MASAdditions.h"
28 |
29 | FOUNDATION_EXPORT double MasonryVersionNumber;
30 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
31 |
32 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry.modulemap:
--------------------------------------------------------------------------------
1 | framework module Masonry {
2 | umbrella header "Masonry-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Masonry/Masonry.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
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}/Masonry
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## Masonry
5 |
6 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 | Generated by CocoaPods - https://cocoapods.org
26 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift-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 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | License
37 | MIT
38 | Title
39 | Masonry
40 | Type
41 | PSGroupSpecifier
42 |
43 |
44 | FooterText
45 | Generated by CocoaPods - https://cocoapods.org
46 | Title
47 |
48 | Type
49 | PSGroupSpecifier
50 |
51 |
52 | StringsTable
53 | Acknowledgements
54 | Title
55 | Acknowledgements
56 |
57 |
58 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_XJYChartDemo_Swift : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_XJYChartDemo_Swift
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift-umbrella.h:
--------------------------------------------------------------------------------
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 |
14 | FOUNDATION_EXPORT double Pods_XJYChartDemo_SwiftVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_XJYChartDemo_SwiftVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "Masonry"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
9 | PODS_ROOT = ${SRCROOT}/../Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_XJYChartDemo_Swift {
2 | umbrella header "Pods-XJYChartDemo-Swift-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo-Swift/Pods-XJYChartDemo-Swift.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "Masonry"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
9 | PODS_ROOT = ${SRCROOT}/../Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## Masonry
5 |
6 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 | Generated by CocoaPods - https://cocoapods.org
26 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo-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 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | License
37 | MIT
38 | Title
39 | Masonry
40 | Type
41 | PSGroupSpecifier
42 |
43 |
44 | FooterText
45 | Generated by CocoaPods - https://cocoapods.org
46 | Title
47 |
48 | Type
49 | PSGroupSpecifier
50 |
51 |
52 | StringsTable
53 | Acknowledgements
54 | Title
55 | Acknowledgements
56 |
57 |
58 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_XJYChartDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_XJYChartDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo-umbrella.h:
--------------------------------------------------------------------------------
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 |
14 | FOUNDATION_EXPORT double Pods_XJYChartDemoVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_XJYChartDemoVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "Masonry"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
9 | PODS_ROOT = ${SRCROOT}/../Pods
10 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_XJYChartDemo {
2 | umbrella header "Pods-XJYChartDemo-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-XJYChartDemo/Pods-XJYChartDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "Masonry"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/..
9 | PODS_ROOT = ${SRCROOT}/../Pods
10 |
--------------------------------------------------------------------------------
/Products/Colours.framework/Colours:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/Products/Colours.framework/Colours
--------------------------------------------------------------------------------
/Products/Colours.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/Products/Colours.framework/Info.plist
--------------------------------------------------------------------------------
/Products/Colours.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module Colours {
2 | umbrella header "Colours.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/CALayer+XLayerSelectHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // CALayer+XXLayer.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 24/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CALayer (XXLayer)
12 |
13 | @property(nonatomic, strong) NSNumber* selectIdxNumber;
14 | @property(nonatomic, strong) NSValue* frameValue;
15 | @property(nonatomic, strong) NSValue* backgroundFrameValue;
16 | @property(nonatomic, strong) NSNumber* selectStatusNumber;
17 |
18 | @property(nonatomic, strong)
19 | NSMutableArray*>* segementPointsArrays;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/CAShapeLayer+XLayerHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // CAShapeLayer+XJYLayerHelper.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 31/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "XEnumHeader.h"
12 | #import "XAuxiliaryCalculationHelper.h"
13 |
14 | @interface CAShapeLayer (XJYLayerHelper)
15 | + (CAShapeLayer*)rectShapeLayerWithBounds:(CGRect)rect
16 | fillColor:(UIColor*)fillColor;
17 | + (CAShapeLayer*)lineShapeLayerWithPoints:
18 | (NSMutableArray*)pointsValueArray
19 | color:(UIColor*)color
20 | lineMode:(XLineMode)lineMode
21 | lineWidth:(CGFloat)lineWidth;
22 | + (CAShapeLayer*)pointLayerWithDiameter:(CGFloat)diameter
23 | color:(UIColor*)color
24 | center:(CGPoint)center;
25 |
26 | + (CAShapeLayer*)annularPointLayerWithDiameter:(CGFloat)diameter
27 | color:(UIColor*)color
28 | center:(CGPoint)center;
29 | @end
30 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/OrdinateView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OrdinateView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | @class XBaseChartConfiguration;
11 | @interface OrdinateView : UIView
12 |
13 | /**
14 | init
15 |
16 | @param frame frame
17 | @param topNumber top number in ordinate View
18 | @param bottomNumber bottom number in ordinate View
19 | @return ordinate View instance
20 | */
21 | - (instancetype)initWithFrame:(CGRect)frame
22 | topNumber:(NSNumber*)topNumber
23 | bottomNumber:(NSNumber*)bottomNumber;
24 |
25 | /**
26 | init
27 |
28 | @param frame frame
29 | @param topNumber top number in ordinate View
30 | @param bottomNumber bottom number in ordinate View
31 | @configuration configuration
32 | @return ordinate View instance
33 | */
34 | - (instancetype)initWithFrame:(CGRect)frame
35 | topNumber:(NSNumber*)topNumber
36 | bottomNumber:(NSNumber*)bottomNumber
37 | configuration:(XBaseChartConfiguration *)configuration;
38 | @end
39 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/UIGestureRecognizer+XGesHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+XXGes.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIGestureRecognizer (XXGes)
12 |
13 | @property(nonatomic, strong) NSNumber* hasTapedBoolNumber;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAbscissaView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAbscissaView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define AbscissaHeight 40
12 |
13 | @interface XAbscissaView : UIView
14 |
15 | /**
16 | init
17 |
18 | @param frame frame
19 | @param dataItemArray datas
20 | @return XAbscissaView instance
21 | */
22 | - (instancetype)initWithFrame:(CGRect)frame
23 | dataItemArray:(NSMutableArray*)dataItemArray;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAlignLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAlignLabel.h
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | XVerticalAlignmentTop = 0, //default
13 | XVerticalAlignmentMiddle,
14 | XVerticalAlignmentBottom,
15 |
16 | } XVerticalAlignment;
17 |
18 | @interface XAlignLabel : UILabel
19 | @property (nonatomic) XVerticalAlignment verticalAlignment;
20 | @end
21 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimation.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 06/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface XAnimation : NSObject
13 | + (instancetype)shareInstance;
14 | - (void)addLSSpringFrameAnimation:(CALayer*)layer;
15 | - (void)addLSSpringScaleAnimation:(UIView*)view;
16 | + (CABasicAnimation*)morphAnimationFromPath:(UIBezierPath*)fromPath
17 | toPath:(UIBezierPath*)toPath
18 | duration:(CGFloat)duration;
19 | + (CABasicAnimation*)frameAnimatonFromRect:(CGRect)fromRect
20 | toRect:(CGRect)toRect
21 | duration:(CGFloat)duration;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAnimationLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimationLabel.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 24/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XAlignLabel.h"
11 | @interface XAnimationLabel : XAlignLabel
12 |
13 | /**
14 | Start number animation
15 |
16 | The Begin Number is XAnimationLabel.text number value
17 |
18 | @param to End point
19 | @param duration Animation duration
20 | */
21 | - (void)countFromCurrentTo:(CGFloat)to duration:(CGFloat)duration;
22 |
23 | /**
24 | Initialize the XAnimationLabel on the CGPoint Top
25 | Quick Use for Chart number
26 |
27 | @param point point for location
28 | @param text number string. eg: @"12". As the start number.
29 | @param textColor Text Color
30 | @param fillColor backgroundColor
31 | @return label
32 | */
33 | + (XAnimationLabel*)topLabelWithPoint:(CGPoint)point
34 | text:(NSString*)text
35 | textColor:(UIColor*)textColor
36 | fillColor:(UIColor*)fillColor;
37 |
38 | /**
39 | Initialize the XAnimationLabel
40 | Quick Use for Chart number
41 |
42 | @param frame Label Frame
43 | @param text number string. eg: @"12". As the start number.
44 | @param textColor Text Color
45 | @param fillColor backgroundColor
46 | @return label
47 | */
48 | + (XAnimationLabel*)topLabelWithFrame:(CGRect)frame
49 | text:(NSString*)text
50 | textColor:(UIColor*)textColor
51 | fillColor:(UIColor*)fillColor;
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAnimationPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimationPath.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 31/07/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XAnimationPath : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAnimator.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimator.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 05/07/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #ifdef AH_EASING_USE_DBL_PRECIS
12 | #define AH_FLOAT_TYPE double
13 | #else
14 | #define AH_FLOAT_TYPE float
15 | #endif
16 | typedef AH_FLOAT_TYPE AHFloat;
17 | typedef AHFloat (*AHEasingFunction)(AHFloat);
18 |
19 | typedef NS_ENUM(NSUInteger, XTimingFunctionsType) {
20 | XLinearInterpolation,
21 | XQuadraticEaseIn,
22 | XQuadraticEaseOut,
23 | XQuadraticEaseInOut,
24 | XCubicEaseIn,
25 | XCubicEaseOut,
26 | XCubicEaseInOut,
27 | XQuarticEaseIn,
28 | XQuarticEaseOut,
29 | XQuarticEaseInOut,
30 | XQuinticEaseIn,
31 | XSineEaseIn,
32 | XSineEaseOut,
33 | XSineEaseInOut,
34 | XCircularEaseIn,
35 | XCircularEaseOut,
36 | XCircularEaseInOut,
37 | XExponentialEaseIn,
38 | XExponentialEaseOut,
39 | XExponentialEaseInOut,
40 | XElasticEaseIn,
41 | XElasticEaseOut,
42 | XElasticEaseInOut,
43 | XBackEaseIn,
44 | XBackEaseOut,
45 | XBackEaseInOut,
46 | XBounceEaseIn,
47 | XBounceEaseOut,
48 | XBounceEaseInOut,
49 | };
50 |
51 | @protocol XAnimationDelegate
52 |
53 | - (void)animationAfterIteration;
54 |
55 | @end
56 |
57 | typedef void (^AnimatorPercentageBlock)(CGFloat percentage);
58 | typedef void (^AnimatorCurrentValueBlock)(CGFloat result);
59 | @interface XAnimator : NSObject
60 |
61 | @property(nonatomic, weak) id animationDeleagte;
62 |
63 | - (void)AnimatorDuration:(CGFloat)duration
64 | timingFuncType:(XTimingFunctionsType)timingFuncType
65 | animationBlock:(AnimatorPercentageBlock)block;
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAreaLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAreaLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 | @interface XAreaLineChartConfiguration : XLineChartConfiguration
11 |
12 | /// CGColorRef Array
13 | /// default is @[(__bridge id)[UIColor steelBlueColor].CGColor,(__bridge id)[UIColor whiteColor].CGColor];
14 | @property(nonatomic, strong) NSArray* gradientColors;
15 |
16 | /// defalut is YES
17 | @property(nonatomic, assign) BOOL isShowPoint;
18 |
19 | /// defalut is 0.5
20 | @property(nonatomic, assign) CGFloat areaLineAlpha;
21 | @property(nonatomic, assign) BOOL isEnableNumberLabel;
22 | @end
23 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XAreaLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAreaLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 09/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XAreaLineChartConfiguration.h"
13 |
14 | @interface XAreaLineContainerView : UIView
15 | - (instancetype)initWithFrame:(CGRect)frame
16 | dataItemArray:(NSMutableArray*)dataItemArray
17 | topNumber:(NSNumber*)topNumber
18 | bottomNumber:(NSNumber*)bottomNumber
19 | configuration:(XAreaLineChartConfiguration*)configuration;
20 | /**
21 | dataItemArray
22 | */
23 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
24 | /**
25 | 纵坐标最高点
26 | */
27 | @property(nonatomic, strong) NSNumber* top;
28 |
29 | /**
30 | 纵坐标最低点
31 | */
32 | @property(nonatomic, strong) NSNumber* bottom;
33 |
34 | /**
35 | 图表的其他配置
36 | */
37 | @property(nonatomic, strong) XAreaLineChartConfiguration* configuration;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBarChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 | @class XBarChartConfiguration;
14 | @interface XBarChart : UIView
15 |
16 | // delegate
17 | @property(nonatomic, strong) id barChartDeleagte;
18 |
19 | /**
20 | 初始化方法
21 |
22 | @param frame frame
23 | @param dataItemArray items
24 | @param topNumbser top
25 | @param bottomNumber buttom
26 | @param configuration configuration , or nil to use default
27 | @return instancetype
28 | */
29 | - (instancetype)initWithFrame:(CGRect)frame
30 | dataItemArray:(NSMutableArray*)dataItemArray
31 | topNumber:(NSNumber*)topNumbser
32 | bottomNumber:(NSNumber*)bottomNumber
33 | chartConfiguration:(XBarChartConfiguration*)configuration;
34 |
35 |
36 | /**
37 | dataItemArray
38 | */
39 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
40 |
41 | /**
42 | 纵坐标最高点
43 | */
44 | @property(nonatomic, strong) NSNumber* top;
45 |
46 | /**
47 | 纵坐标最低点
48 | */
49 | @property(nonatomic, strong) NSNumber* bottom;
50 |
51 | /**
52 | ChartBackground color
53 | */
54 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
55 |
56 | @property(nonatomic, strong) XBarChartConfiguration *configuration;
57 | @end
58 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBarChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBarChartConfiguration : XBaseChartConfiguration
12 |
13 | /// defalut is auto calculate x width
14 | @property(nonatomic, assign) CGFloat x_width;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBarChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 15/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | @class XBarChartConfiguration;
12 | @interface XBarChartView : UIScrollView
13 |
14 | /**
15 | 初始化方法
16 |
17 | @param frame frame
18 | @param dataItemArray items
19 | @param topNumbser top
20 | @param bottomNumber buttom
21 | @param configuration chartConfiguration
22 | @return instancetype
23 | */
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | dataItemArray:(NSMutableArray*)dataItemArray
26 | topNumber:(NSNumber*)topNumbser
27 | bottomNumber:(NSNumber*)bottomNumber
28 | chartConfiguration:(XBarChartConfiguration *)configuration;
29 |
30 | /**
31 | dataItemArray
32 | */
33 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
34 | /**
35 | 纵坐标最高点
36 | */
37 | @property(nonatomic, strong) NSNumber* top;
38 |
39 | /**
40 | 纵坐标最低点
41 | */
42 | @property(nonatomic, strong) NSNumber* bottom;
43 |
44 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
45 | @property(nonatomic, strong) XBarChartConfiguration* configuration;
46 | @end
47 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBarContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | @class XBarChartConfiguration;
12 | @interface XBarContainerView : UIView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | dataItemArray:(NSMutableArray*)dataItemArray
16 | topNumber:(NSNumber*)topNumbser
17 | bottomNumber:(NSNumber*)bottomNumber
18 | chartConfiguration:(XBarChartConfiguration*)configuration;
19 | /**
20 | dataItemArray
21 | */
22 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
23 | /**
24 | 纵坐标最高点
25 | */
26 | @property(nonatomic, strong) NSNumber* top;
27 |
28 | /**
29 | 纵坐标最低点
30 | */
31 | @property(nonatomic, strong) NSNumber* bottom;
32 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
33 | @property(nonatomic, strong) XBarChartConfiguration* configuration;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBarItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 23/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBarItem : NSObject
12 | @property(nonatomic, strong) UIColor* color;
13 | @property(nonatomic, strong) NSNumber* dataNumber;
14 | @property(nonatomic, strong) NSString* dataDescribe;
15 |
16 | /**
17 | 设置数据item
18 |
19 | @param dataNumber (NSNumber *)dataNumber
20 | @param color (UIColor *)color
21 | @param dataDescribe (NSString *)dataDescribe
22 | @return instancetype
23 | */
24 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
25 | color:(UIColor*)color
26 | dataDescribe:(NSString*)dataDescribe;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XBaseChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBaseChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBaseChartConfiguration : NSObject
12 |
13 | /// defalut is white
14 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
15 | @property(nonatomic, assign) NSUInteger ordinateDenominator;
16 | @property(nonatomic, assign) BOOL isScrollable;
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XCycleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TBCycleView.h
3 | // TBCycleProgress
4 | //
5 | // Created by qianjianeng on 16/2/22.
6 | // Copyright © 2016年 SF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol XCycleViewDelegate
12 |
13 | /**
14 | ratio
15 | @param ratio 0.0 ~ 1.0
16 | */
17 | - (void)ratioChange:(CGFloat)ratio;
18 |
19 | @end
20 |
21 | @interface XCycleView : UIControl
22 | /// progress 0.0 ~ 1.0
23 | @property(nonatomic, assign) CGFloat progress;
24 |
25 | @property(nonatomic, weak) id cycleViewDeleagte;
26 | @end
27 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XEnumHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // XEnumHeader.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #ifndef XEnumHeader_h
10 | #define XEnumHeader_h
11 |
12 | typedef NS_ENUM(NSUInteger, XLineMode) {
13 | Straight,
14 | CurveLine,
15 |
16 | };
17 |
18 | typedef NS_ENUM(NSUInteger, XLineGraphMode) {
19 | MutiLineGraph,
20 | AreaLineGraph,
21 | StackAreaLineGraph,
22 | };
23 |
24 | #endif /* XEnumHeader_h */
25 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XJYChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #ifndef XJYChart_h
10 | #define XJYChart_h
11 | #import "XPieChart.h"
12 | #import "XBarChart.h"
13 | #import "XLineChart.h"
14 | #import "XCycleView.h"
15 | #import "XPieItem.h"
16 | #import "XBarItem.h"
17 | #import "XLineChartItem.h"
18 | #import "XJYChartDelegate.h"
19 | #import "XColor.h"
20 | #import "XRandomNumerHelper.h"
21 | #import "XEnumHeader.h"
22 | #import "XPositiveNegativeBarChart.h"
23 | #import "XNormalLineChartConfiguration.h"
24 | #import "XAreaLineChartConfiguration.h"
25 | #import "XStackAreaLineChartConfiguration.h"
26 | #import "XBarChartConfiguration.h"
27 | #import "XStackAreaLineContainerView.h"
28 | #import "CAKeyframeAnimation+AHEasing.h"
29 | #import "XAnimation.h"
30 | #import "XBarContainerView.h"
31 | #import "XPointDetect.h"
32 | #import "CAShapeLayer+XLayerHelper.h"
33 | #import "XPositiveNegativeBarContainerView.h"
34 | #import "XBarChartView.h"
35 | #import "XLineContainerView.h"
36 | #import "XAnimator.h"
37 | #import "OrdinateView.h"
38 | #import "UIGestureRecognizer+XGesHelper.h"
39 | #import "XAnimationLabel.h"
40 | #import "XAreaLineContainerView.h"
41 | #import "XPositiveNegativeBarChartView.h"
42 | #import "XAuxiliaryCalculationHelper.h"
43 | #import "XAnimationPath.h"
44 | #import "CALayer+XLayerSelectHelper.h"
45 | #import "XAbscissaView.h"
46 | #import "XNotificationBridge.h"
47 |
48 | #endif /* XJYChart_h */
49 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XJYChartDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYChartDelegate.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol XJYChartDelegate
12 | @optional
13 |
14 | /**
15 | * Touch Bar
16 | */
17 | - (void)userClickedOnBarAtIndex:(NSInteger)barIndex;
18 |
19 | /**
20 | * Touch Pie
21 | */
22 | - (void)userClickedOnPieIndexItem:(NSInteger)pieIndex;
23 | - (void)didUnselectPieItem;
24 | @end
25 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XLineChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXLineChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartView.h"
11 | #import "XEnumHeader.h"
12 | #import "XLineChartItem.h"
13 | #import "XLineChartConfiguration.h"
14 |
15 | @interface XLineChart : UIView
16 |
17 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
18 |
19 | /// tap and pin gesture
20 | @property(nonatomic, assign) BOOL isAllowGesture;
21 |
22 | @property(nonatomic, strong) XLineChartConfiguration* configuration;
23 |
24 |
25 | /**
26 | Line Graph Mode
27 | - MutiLine
28 | - GraphLine
29 |
30 | Default is MutiLine
31 | */
32 | @property(nonatomic, assign) XLineGraphMode lineGraphMode;
33 |
34 | /**
35 | XXLineChart初始化方法
36 | */
37 | - (instancetype)initWithFrame:(CGRect)frame
38 | dataItemArray:(NSMutableArray*)dataItemArray
39 | dataDiscribeArray:(NSMutableArray*)dataDiscribeArray
40 | topNumber:(NSNumber*)topNumbser
41 | bottomNumber:(NSNumber*)bottomNumber
42 | graphMode:(XLineGraphMode)graphMode;
43 | - (instancetype)initWithFrame:(CGRect)frame
44 | dataItemArray:(NSMutableArray*)dataItemArray
45 | dataDiscribeArray:(NSMutableArray*)dataDiscribeArray
46 | topNumber:(NSNumber*)topNumbser
47 | bottomNumber:(NSNumber*)bottomNumber
48 | graphMode:(XLineGraphMode)graphMode
49 | chartConfiguration:(XLineChartConfiguration*)configuration;
50 | @end
51 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XBaseChartConfiguration.h"
10 | #import "XEnumHeader.h"
11 |
12 | @interface XLineChartConfiguration : XBaseChartConfiguration
13 |
14 | /**
15 | Line Mode
16 | - Straight
17 | - CurveLine
18 |
19 | Default is Straight
20 |
21 | */
22 | @property(nonatomic, assign) XLineMode lineMode;
23 |
24 | /// defalut is [UIColor black75PercentColor]
25 | @property(nonatomic, strong) UIColor* auxiliaryDashLineColor;
26 |
27 | /// defalut is YES
28 | @property(nonatomic, assign) BOOL isShowAuxiliaryDashLine;
29 |
30 | /// if enable number
31 | /// ,touch height failure
32 | @property(nonatomic, assign) BOOL isEnableNumberLabel;
33 |
34 | @property(nonatomic, strong) UIColor *numberLabelColor;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XLineChartItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XLineChartItem : NSObject
12 |
13 | @property(nonatomic, strong) UIColor* color;
14 | @property(nonatomic, strong) NSMutableArray* numberArray;
15 | /**
16 | 设置数据item
17 |
18 | @param numberArray (NSNumber *)dataNumber
19 | @param color (UIColor *)color
20 | @return instancetype
21 | */
22 | - (instancetype)initWithDataNumberArray:(NSMutableArray*)numberArray
23 | color:(UIColor*)color;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XLineChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XNormalLineChartConfiguration.h"
13 | @interface XLineChartView : UIScrollView
14 | /**
15 | 初始化方法
16 |
17 | @param frame frame
18 | @param dataItemArray items
19 | @param dataDescribeArray dataDescribeArray
20 | @param topNumbser top
21 | @param bottomNumber buttom
22 | @param configuration LineChartConfiguration
23 | @return instancetype
24 | */
25 | - (instancetype)initWithFrame:(CGRect)frame
26 | dataItemArray:(NSMutableArray*)dataItemArray
27 | dataDescribeArray:(NSMutableArray*)dataDescribeArray
28 | topNumber:(NSNumber*)topNumbser
29 | bottomNumber:(NSNumber*)bottomNumber
30 | graphMode:(XLineGraphMode)graphMode
31 | configuration:(XLineChartConfiguration*)configuration;
32 |
33 | /**
34 | dataItemArray
35 | */
36 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
37 |
38 | @property(nonatomic, strong) NSMutableArray* dataDescribeArray;
39 | /**
40 | The vertical high
41 | */
42 | @property(nonatomic, strong) NSNumber* top;
43 |
44 | /**
45 | The vertical low
46 | */
47 | @property(nonatomic, strong) NSNumber* bottom;
48 |
49 |
50 | @property(nonatomic, strong) XLineChartConfiguration* configuration;
51 |
52 | /**
53 | Line Graph Mode
54 | - MutiLine
55 | - GraphLine
56 |
57 | Default is MutiLine
58 | */
59 | @property(nonatomic, assign) XLineGraphMode lineGraphMode;
60 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XNormalLineChartConfiguration.h"
13 |
14 | @interface XLineContainerView : UIView
15 |
16 | - (instancetype)initWithFrame:(CGRect)frame
17 | dataItemArray:(NSMutableArray*)dataItemArray
18 | topNumber:(NSNumber*)topNumber
19 | bottomNumber:(NSNumber*)bottomNumber
20 | configuration:(XLineChartConfiguration*)configuration;
21 | /**
22 | dataItemArray
23 | */
24 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
25 | /**
26 | 纵坐标最高点
27 | */
28 | @property(nonatomic, strong) NSNumber* top;
29 |
30 | /**
31 | 纵坐标最低点
32 | */
33 | @property(nonatomic, strong) NSNumber* bottom;
34 | /**
35 | 图表的其他配置
36 | */
37 | @property(nonatomic, strong) XNormalLineChartConfiguration* configuration;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XNormalLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XNormalLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 |
11 | @interface XNormalLineChartConfiguration : XLineChartConfiguration
12 |
13 | /// defalut is NO
14 | @property(nonatomic, assign) BOOL isShowCoordinate;
15 |
16 | /// if isShowShadow == YES
17 | /// line path animation will Disable
18 | @property(nonatomic, assign) BOOL isShowShadow;
19 |
20 | @property(nonatomic, assign) BOOL isShowPoint;
21 | @end
22 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XNotificationBridge.h:
--------------------------------------------------------------------------------
1 | //
2 | // XNotificationBridge.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 03/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | Cross layer using the same Notification info
13 | */
14 | @interface XNotificationBridge : NSObject
15 |
16 | + (instancetype)shareXNotificationBridge;
17 |
18 | /// BarChart
19 | @property(nonatomic, strong) NSString* TouchBarNotification;
20 | @property(nonatomic, strong) NSString* BarIdxNumberKey;
21 |
22 | /// PositiveNegativeBarChart
23 | @property(nonatomic, strong) NSString* TouchPNBarNotification;
24 | @property(nonatomic, strong) NSString* PNBarIdxNumberKey;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYPieChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XPieItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 | //颜色
14 |
15 | #define UIColorFromRGBHex(rgbValue) \
16 | [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
17 | green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
18 | blue:((float)(rgbValue & 0xFF)) / 255.0 \
19 | alpha:1.0]
20 | @interface XPieChart : UIView
21 |
22 | - (void)refreshChart;
23 |
24 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
25 | @property(nonatomic, weak) id delegate;
26 |
27 | /**
28 | enableAnimation
29 | Default is YES
30 | */
31 | @property(nonatomic, assign) BOOL enableAnimation;
32 |
33 | /**
34 | descriptionTextFont default is 10
35 | */
36 | @property(nonatomic) UIFont* descriptionTextFont;
37 |
38 | /**
39 | descriptionTextColor default is blackColor
40 | */
41 | @property(nonatomic) UIColor* descriptionTextColor;
42 | /** Default clear Color. */
43 | @property(nonatomic) UIColor* descriptionTextShadowColor;
44 | /** Default is CGSizeMake(0, 0). */
45 | @property(nonatomic) CGSize descriptionTextShadowOffset;
46 |
47 | /**
48 | should High light Sector On Touch default is YES
49 | */
50 | @property(nonatomic, assign) BOOL shouldHighlightSectorOnTouch;
51 |
52 | /**
53 | enable Multiple Selection default is NO
54 | */
55 | @property(nonatomic, assign) BOOL enableMultipleSelection;
56 |
57 | /**
58 | show Absolute Values
59 | Default is NO
60 | */
61 | @property(nonatomic, assign) BOOL showAbsoluteValues;
62 |
63 | /**
64 | hide Value Labels
65 | Default is NO
66 | */
67 | @property(nonatomic, assign) BOOL hideValueLabels;
68 |
69 | /**
70 | only Show Values
71 | default is NO
72 | */
73 | @property(nonatomic, assign) BOOL onlyShowValues;
74 | @end
75 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPieItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPieItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XPieItem : NSObject
12 |
13 | @property(nonatomic, strong) UIColor* color;
14 | @property(nonatomic, strong) NSNumber* dataNumber;
15 | @property(nonatomic, strong) NSString* dataDescribe;
16 |
17 | /**
18 | 设置数据item
19 |
20 | @param dataNumber (NSNumber *)dataNumber
21 | @param color (UIColor *)color
22 | @param dataDescribe (NSString *)dataDescribe
23 | @return instancetype
24 | */
25 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
26 | color:(UIColor*)color
27 | dataDescribe:(NSString*)dataDescribe;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPointDetect.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPointDetect.h
3 | // RecordLife
4 | //
5 | // Created by JunyiXie on 2017/11/25.
6 | // Copyright © 2017年 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface XPointDetect : NSObject
13 |
14 | /**
15 | Detect Point whether in area
16 | The gradient range expand
17 | @param point target
18 | @param area 4 CGPoint values array
19 | @return BOOL
20 | */
21 | + (BOOL)detectPoint:(CGPoint)point InExpandArea:(NSArray*)area;
22 |
23 | + (BOOL)point:(CGPoint)point inArea:(NSArray*)area;
24 |
25 | + (NSArray*)expandRectArea:(NSArray*)area
26 | expandLength:(CGFloat)length;
27 | @end
28 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPositiveNegativeBarChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXPositiveNegativeBarChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 |
14 | @interface XPositiveNegativeBarChart : UIView
15 | /**
16 | 初始化方法
17 |
18 | @param frame frame
19 | @param dataItemArray items
20 | @param topNumbser top
21 | @param bottomNumber buttom
22 | @return instancetype
23 | */
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | dataItemArray:(NSMutableArray*)dataItemArray
26 | topNumber:(NSNumber*)topNumbser
27 | bottomNumber:(NSNumber*)bottomNumber;
28 | @property(nonatomic, strong) id barChartDeleagte;
29 |
30 | /**
31 | dataItemArray
32 | */
33 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
34 |
35 | /**
36 | 纵坐标最高点
37 | */
38 | @property(nonatomic, strong) NSNumber* top;
39 |
40 | /**
41 | 纵坐标最低点
42 | */
43 | @property(nonatomic, strong) NSNumber* bottom;
44 | @end
45 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPositiveNegativeBarChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXPositiveNegativeBarChartView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 |
12 | @interface XPositiveNegativeBarChartView : UIScrollView
13 | /**
14 | 初始化方法
15 |
16 | @param frame frame
17 | @param dataItemArray items
18 | @param topNumbser top
19 | @param bottomNumber buttom
20 | @return instancetype
21 | */
22 | - (instancetype)initWithFrame:(CGRect)frame
23 | dataItemArray:(NSMutableArray*)dataItemArray
24 | topNumber:(NSNumber*)topNumbser
25 | bottomNumber:(NSNumber*)bottomNumber;
26 |
27 | /**
28 | dataItemArray
29 | */
30 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
31 | /**
32 | 纵坐标最高点
33 | */
34 | @property(nonatomic, strong) NSNumber* top;
35 |
36 | /**
37 | 纵坐标最低点
38 | */
39 | @property(nonatomic, strong) NSNumber* bottom;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XPositiveNegativeBarContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPositiveNegativeBarContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 |
12 | @interface XPositiveNegativeBarContainerView : UIView
13 | - (instancetype)initWithFrame:(CGRect)frame
14 | dataItemArray:(NSMutableArray*)dataItemArray
15 | topNumber:(NSNumber*)topNumbser
16 | bottomNumber:(NSNumber*)bottomNumber;
17 | /**
18 | dataItemArray
19 | */
20 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
21 | /**
22 | 纵坐标最高点
23 | */
24 | @property(nonatomic, strong) NSNumber* top;
25 |
26 | /**
27 | 纵坐标最低点
28 | */
29 | @property(nonatomic, strong) NSNumber* bottom;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XRandomNumerHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // XRandomNumerHelper.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XRandomNumerHelper : NSObject
12 |
13 | /**
14 | Singleton
15 |
16 | @return Singleton
17 | */
18 | + (instancetype)shareRandomNumberHelper;
19 |
20 | /**
21 | a number small than max
22 |
23 | @param max max
24 | @return number
25 | */
26 | - (int)randomNumberSmallThan:(NSInteger)max;
27 | @end
28 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XStackAreaLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XStackAreaLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 |
11 | @interface XStackAreaLineChartConfiguration : XLineChartConfiguration
12 |
13 | /// defalut is 1.0
14 | @property(nonatomic, assign) CGFloat areaLineAlpha;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Headers/XStackAreaLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XStackAreaLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XStackAreaLineChartConfiguration.h"
13 |
14 | @interface XStackAreaLineContainerView : UIView
15 | - (instancetype)initWithFrame:(CGRect)frame
16 | dataItemArray:(NSMutableArray*)dataItemArray
17 | topNumber:(NSNumber*)topNumber
18 | bottomNumber:(NSNumber*)bottomNumber
19 | configuration:(XStackAreaLineChartConfiguration *)configuration;
20 | /**
21 | dataItemArray
22 | */
23 | @property (nonatomic, strong) NSMutableArray *dataItemArray;
24 | /**
25 | 纵坐标最高点
26 | */
27 | @property (nonatomic, strong) NSNumber *top;
28 |
29 | /**
30 | 纵坐标最低点
31 | */
32 | @property (nonatomic, strong) NSNumber *bottom;
33 | /**
34 | 图表的其他配置
35 | */
36 | @property(nonatomic, strong) XStackAreaLineChartConfiguration *configuration;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/Products/XJYChart.framework/Info.plist
--------------------------------------------------------------------------------
/Products/XJYChart.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module XJYChart {
2 | umbrella header "XJYChart.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Products/XJYChart.framework/XJYChart:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/Products/XJYChart.framework/XJYChart
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/project.xcworkspace/xcuserdata/junyixie.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChart.xcodeproj/project.xcworkspace/xcuserdata/junyixie.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/xcshareddata/xcschemes/Colours.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/xcshareddata/xcschemes/XJYChart.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/xcuserdata/junyixie.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Colours.xcscheme
8 |
9 | orderHint
10 | 3
11 |
12 | XJYChart.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 | XJYChartTests.xcscheme
18 |
19 | orderHint
20 | 7
21 |
22 | target.xcscheme
23 |
24 | orderHint
25 | 2
26 |
27 |
28 | SuppressBuildableAutocreation
29 |
30 | 3FAFF11F1FCD609000CBEA39
31 |
32 | primary
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/XJYChart.xcodeproj/xcuserdata/xiejunyi.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Colours.xcscheme
8 |
9 | orderHint
10 | 3
11 |
12 | XJYChart.xcscheme
13 |
14 | orderHint
15 | 1
16 |
17 | target.xcscheme
18 |
19 | orderHint
20 | 0
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/XJYChart.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/XJYChart.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/XJYChart/Animator/XAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimation.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 06/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface XAnimation : NSObject
13 | + (instancetype)shareInstance;
14 | - (void)addLSSpringFrameAnimation:(CALayer*)layer;
15 | - (void)addLSSpringScaleAnimation:(UIView*)view;
16 | + (CABasicAnimation*)morphAnimationFromPath:(UIBezierPath*)fromPath
17 | toPath:(UIBezierPath*)toPath
18 | duration:(CGFloat)duration;
19 | + (CABasicAnimation*)frameAnimatonFromRect:(CGRect)fromRect
20 | toRect:(CGRect)toRect
21 | duration:(CGFloat)duration;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/XJYChart/Animator/XAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimation.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 06/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XAnimation.h"
10 | //#import "LSAnimator.h"
11 | @implementation XAnimation
12 |
13 | + (instancetype)shareInstance {
14 | static XAnimation* ivar = nil;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | ivar = [XAnimation new];
18 | });
19 | return ivar;
20 | }
21 |
22 | + (CABasicAnimation*)morphAnimationFromPath:(UIBezierPath*)fromPath
23 | toPath:(UIBezierPath*)toPath
24 | duration:(CGFloat)duration {
25 | CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath:@"path"];
26 | animation.duration = duration;
27 | animation.timingFunction = [CAMediaTimingFunction
28 | functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
29 | animation.fromValue = (id)fromPath.CGPath;
30 | animation.toValue = (id)toPath.CGPath;
31 |
32 | return animation;
33 | }
34 |
35 | + (CABasicAnimation*)frameAnimatonFromRect:(CGRect)fromRect
36 | toRect:(CGRect)toRect
37 | duration:(CGFloat)duration {
38 | CABasicAnimation* animation =
39 | [CABasicAnimation animationWithKeyPath:@"frame"];
40 | animation.duration = duration;
41 | animation.timingFunction = [CAMediaTimingFunction
42 | functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
43 | animation.fromValue = (id)[NSValue valueWithCGRect:fromRect];
44 | animation.toValue = (id)[NSValue valueWithCGRect:toRect];
45 |
46 | return animation;
47 | }
48 |
49 | - (void)addLSSpringFrameAnimation:(CALayer*)layer {
50 | // layer.ls_spring.ls_scale(1.1).ls_spring.ls_thenAfter(0.3).ls_scale(1.0/1.1).ls_spring.ls_animate(1);
51 | }
52 |
53 | - (void)addLSSpringScaleAnimation:(UIView*)view {
54 | // view.ls_spring.ls_scale(1.1).ls_spring.ls_thenAfter(0.3).ls_scale(1.0/1.1).ls_spring.ls_animate(1);
55 | }
56 |
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/XJYChart/Animator/XAnimationPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimationPath.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 31/07/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XAnimationPath : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChart/Animator/XAnimationPath.m:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimationPath.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 31/07/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XAnimationPath.h"
10 |
11 | @implementation XAnimationPath
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChart/Animator/XAnimator.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimator.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 05/07/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #ifdef AH_EASING_USE_DBL_PRECIS
12 | #define AH_FLOAT_TYPE double
13 | #else
14 | #define AH_FLOAT_TYPE float
15 | #endif
16 | typedef AH_FLOAT_TYPE AHFloat;
17 | typedef AHFloat (*AHEasingFunction)(AHFloat);
18 |
19 | typedef NS_ENUM(NSUInteger, XTimingFunctionsType) {
20 | XLinearInterpolation,
21 | XQuadraticEaseIn,
22 | XQuadraticEaseOut,
23 | XQuadraticEaseInOut,
24 | XCubicEaseIn,
25 | XCubicEaseOut,
26 | XCubicEaseInOut,
27 | XQuarticEaseIn,
28 | XQuarticEaseOut,
29 | XQuarticEaseInOut,
30 | XQuinticEaseIn,
31 | XSineEaseIn,
32 | XSineEaseOut,
33 | XSineEaseInOut,
34 | XCircularEaseIn,
35 | XCircularEaseOut,
36 | XCircularEaseInOut,
37 | XExponentialEaseIn,
38 | XExponentialEaseOut,
39 | XExponentialEaseInOut,
40 | XElasticEaseIn,
41 | XElasticEaseOut,
42 | XElasticEaseInOut,
43 | XBackEaseIn,
44 | XBackEaseOut,
45 | XBackEaseInOut,
46 | XBounceEaseIn,
47 | XBounceEaseOut,
48 | XBounceEaseInOut,
49 | };
50 |
51 | @protocol XAnimationDelegate
52 |
53 | - (void)animationAfterIteration;
54 |
55 | @end
56 |
57 | typedef void (^AnimatorPercentageBlock)(CGFloat percentage);
58 | typedef void (^AnimatorCurrentValueBlock)(CGFloat result);
59 | @interface XAnimator : NSObject
60 |
61 | @property(nonatomic, weak) id animationDelegate;
62 |
63 | - (void)AnimatorDuration:(CGFloat)duration
64 | timingFuncType:(XTimingFunctionsType)timingFuncType
65 | animationBlock:(AnimatorPercentageBlock)block;
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/XJYChart/CALayerTouch/XPointDetect.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPointDetect.h
3 | // RecordLife
4 | //
5 | // Created by JunyiXie on 2017/11/25.
6 | // Copyright © 2017年 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface XPointDetect : NSObject
13 |
14 | /**
15 | Detect Point whether in area
16 | The gradient range expand
17 | @param point target
18 | @param area 4 CGPoint values array
19 | @return BOOL
20 | */
21 | + (BOOL)detectPoint:(CGPoint)point InExpandArea:(NSArray*)area;
22 |
23 | + (BOOL)point:(CGPoint)point inArea:(NSArray*)area;
24 |
25 | + (NSArray*)expandRectArea:(NSArray*)area
26 | expandLength:(CGFloat)length;
27 | @end
28 |
--------------------------------------------------------------------------------
/XJYChart/CALayerTouch/XPointDetect.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPointDetect.m
3 | // RecordLife
4 | //
5 | // Created by JunyiXie on 2017/11/25.
6 | // Copyright © 2017年 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XPointDetect.h"
10 | #import "XAuxiliaryCalculationHelper.h"
11 | @implementation XPointDetect
12 |
13 | #pragma mark Touch Expand algorithm
14 | /*
15 | * 新的算法
16 | * 逐级扩展范围
17 | * 仅仅做了4点 扩散
18 | */
19 |
20 | + (BOOL)detectPoint:(CGPoint)point InExpandArea:(NSArray*)area {
21 | BOOL result = NO;
22 | return result = [self point:point inArea:[self expandRectArea:area expandLength:10]]
23 | ?: [self point:point inArea:[self expandRectArea:area expandLength:30]]
24 | ?: [self point:point inArea:[self expandRectArea:area expandLength:60]]
25 | ?: [self point:point inArea:[self expandRectArea:area expandLength:100]]
26 | ?: [self point:point inArea:[self expandRectArea:area expandLength:140]]
27 | ?: [self point:point inArea:[self expandRectArea:area expandLength:200]];
28 | }
29 |
30 | + (BOOL)point:(CGPoint)point inArea:(NSArray*)area {
31 | if ([[XAuxiliaryCalculationHelper shareCalculationHelper]
32 | containPoint:[NSValue valueWithCGPoint:point]
33 | Points:[NSMutableArray arrayWithArray:area]]) {
34 | return YES;
35 | } else {
36 | return NO;
37 | }
38 | }
39 | + (NSArray*)expandRectArea:(NSArray*)area
40 | expandLength:(CGFloat)length {
41 | CGPoint originP1 = area[0].CGPointValue;
42 | CGPoint originP2 = area[1].CGPointValue;
43 | CGPoint originP3 = area[2].CGPointValue;
44 | CGPoint originP4 = area[3].CGPointValue;
45 |
46 | CGPoint rectPoint1 =
47 | CGPointMake(originP1.x - length / 2, originP1.y - length / 2);
48 | NSValue* value1 = [NSValue valueWithCGPoint:rectPoint1];
49 | CGPoint rectPoint2 =
50 | CGPointMake(originP2.x - length / 2, originP2.y + length / 2);
51 | NSValue* value2 = [NSValue valueWithCGPoint:rectPoint2];
52 | CGPoint rectPoint3 =
53 | CGPointMake(originP3.x + length / 2, originP3.y - length / 2);
54 | NSValue* value3 = [NSValue valueWithCGPoint:rectPoint3];
55 | CGPoint rectPoint4 =
56 | CGPointMake(originP4.x + length / 2, originP4.y + length / 2);
57 | NSValue* value4 = [NSValue valueWithCGPoint:rectPoint4];
58 |
59 | NSArray* tempoints = @[ value1, value2, value3, value4 ];
60 | NSMutableArray* points = [NSMutableArray new];
61 | for (NSValue* pointV in tempoints) {
62 | CGPoint point = pointV.CGPointValue;
63 | CGFloat pointX = point.x;
64 | CGFloat pointY = point.y;
65 | pointX > 0 ? pointX : (point.x = 0);
66 | pointY > 0 ? pointY : (point.y = 0);
67 | NSValue* value = [NSValue valueWithCGPoint:point];
68 | [points addObject:value];
69 | }
70 | return points;
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/XJYChart/Calculate/XRandomNumerHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // XRandomNumerHelper.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XRandomNumerHelper : NSObject
12 |
13 | /**
14 | Singleton
15 |
16 | @return Singleton
17 | */
18 | + (instancetype)shareRandomNumberHelper;
19 |
20 | /**
21 | a number small than max
22 |
23 | @param max max
24 | @return number
25 | */
26 | - (int)randomNumberSmallThan:(NSInteger)max;
27 | @end
28 |
--------------------------------------------------------------------------------
/XJYChart/Calculate/XRandomNumerHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // XRandomNumerHelper.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XRandomNumerHelper.h"
10 |
11 | @implementation XRandomNumerHelper
12 |
13 | + (instancetype)shareRandomNumberHelper {
14 | static XRandomNumerHelper* helper = nil;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | helper = [[XRandomNumerHelper alloc] init];
18 | });
19 | return helper;
20 | }
21 |
22 | - (int)randomNumberSmallThan:(NSInteger)max {
23 | int idx = arc4random() % max;
24 | return idx;
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XJYChart/Category/CALayer+XLayerSelectHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // CALayer+XXLayer.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 24/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CALayer (XXLayer)
12 |
13 | @property(nonatomic, strong) NSNumber* selectIdxNumber;
14 | @property(nonatomic, strong) NSValue* frameValue;
15 | @property(nonatomic, strong) NSValue* backgroundFrameValue;
16 | @property(nonatomic, strong) NSNumber* selectStatusNumber;
17 |
18 | @property(nonatomic, strong)
19 | NSMutableArray*>* segementPointsArrays;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/XJYChart/Category/CALayer+XLayerSelectHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // CALayer+XXLayer.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 24/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "CALayer+XLayerSelectHelper.h"
10 | #import
11 | @implementation CALayer (XXLayer)
12 |
13 | // selectIdx
14 | // For CAGradientLayer
15 | static char kSelectIdxNumber;
16 |
17 | - (void)setSelectIdxNumber:(id)selectIdxNumber {
18 | objc_setAssociatedObject(self, &kSelectIdxNumber, selectIdxNumber,
19 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
20 | }
21 |
22 | - (id)selectIdxNumber {
23 | return objc_getAssociatedObject(self, &kSelectIdxNumber);
24 | }
25 |
26 | // http://stackoverflow.com/questions/28447744/frame-origin-and-bounds-size-of-cashapelayer-are-set-to-0
27 | // frame
28 | static char kFrameKey;
29 |
30 | // selected status
31 | static char kSelectedStatusKey;
32 |
33 | // backgroundFrame
34 | static char kBackgroundFrameKey;
35 |
36 | // segementPointsArrays
37 | static char kSegementPointsArraysKey;
38 |
39 | - (void)setFrameValue:(id)frameValue {
40 | objc_setAssociatedObject(self, &kFrameKey, frameValue,
41 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
42 | }
43 |
44 | - (id)frameValue {
45 | return objc_getAssociatedObject(self, &kFrameKey);
46 | }
47 |
48 | - (void)setSelectStatusNumber:(id)selectStatusNumber {
49 | objc_setAssociatedObject(self, &kSelectedStatusKey, selectStatusNumber,
50 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
51 | }
52 |
53 | - (id)selectStatusNumber {
54 | return objc_getAssociatedObject(self, &kSelectedStatusKey);
55 | }
56 |
57 | - (void)setBackgroundFrameValue:(id)backgroundFrameValue {
58 | objc_setAssociatedObject(self, &kBackgroundFrameKey, backgroundFrameValue,
59 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
60 | }
61 |
62 | - (id)backgroundFrameValue {
63 | return objc_getAssociatedObject(self, &kBackgroundFrameKey);
64 | }
65 |
66 | - (void)setSegementPointsArrays:(id)segementPointsArrays {
67 | objc_setAssociatedObject(self, &kSegementPointsArraysKey,
68 | segementPointsArrays,
69 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
70 | }
71 |
72 | - (id)segementPointsArrays {
73 | return objc_getAssociatedObject(self, &kSegementPointsArraysKey);
74 | }
75 |
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/XJYChart/Category/CAShapeLayer+XLayerHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // CAShapeLayer+XJYLayerHelper.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 31/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "XEnumHeader.h"
12 | #import "XAuxiliaryCalculationHelper.h"
13 |
14 | @interface CAShapeLayer (XJYLayerHelper)
15 | + (CAShapeLayer*)rectShapeLayerWithBounds:(CGRect)rect
16 | fillColor:(UIColor*)fillColor;
17 | + (CAShapeLayer*)lineShapeLayerWithPoints:
18 | (NSMutableArray*)pointsValueArray
19 | color:(UIColor*)color
20 | lineMode:(XLineMode)lineMode
21 | lineWidth:(CGFloat)lineWidth;
22 | + (CAShapeLayer*)pointLayerWithDiameter:(CGFloat)diameter
23 | color:(UIColor*)color
24 | center:(CGPoint)center;
25 |
26 | + (CAShapeLayer*)annularPointLayerWithDiameter:(CGFloat)diameter
27 | color:(UIColor*)color
28 | center:(CGPoint)center;
29 | @end
30 |
--------------------------------------------------------------------------------
/XJYChart/Category/UIGestureRecognizer+XGesHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+XXGes.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIGestureRecognizer (XXGes)
12 |
13 | @property(nonatomic, strong) NSNumber* hasTapedBoolNumber;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/XJYChart/Category/UIGestureRecognizer+XGesHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIGestureRecognizer+XXGes.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "UIGestureRecognizer+XGesHelper.h"
10 | #import
11 |
12 | static char kHasTapBoolNumber;
13 |
14 | @implementation UIGestureRecognizer (XXGes)
15 |
16 | - (void)setHasTapedBoolNumber:(NSNumber*)hasTapedBoolNumber {
17 | objc_setAssociatedObject(self, &kHasTapBoolNumber, hasTapedBoolNumber,
18 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
19 | }
20 |
21 | - (NSNumber*)hasTapedBoolNumber {
22 | return objc_getAssociatedObject(self, &kHasTapBoolNumber);
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/Decoration/XJYNumberLabelDecoration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYNumberLabelDecoration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 11/12/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 | NS_ASSUME_NONNULL_BEGIN
11 | @class XAnimationLabel;
12 | @interface XJYNumberLabelDecoration : NSObject
13 | @property(nonatomic, weak) UIView *viewer;
14 | @property(nonatomic, strong) NSMutableArray* labelArray;
15 | - (instancetype)initWithViewer:(UIView *)viewer;
16 | - (void)drawWithPoints:(NSArray *)points TextNumbers:(NSArray *)textNumbers isEnableAnimation:(BOOL)isEnableAnimation;
17 | - (void)removeNumberLabels;
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
22 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/Decoration/XJYNumberLabelDecoration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XJYNumberLabelDecoration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 11/12/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XJYNumberLabelDecoration.h"
10 | #import "XAnimationLabel.h"
11 | #import "XColor.h"
12 | @implementation XJYNumberLabelDecoration
13 |
14 | - (instancetype)initWithViewer:(UIView *)viewer {
15 | if (self = [super init]) {
16 | _labelArray = [NSMutableArray new];
17 | _viewer = viewer;
18 | }
19 | return self;
20 | }
21 |
22 | - (void)drawWithPoints:(NSArray *)points TextNumbers:(NSArray *)textNumbers isEnableAnimation:(BOOL)isEnableAnimation {
23 | [points
24 | enumerateObjectsUsingBlock:^(
25 | NSValue* _Nonnull obj, NSUInteger idx, BOOL* _Nonnull stop) {
26 | CGPoint point = obj.CGPointValue;
27 | XAnimationLabel* label =
28 | [XAnimationLabel topLabelWithPoint:point
29 | text:@"0"
30 | textColor:XJYBlack
31 | fillColor:[UIColor clearColor]];
32 | CGFloat textNum = textNumbers[idx].doubleValue;
33 | [self.labelArray addObject:label];
34 | [self.viewer addSubview:label];
35 | [label countFromCurrentTo:textNum duration:isEnableAnimation?0.5:0];
36 | }];
37 | }
38 |
39 | - (void)removeNumberLabels {
40 | [self.labelArray enumerateObjectsUsingBlock:^(
41 | XAnimationLabel* _Nonnull obj, NSUInteger idx,
42 | BOOL* _Nonnull stop) {
43 | [obj removeFromSuperview];
44 | }];
45 | [self.labelArray removeAllObjects];
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/OrdinateView.h:
--------------------------------------------------------------------------------
1 | //
2 | // OrdinateView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | @class XBaseChartConfiguration;
11 | @interface OrdinateView : UIView
12 |
13 | /**
14 | init
15 |
16 | @param frame frame
17 | @param topNumber top number in ordinate View
18 | @param bottomNumber bottom number in ordinate View
19 | @return ordinate View instance
20 | */
21 | - (instancetype)initWithFrame:(CGRect)frame
22 | topNumber:(NSNumber*)topNumber
23 | bottomNumber:(NSNumber*)bottomNumber;
24 |
25 | /**
26 | init
27 |
28 | @param frame frame
29 | @param topNumber top number in ordinate View
30 | @param bottomNumber bottom number in ordinate View
31 | @configuration configuration
32 | @return ordinate View instance
33 | */
34 | - (instancetype)initWithFrame:(CGRect)frame
35 | topNumber:(NSNumber*)topNumber
36 | bottomNumber:(NSNumber*)bottomNumber
37 | configuration:(XBaseChartConfiguration *)configuration;
38 | @end
39 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XAbscissaView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAbscissaView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | @class XBaseChartConfiguration;
11 | #define AbscissaHeight 40
12 |
13 | @interface XAbscissaView : UIView
14 |
15 | /**
16 | init
17 |
18 | @param frame frame
19 | @param dataItemArray datas
20 | @return XAbscissaView instance
21 | */
22 | - (instancetype)initWithFrame:(CGRect)frame
23 | dataItemArray:(NSMutableArray*)dataItemArray
24 | configuration:(XBaseChartConfiguration*)configuration;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XAlignLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAlignLabel.h
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | XVerticalAlignmentTop = 0, //default
13 | XVerticalAlignmentMiddle,
14 | XVerticalAlignmentBottom,
15 |
16 | } XVerticalAlignment;
17 |
18 | @interface XAlignLabel : UILabel
19 | @property (nonatomic) XVerticalAlignment verticalAlignment;
20 | @end
21 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XAlignLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // XAlignLabel.m
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XAlignLabel.h"
10 |
11 |
12 | @implementation XAlignLabel
13 |
14 | @synthesize verticalAlignment = verticalAlignment_;
15 |
16 | - (id)initWithFrame:(CGRect)frame {
17 | self = [super initWithFrame:frame];
18 | if (self) {
19 | self.verticalAlignment = XVerticalAlignmentMiddle;
20 | }
21 | return self;
22 | }
23 |
24 | - (void)setVerticalAlignment:(XVerticalAlignment)verticalAlignment {
25 | verticalAlignment_ = verticalAlignment;
26 | [self setNeedsLayout];
27 | }
28 |
29 |
30 | - (CGRect)textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines {
31 | CGRect textRect = [super textRectForBounds:bounds limitedToNumberOfLines:numberOfLines];
32 | switch (self.verticalAlignment) {
33 | case XVerticalAlignmentTop:
34 | textRect.origin.y = bounds.origin.y;
35 | break;
36 | case XVerticalAlignmentBottom:
37 | textRect.origin.y = bounds.origin.y + bounds.size.height - textRect.size.height;
38 | break;
39 | case XVerticalAlignmentMiddle:
40 | // Fall through.
41 | default:
42 | textRect.origin.y = bounds.origin.y + (bounds.size.height - textRect.size.height) / 2.0;
43 | }
44 | return textRect;
45 | }
46 |
47 | -(void)drawTextInRect:(CGRect)requestedRect {
48 | CGRect actualRect = [self textRectForBounds:requestedRect limitedToNumberOfLines:self.numberOfLines];
49 | [super drawTextInRect:actualRect];
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XAnimationLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAnimationLabel.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 24/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XAlignLabel.h"
11 | @interface XAnimationLabel : XAlignLabel
12 |
13 | /**
14 | Start number animation
15 |
16 | The Begin Number is XAnimationLabel.text number value
17 |
18 | @param to End point
19 | @param duration Animation duration
20 | */
21 | - (void)countFromCurrentTo:(CGFloat)to duration:(CGFloat)duration;
22 |
23 | /**
24 | Initialize the XAnimationLabel on the CGPoint Top
25 | Quick Use for Chart number
26 |
27 | @param point point for location
28 | @param text number string. eg: @"12". As the start number.
29 | @param textColor Text Color
30 | @param fillColor backgroundColor
31 | @return label
32 | */
33 | + (XAnimationLabel*)topLabelWithPoint:(CGPoint)point
34 | text:(NSString*)text
35 | textColor:(UIColor*)textColor
36 | fillColor:(UIColor*)fillColor;
37 |
38 | /**
39 | Initialize the XAnimationLabel
40 | Quick Use for Chart number
41 |
42 | @param frame Label Frame
43 | @param text number string. eg: @"12". As the start number.
44 | @param textColor Text Color
45 | @param fillColor backgroundColor
46 | @return label
47 | */
48 | + (XAnimationLabel*)topLabelWithFrame:(CGRect)frame
49 | text:(NSString*)text
50 | textColor:(UIColor*)textColor
51 | fillColor:(UIColor*)fillColor;
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XAreaLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAreaLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 09/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XAreaLineChartConfiguration.h"
13 | @interface XAreaLineContainerView : UIView
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | dataItemArray:(NSMutableArray*)dataItemArray
16 | topNumber:(NSNumber*)topNumber
17 | bottomNumber:(NSNumber*)bottomNumber
18 | configuration:(XAreaLineChartConfiguration*)configuration;
19 | /**
20 | dataItemArray
21 | */
22 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
23 | /**
24 | 纵坐标最高点
25 | */
26 | @property(nonatomic, strong) NSNumber* top;
27 |
28 | /**
29 | 纵坐标最低点
30 | */
31 | @property(nonatomic, strong) NSNumber* bottom;
32 |
33 | /**
34 | 图表的其他配置
35 | */
36 | @property(nonatomic, strong) XAreaLineChartConfiguration* configuration;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XBarChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 | @class XBarChartConfiguration;
14 | @interface XBarChart : UIView
15 |
16 | // delegate
17 | @property(nonatomic, strong) id barChartDelegate;
18 |
19 | /**
20 | 初始化方法
21 |
22 | @param frame frame
23 | @param dataItemArray items
24 | @param topNumbser top
25 | @param bottomNumber buttom
26 | @param configuration configuration , or nil to use default
27 | @return instancetype
28 | */
29 | - (instancetype)initWithFrame:(CGRect)frame
30 | dataItemArray:(NSMutableArray*)dataItemArray
31 | topNumber:(NSNumber*)topNumbser
32 | bottomNumber:(NSNumber*)bottomNumber
33 | chartConfiguration:(XBarChartConfiguration*)configuration;
34 |
35 |
36 | /**
37 | dataItemArray
38 | */
39 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
40 |
41 | /**
42 | 纵坐标最高点
43 | */
44 | @property(nonatomic, strong) NSNumber* top;
45 |
46 | /**
47 | 纵坐标最低点
48 | */
49 | @property(nonatomic, strong) NSNumber* bottom;
50 |
51 | /**
52 | ChartBackground color
53 | */
54 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
55 |
56 | @property(nonatomic, strong) XBarChartConfiguration *configuration;
57 | @end
58 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XBarChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 15/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | @class XBarChartConfiguration;
12 | @interface XBarChartView : UIScrollView
13 |
14 | /**
15 | 初始化方法
16 |
17 | @param frame frame
18 | @param dataItemArray items
19 | @param topNumbser top
20 | @param bottomNumber buttom
21 | @param configuration chartConfiguration
22 | @return instancetype
23 | */
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | dataItemArray:(NSMutableArray*)dataItemArray
26 | topNumber:(NSNumber*)topNumbser
27 | bottomNumber:(NSNumber*)bottomNumber
28 | chartConfiguration:(XBarChartConfiguration *)configuration;
29 |
30 | /**
31 | dataItemArray
32 | */
33 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
34 | /**
35 | 纵坐标最高点
36 | */
37 | @property(nonatomic, strong) NSNumber* top;
38 |
39 | /**
40 | 纵坐标最低点
41 | */
42 | @property(nonatomic, strong) NSNumber* bottom;
43 |
44 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
45 | @property(nonatomic, strong) XBarChartConfiguration* configuration;
46 | @end
47 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XBarContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 16/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | @class XBarChartConfiguration;
12 | @interface XBarContainerView : UIView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | dataItemArray:(NSMutableArray*)dataItemArray
16 | topNumber:(NSNumber*)topNumbser
17 | bottomNumber:(NSNumber*)bottomNumber
18 | chartConfiguration:(XBarChartConfiguration*)configuration;
19 | /**
20 | dataItemArray
21 | */
22 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
23 | /**
24 | 纵坐标最高点
25 | */
26 | @property(nonatomic, strong) NSNumber* top;
27 |
28 | /**
29 | 纵坐标最低点
30 | */
31 | @property(nonatomic, strong) NSNumber* bottom;
32 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
33 | @property(nonatomic, strong) XBarChartConfiguration* configuration;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XCycleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TBCycleView.h
3 | // TBCycleProgress
4 | //
5 | // Created by qianjianeng on 16/2/22.
6 | // Copyright © 2016年 SF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol XCycleViewDelegate
12 |
13 | /**
14 | ratio
15 | @param ratio 0.0 ~ 1.0
16 | */
17 | - (void)ratioChange:(CGFloat)ratio;
18 |
19 | @end
20 |
21 | @interface XCycleView : UIControl
22 | /// progress 0.0 ~ 1.0
23 | @property(nonatomic, assign) CGFloat progress;
24 |
25 | @property(nonatomic, weak) id cycleViewDelegate;
26 | @end
27 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XLineChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXLineChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartView.h"
11 | #import "XEnumHeader.h"
12 | #import "XLineChartItem.h"
13 | #import "XLineChartConfiguration.h"
14 |
15 | @interface XLineChart : UIView
16 |
17 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
18 |
19 | /// tap and pin gesture
20 | @property(nonatomic, assign) BOOL isAllowGesture;
21 |
22 | @property(nonatomic, strong) XLineChartConfiguration* configuration;
23 |
24 |
25 | /**
26 | Line Graph Mode
27 | - MutiLine
28 | - GraphLine
29 |
30 | Default is MutiLine
31 | */
32 | @property(nonatomic, assign) XLineGraphMode lineGraphMode;
33 |
34 | /**
35 | XXLineChart初始化方法
36 | */
37 | - (instancetype)initWithFrame:(CGRect)frame
38 | dataItemArray:(NSMutableArray*)dataItemArray
39 | dataDiscribeArray:(NSMutableArray*)dataDiscribeArray
40 | topNumber:(NSNumber*)topNumbser
41 | bottomNumber:(NSNumber*)bottomNumber
42 | graphMode:(XLineGraphMode)graphMode;
43 | - (instancetype)initWithFrame:(CGRect)frame
44 | dataItemArray:(NSMutableArray*)dataItemArray
45 | dataDiscribeArray:(NSMutableArray*)dataDiscribeArray
46 | topNumber:(NSNumber*)topNumbser
47 | bottomNumber:(NSNumber*)bottomNumber
48 | graphMode:(XLineGraphMode)graphMode
49 | chartConfiguration:(XLineChartConfiguration*)configuration;
50 | @end
51 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XLineChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XNormalLineChartConfiguration.h"
13 | @interface XLineChartView : UIScrollView
14 | /**
15 | 初始化方法
16 |
17 | @param frame frame
18 | @param dataItemArray items
19 | @param dataDescribeArray dataDescribeArray
20 | @param topNumbser top
21 | @param bottomNumber buttom
22 | @param configuration LineChartConfiguration
23 | @return instancetype
24 | */
25 | - (instancetype)initWithFrame:(CGRect)frame
26 | dataItemArray:(NSMutableArray*)dataItemArray
27 | dataDescribeArray:(NSMutableArray*)dataDescribeArray
28 | topNumber:(NSNumber*)topNumbser
29 | bottomNumber:(NSNumber*)bottomNumber
30 | graphMode:(XLineGraphMode)graphMode
31 | configuration:(XLineChartConfiguration*)configuration;
32 |
33 | /**
34 | dataItemArray
35 | */
36 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
37 |
38 | @property(nonatomic, strong) NSMutableArray* dataDescribeArray;
39 | /**
40 | The vertical high
41 | */
42 | @property(nonatomic, strong) NSNumber* top;
43 |
44 | /**
45 | The vertical low
46 | */
47 | @property(nonatomic, strong) NSNumber* bottom;
48 |
49 |
50 | @property(nonatomic, strong) XLineChartConfiguration* configuration;
51 |
52 | /**
53 | Line Graph Mode
54 | - MutiLine
55 | - GraphLine
56 |
57 | Default is MutiLine
58 | */
59 | @property(nonatomic, assign) XLineGraphMode lineGraphMode;
60 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XNormalLineChartConfiguration.h"
13 |
14 | @interface XLineContainerView : UIView
15 |
16 | - (instancetype)initWithFrame:(CGRect)frame
17 | dataItemArray:(NSMutableArray*)dataItemArray
18 | topNumber:(NSNumber*)topNumber
19 | bottomNumber:(NSNumber*)bottomNumber
20 | configuration:(XLineChartConfiguration*)configuration;
21 | /**
22 | dataItemArray
23 | */
24 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
25 | /**
26 | 纵坐标最高点
27 | */
28 | @property(nonatomic, strong) NSNumber* top;
29 |
30 | /**
31 | 纵坐标最低点
32 | */
33 | @property(nonatomic, strong) NSNumber* bottom;
34 | /**
35 | 图表的其他配置
36 | */
37 | @property(nonatomic, strong) XNormalLineChartConfiguration* configuration;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYPieChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XPieItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 | //颜色
14 |
15 | #define UIColorFromRGBHex(rgbValue) \
16 | [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
17 | green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
18 | blue:((float)(rgbValue & 0xFF)) / 255.0 \
19 | alpha:1.0]
20 | @interface XPieChart : UIView
21 |
22 | - (void)refreshChart;
23 |
24 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
25 | @property(nonatomic, weak) id delegate;
26 |
27 | /**
28 | enableAnimation
29 | Default is YES
30 | */
31 | @property(nonatomic, assign) BOOL enableAnimation;
32 |
33 | /**
34 | descriptionTextFont default is 10
35 | */
36 | @property(nonatomic) UIFont* descriptionTextFont;
37 |
38 | /**
39 | descriptionTextColor default is blackColor
40 | */
41 | @property(nonatomic) UIColor* descriptionTextColor;
42 | /** Default clear Color. */
43 | @property(nonatomic) UIColor* descriptionTextShadowColor;
44 | /** Default is CGSizeMake(0, 0). */
45 | @property(nonatomic) CGSize descriptionTextShadowOffset;
46 |
47 | /**
48 | should High light Sector On Touch default is YES
49 | */
50 | @property(nonatomic, assign) BOOL shouldHighlightSectorOnTouch;
51 |
52 | /**
53 | enable Multiple Selection default is NO
54 | */
55 | @property(nonatomic, assign) BOOL enableMultipleSelection;
56 |
57 | /**
58 | show Absolute Values
59 | Default is NO
60 | */
61 | @property(nonatomic, assign) BOOL showAbsoluteValues;
62 |
63 | /**
64 | hide Value Labels
65 | Default is NO
66 | */
67 | @property(nonatomic, assign) BOOL hideValueLabels;
68 |
69 | /**
70 | only Show Values
71 | default is NO
72 | */
73 | @property(nonatomic, assign) BOOL onlyShowValues;
74 | @end
75 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XPositiveNegativeBarChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXPositiveNegativeBarChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | #import "XJYChartDelegate.h"
12 |
13 | @class XBarChartConfiguration;
14 | @interface XPositiveNegativeBarChart : UIView
15 | /**
16 | 初始化方法
17 |
18 | @param frame frame
19 | @param dataItemArray items
20 | @param topNumbser top
21 | @param bottomNumber buttom
22 | @return instancetype
23 | */
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | dataItemArray:(NSMutableArray*)dataItemArray
26 | topNumber:(NSNumber*)topNumbser
27 | bottomNumber:(NSNumber*)bottomNumber
28 | chartConfiguration:(XBarChartConfiguration*)configuration;
29 | ;
30 | @property(nonatomic, strong) id barChartDelegate;
31 |
32 | /**
33 | dataItemArray
34 | */
35 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
36 |
37 | /**
38 | 纵坐标最高点
39 | */
40 | @property(nonatomic, strong) NSNumber* top;
41 |
42 | /**
43 | 纵坐标最低点
44 | */
45 | @property(nonatomic, strong) NSNumber* bottom;
46 | @end
47 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XPositiveNegativeBarChartView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XXPositiveNegativeBarChartView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 | @class XBarChartConfiguration;
12 | @interface XPositiveNegativeBarChartView : UIScrollView
13 | /**
14 | 初始化方法
15 |
16 | @param frame frame
17 | @param dataItemArray items
18 | @param topNumbser top
19 | @param bottomNumber buttom
20 | @return instancetype
21 | */
22 | - (instancetype)initWithFrame:(CGRect)frame
23 | dataItemArray:(NSMutableArray*)dataItemArray
24 | topNumber:(NSNumber*)topNumbser
25 | bottomNumber:(NSNumber*)bottomNumber
26 | chartConfiguration:(XBarChartConfiguration*)configuration;
27 | ;
28 |
29 | /**
30 | dataItemArray
31 | */
32 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
33 | /**
34 | 纵坐标最高点
35 | */
36 | @property(nonatomic, strong) NSNumber* top;
37 |
38 | /**
39 | 纵坐标最低点
40 | */
41 | @property(nonatomic, strong) NSNumber* bottom;
42 | @property(nonatomic, strong) XBarChartConfiguration* configuration;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XPositiveNegativeBarContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPositiveNegativeBarContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XBarItem.h"
11 |
12 | @interface XPositiveNegativeBarContainerView : UIView
13 | - (instancetype)initWithFrame:(CGRect)frame
14 | dataItemArray:(NSMutableArray*)dataItemArray
15 | topNumber:(NSNumber*)topNumbser
16 | bottomNumber:(NSNumber*)bottomNumber;
17 | /**
18 | dataItemArray
19 | */
20 | @property(nonatomic, strong) NSMutableArray* dataItemArray;
21 | /**
22 | 纵坐标最高点
23 | */
24 | @property(nonatomic, strong) NSNumber* top;
25 |
26 | /**
27 | 纵坐标最低点
28 | */
29 | @property(nonatomic, strong) NSNumber* bottom;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/XJYChart/ChartView/XStackAreaLineContainerView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XStackAreaLineContainerView.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLineChartItem.h"
11 | #import "XEnumHeader.h"
12 | #import "XStackAreaLineChartConfiguration.h"
13 |
14 | @interface XStackAreaLineContainerView : UIView
15 | - (instancetype)initWithFrame:(CGRect)frame
16 | dataItemArray:(NSMutableArray*)dataItemArray
17 | topNumber:(NSNumber*)topNumber
18 | bottomNumber:(NSNumber*)bottomNumber
19 | configuration:(XStackAreaLineChartConfiguration *)configuration;
20 | /**
21 | dataItemArray
22 | */
23 | @property (nonatomic, strong) NSMutableArray *dataItemArray;
24 | /**
25 | 纵坐标最高点
26 | */
27 | @property (nonatomic, strong) NSNumber *top;
28 |
29 | /**
30 | 纵坐标最低点
31 | */
32 | @property (nonatomic, strong) NSNumber *bottom;
33 | /**
34 | 图表的其他配置
35 | */
36 | @property(nonatomic, strong) XStackAreaLineChartConfiguration *configuration;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/BarChartConfiguration/XBarChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBarChartConfiguration : XBaseChartConfiguration
12 |
13 | /// defalut is auto calculate x width
14 | @property(nonatomic, assign) CGFloat x_width;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/BarChartConfiguration/XBarChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XBarChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by 谢俊逸 on 24/5/2018.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XBarChartConfiguration.h"
10 |
11 | @implementation XBarChartConfiguration
12 | -(instancetype)init {
13 | if (self = [super init]) {
14 | self.x_width = 0;
15 | }
16 | return self;
17 | }
18 | @end
19 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XAreaLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XAreaLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 | @interface XAreaLineChartConfiguration : XLineChartConfiguration
11 |
12 | /// CGColorRef Array
13 | /// default is @[(__bridge id)[UIColor steelBlueColor].CGColor,(__bridge id)[UIColor whiteColor].CGColor];
14 | @property(nonatomic, strong) NSArray* gradientColors;
15 |
16 | /// 折线/曲线 线条本身的颜色
17 | @property(nonatomic, strong) UIColor *lineColor;
18 |
19 | /// 折线/曲线 线条本身的宽度
20 | @property(nonatomic, assign) CGFloat lineWidth;
21 |
22 | /// defalut is YES
23 | @property(nonatomic, assign) BOOL isShowPoint;
24 |
25 | /// defalut is 0.5
26 | @property(nonatomic, assign) CGFloat areaLineAlpha;
27 | @property(nonatomic, assign) BOOL isEnableNumberLabel;
28 | @end
29 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XAreaLineChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XAreaLineChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XAreaLineChartConfiguration.h"
10 | #import "XColor.h"
11 |
12 | @implementation XAreaLineChartConfiguration
13 |
14 | @dynamic isEnableNumberLabel;
15 |
16 | - (instancetype)init {
17 | if (self = [super init]) {
18 | self.isShowPoint = YES;
19 | self.areaLineAlpha = 0.5;
20 | self.lineMode = CurveLine;
21 | self.gradientColors = @[
22 | (__bridge id)[UIColor steelBlueColor].CGColor,
23 | (__bridge id)[UIColor whiteColor].CGColor
24 | ];
25 | self.auxiliaryDashLineColor = [UIColor black50PercentColor];
26 | self.isEnableNumberLabel = NO;
27 | }
28 | return self;
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XBaseChartConfiguration.h"
10 | #import "XEnumHeader.h"
11 |
12 | @interface XLineChartConfiguration : XBaseChartConfiguration
13 |
14 | /**
15 | Line Mode
16 | - Straight
17 | - CurveLine
18 |
19 | Default is Straight
20 |
21 | */
22 | @property(nonatomic, assign) XLineMode lineMode;
23 |
24 | /// defalut is [UIColor black75PercentColor]
25 | @property(nonatomic, strong) UIColor* auxiliaryDashLineColor;
26 |
27 | /// defalut is YES
28 | @property(nonatomic, assign) BOOL isShowAuxiliaryDashLine;
29 |
30 | /// if enable number
31 | /// ,touch height failure
32 | @property(nonatomic, assign) BOOL isEnableNumberLabel;
33 |
34 | @property(nonatomic, strong) UIColor *numberLabelColor;
35 | @property(nonatomic, assign) BOOL isEnableTouchShowNumberLabel;
36 | @end
37 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XLineChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 | #import "XColor.h"
11 |
12 | @implementation XLineChartConfiguration
13 |
14 | - (instancetype)init {
15 | if (self = [super init]) {
16 | self.lineMode = Straight;
17 | self.isShowAuxiliaryDashLine = YES;
18 | self.auxiliaryDashLineColor = [UIColor black75PercentColor];
19 | self.numberLabelColor = [UIColor black75PercentColor];
20 | self.isEnableNumberLabel = NO;
21 | }
22 | return self;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XNormalLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XNormalLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 |
11 | @interface XNormalLineChartConfiguration : XLineChartConfiguration
12 |
13 | /// defalut is NO
14 | @property(nonatomic, assign) BOOL isShowCoordinate;
15 |
16 | /// if isShowShadow == YES
17 | /// line path animation will Disable
18 | @property(nonatomic, assign) BOOL isShowShadow;
19 |
20 | @property(nonatomic, assign) BOOL isShowPoint;
21 | @end
22 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XNormalLineChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XNormalLineChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XNormalLineChartConfiguration.h"
10 |
11 | @implementation XNormalLineChartConfiguration
12 |
13 | - (instancetype)init {
14 | if (self = [super init]) {
15 | self.isShowShadow = YES;
16 | self.isShowCoordinate = NO;
17 | self.isShowPoint = YES;
18 | }
19 | return self;
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XStackAreaLineChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XStackAreaLineChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XLineChartConfiguration.h"
10 |
11 | @interface XStackAreaLineChartConfiguration : XLineChartConfiguration
12 |
13 | /// defalut is 1.0
14 | @property(nonatomic, assign) CGFloat areaLineAlpha;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/LineChartConfiguration/XStackAreaLineChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XStackAreaLineChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XStackAreaLineChartConfiguration.h"
10 |
11 | @implementation XStackAreaLineChartConfiguration
12 | - (instancetype)init {
13 | if (self = [super init]) {
14 | self.areaLineAlpha = 1.0;
15 | }
16 | return self;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/XBaseChartConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBaseChartConfiguration.h
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBaseChartConfiguration : NSObject
12 |
13 | /// defalut is white
14 | @property(nonatomic, strong) UIColor* chartBackgroundColor;
15 | @property(nonatomic, assign) NSUInteger ordinateDenominator;
16 | @property(nonatomic, assign) BOOL isScrollable;
17 | @property(nonatomic, assign) BOOL isEnableNumberAnimation;
18 | @property(nonatomic, assign) BOOL isShowOrdinate;
19 | @property(nonatomic, assign) BOOL isShowXAbscissa;
20 |
21 | @end
22 |
23 |
--------------------------------------------------------------------------------
/XJYChart/Configuration/XBaseChartConfiguration.m:
--------------------------------------------------------------------------------
1 | //
2 | // XBaseChartConfiguration.m
3 | // XJYChart
4 | //
5 | // Created by JunyiXie on 2017/12/3.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "XBaseChartConfiguration.h"
10 | #import "XColor.h"
11 |
12 | @implementation XBaseChartConfiguration
13 |
14 | - (instancetype)init {
15 | if (self = [super init]) {
16 | self.chartBackgroundColor = XJYWhite;
17 | self.ordinateDenominator = 4;
18 | self.isScrollable = YES;
19 | self.isEnableNumberAnimation = YES;
20 | self.isShowOrdinate = YES;
21 | self.isShowXAbscissa = YES;
22 | }
23 | return self;
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XBarItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XBarItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 23/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XBarItem : NSObject
12 | @property(nonatomic, strong) UIColor* color;
13 | @property(nonatomic, strong) NSNumber* dataNumber;
14 | @property(nonatomic, strong) NSString* dataDescribe;
15 |
16 | /**
17 | 设置数据item
18 |
19 | @param dataNumber (NSNumber *)dataNumber
20 | @param color (UIColor *)color
21 | @param dataDescribe (NSString *)dataDescribe
22 | @return instancetype
23 | */
24 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
25 | color:(UIColor*)color
26 | dataDescribe:(NSString*)dataDescribe;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XBarItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // XBarItem.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 23/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XBarItem.h"
10 |
11 | @implementation XBarItem
12 |
13 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
14 | color:(UIColor*)color
15 | dataDescribe:(NSString*)dataDescribe {
16 | if (self = [super init]) {
17 | self.dataNumber = dataNumber;
18 | self.color = color;
19 | self.dataDescribe = dataDescribe;
20 | }
21 | return self;
22 | }
23 | @end
24 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XLineChartItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XLineChartItem : NSObject
12 |
13 | @property(nonatomic, strong) UIColor* color;
14 | @property(nonatomic, strong) NSMutableArray* numberArray;
15 | /**
16 | 设置数据item
17 |
18 | @param numberArray (NSNumber *)dataNumber
19 | @param color (UIColor *)color
20 | @return instancetype
21 | */
22 | - (instancetype)initWithDataNumberArray:(NSMutableArray*)numberArray
23 | color:(UIColor*)color;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XLineChartItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // XLineChartItem.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XLineChartItem.h"
10 |
11 | @implementation XLineChartItem
12 |
13 | /**
14 | @param numberArray data number in a line
15 | @param color the line color
16 | @return XLineChartItem instance
17 | */
18 | - (instancetype)initWithDataNumberArray:(NSMutableArray*)numberArray
19 | color:(UIColor*)color {
20 | if (self = [super init]) {
21 | self.numberArray = numberArray;
22 | self.color = color;
23 | }
24 | return self;
25 | }
26 | @end
27 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XPieItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPieItem.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XPieItem : NSObject
12 |
13 | @property(nonatomic, strong) UIColor* color;
14 | @property(nonatomic, strong) NSNumber* dataNumber;
15 | @property(nonatomic, strong) NSString* dataDescribe;
16 |
17 | /**
18 | 设置数据item
19 |
20 | @param dataNumber (NSNumber *)dataNumber
21 | @param color (UIColor *)color
22 | @param dataDescribe (NSString *)dataDescribe
23 | @return instancetype
24 | */
25 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
26 | color:(UIColor*)color
27 | dataDescribe:(NSString*)dataDescribe;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/XJYChart/DataModel/XPieItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPieItem.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XPieItem.h"
10 |
11 | @implementation XPieItem
12 |
13 | - (instancetype)initWithDataNumber:(NSNumber*)dataNumber
14 | color:(UIColor*)color
15 | dataDescribe:(NSString*)dataDescribe {
16 | if (self = [super init]) {
17 | self.dataNumber = dataNumber;
18 | self.color = color;
19 | self.dataDescribe = dataDescribe;
20 | }
21 | return self;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/XJYChart/Helper/XEnumHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // XEnumHeader.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #ifndef XEnumHeader_h
10 | #define XEnumHeader_h
11 |
12 | typedef NS_ENUM(NSUInteger, XLineMode) {
13 | Straight,
14 | CurveLine,
15 |
16 | };
17 |
18 | typedef NS_ENUM(NSUInteger, XLineGraphMode) {
19 | MutiLineGraph,
20 | AreaLineGraph,
21 | StackAreaLineGraph,
22 | };
23 |
24 | #endif /* XEnumHeader_h */
25 |
--------------------------------------------------------------------------------
/XJYChart/Helper/XNotificationBridge.h:
--------------------------------------------------------------------------------
1 | //
2 | // XNotificationBridge.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 03/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | Cross layer using the same Notification info
13 | */
14 | @interface XNotificationBridge : NSObject
15 |
16 | + (instancetype)shareXNotificationBridge;
17 |
18 | /// BarChart
19 | @property(nonatomic, strong) NSString* TouchBarNotification;
20 | @property(nonatomic, strong) NSString* BarIdxNumberKey;
21 |
22 | /// PositiveNegativeBarChart
23 | @property(nonatomic, strong) NSString* TouchPNBarNotification;
24 | @property(nonatomic, strong) NSString* PNBarIdxNumberKey;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/XJYChart/Helper/XNotificationBridge.m:
--------------------------------------------------------------------------------
1 | //
2 | // XNotificationBridge.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 03/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XNotificationBridge.h"
10 |
11 | @implementation XNotificationBridge
12 |
13 | + (instancetype)shareXNotificationBridge {
14 | static XNotificationBridge* share = nil;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | share = [[XNotificationBridge alloc] init];
18 | });
19 | return share;
20 | }
21 |
22 | - (instancetype)init {
23 | if (self = [super init]) {
24 | self.TouchBarNotification = @"TouchBarNotification";
25 | self.BarIdxNumberKey = @"TouchBarNotificationKey";
26 |
27 | self.TouchPNBarNotification = @"TouchPNBarNotification";
28 | self.PNBarIdxNumberKey = @"TouchPNBarNotificationKey";
29 | }
30 | return self;
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/XJYChart/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 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/XJYChart/XJYChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYChart.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #ifndef XJYChart_h
10 | #define XJYChart_h
11 | #import "XPieChart.h"
12 | #import "XBarChart.h"
13 | #import "XLineChart.h"
14 | #import "XCycleView.h"
15 | #import "XPieItem.h"
16 | #import "XBarItem.h"
17 | #import "XLineChartItem.h"
18 | #import "XJYChartDelegate.h"
19 | #import "XColor.h"
20 | #import "XRandomNumerHelper.h"
21 | #import "XEnumHeader.h"
22 | #import "XPositiveNegativeBarChart.h"
23 | #import "XNormalLineChartConfiguration.h"
24 | #import "XAreaLineChartConfiguration.h"
25 | #import "XStackAreaLineChartConfiguration.h"
26 | #import "XBarChartConfiguration.h"
27 | #import "XStackAreaLineContainerView.h"
28 | #import "CAKeyframeAnimation+AHEasing.h"
29 | #import "XAnimation.h"
30 | #import "XBarContainerView.h"
31 | #import "XPointDetect.h"
32 | #import "CAShapeLayer+XLayerHelper.h"
33 | #import "XPositiveNegativeBarContainerView.h"
34 | #import "XBarChartView.h"
35 | #import "XLineContainerView.h"
36 | #import "XAnimator.h"
37 | #import "OrdinateView.h"
38 | #import "UIGestureRecognizer+XGesHelper.h"
39 | #import "XAnimationLabel.h"
40 | #import "XAreaLineContainerView.h"
41 | #import "XPositiveNegativeBarChartView.h"
42 | #import "XAuxiliaryCalculationHelper.h"
43 | #import "XAnimationPath.h"
44 | #import "CALayer+XLayerSelectHelper.h"
45 | #import "XAbscissaView.h"
46 | #import "XNotificationBridge.h"
47 |
48 | #endif /* XJYChart_h */
49 |
--------------------------------------------------------------------------------
/XJYChart/XJYChartDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYChartDelegate.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol XJYChartDelegate
12 | @optional
13 |
14 | /**
15 | * Touch Bar
16 | */
17 | - (void)userClickedOnBarAtIndex:(NSInteger)barIndex;
18 |
19 | /**
20 | * Touch Pie
21 | */
22 | - (void)userClickedOnPieIndexItem:(NSInteger)pieIndex;
23 | - (void)didUnselectPieItem;
24 | @end
25 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by JunyiXie on 2017/11/26.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Colours
11 |
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 | var window: UIWindow?
16 |
17 |
18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19 | // Override point for customization after application launch.
20 | return true
21 | }
22 |
23 | func applicationWillResignActive(_ application: UIApplication) {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
26 | }
27 |
28 | func applicationDidEnterBackground(_ application: UIApplication) {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | func applicationWillEnterForeground(_ application: UIApplication) {
34 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | func applicationDidBecomeActive(_ application: UIApplication) {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | func applicationWillTerminate(_ application: UIApplication) {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-72.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/Icon@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/ios-marketing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/AppIcon.appiconset/ios-marketing.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/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 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/AreaLineTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AreaLineTableViewCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | class AreaLineTableViewCell : UITableViewCell {
13 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
14 | super.init(style: style, reuseIdentifier: reuseIdentifier)
15 |
16 | var itemArray: [AnyHashable] = []
17 | let numberArray = [75, 63, 183, 109, 88]
18 | let item = XLineChartItem(dataNumber: NSMutableArray(array:numberArray), color: Constants.XJYWhite)
19 | itemArray.append(item!)
20 | let configuration = XAreaLineChartConfiguration()
21 | configuration.isShowPoint = true
22 | configuration.lineMode = XLineMode.CurveLine
23 | configuration.ordinateDenominator = 6
24 | // configuration.isEnableNumberLabel = YES;
25 | let lineChart = XLineChart(frame: CGRect(x: 0, y: 0, width: 375, height: 200), dataItemArray: NSMutableArray(array: itemArray), dataDiscribeArray: ["January", "February", "March", "April", "May"], topNumber: 240, bottomNumber: 0, graphMode: XLineGraphMode.AreaLineGraph, chartConfiguration: nil)
26 | contentView.addSubview(lineChart!)
27 | selectionStyle = UITableViewCellSelectionStyle.none
28 |
29 | }
30 |
31 | required init?(coder aDecoder: NSCoder) {
32 | fatalError("init(coder:) has not been implemented")
33 | }
34 |
35 | override func awakeFromNib() {
36 | super.awakeFromNib()
37 | }
38 |
39 | override func setSelected(_ selected: Bool, animated: Bool) {
40 | super.setSelected(selected, animated: animated)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/CycleTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CycleTableViewCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | public class CycleTableViewCell: UITableViewCell, XCycleViewDelegate {
13 | @IBOutlet var cycleView: XCycleView!
14 | @IBOutlet var moneyLabel: UILabel!
15 | @IBOutlet var showMoneyRangeLabel: UILabel!
16 | private var min: CGFloat = 0.0
17 | private var max: CGFloat = 0.0
18 | private var ges1: UITapGestureRecognizer?
19 | private var ges2: UITapGestureRecognizer?
20 | private var ges3: UITapGestureRecognizer?
21 |
22 | override public func awakeFromNib() {
23 | super.awakeFromNib()
24 | cycleView.cycleViewDelegate = self
25 | selectionStyle = UITableViewCellSelectionStyle.none
26 | // 接口
27 | self.min = 500
28 | self.max = 2000
29 | //
30 | self.moneyLabel.text = "0元"
31 | self.moneyLabel.font = UIFont.systemFont(ofSize: 20)
32 | // Initialization code
33 | }
34 |
35 | override public func setSelected(_ selected: Bool, animated: Bool) {
36 | super.setSelected(selected, animated: animated)
37 | // Configure the view for the selected state
38 | }
39 |
40 | // MARK: 回调
41 | public func ratioChange(_ ratio: CGFloat) {
42 | //传给你比例!
43 | self.moneyLabel.text = String(format: "%.0f元", ratio * max)
44 | if ratio >= 0.95 {
45 | self.moneyLabel.text = String(format: "%.0f元", 1 * max)
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/LineChartCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LineChartCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | class LineChartCell :UITableViewCell {
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(_ selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 | // Configure the view for the selected state
21 | }
22 |
23 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
24 | super.init(style: style, reuseIdentifier: reuseIdentifier)
25 |
26 | var itemArray: [AnyHashable] = []
27 | var numbersArray = [[Int32]]()
28 | //点的数据
29 | for _ in 0..<2 {
30 | var numberArray = [Int32]()
31 | for _ in 0..<5 {
32 | let num: Int = Int(XRandomNumerHelper.shareRandomNumber().randomNumberSmallThan(14)) * Int(XRandomNumerHelper.shareRandomNumber().randomNumberSmallThan(14))
33 | let number = Int32(num)
34 | numberArray.append(number)
35 | }
36 | numbersArray.append(numberArray)
37 | }
38 | let colorArray = [UIColor.teal(), UIColor.brickRed(), UIColor.babyBlue(), UIColor.banana(), UIColor.orchid()]
39 | for i in 0..<2 {
40 | let item = XLineChartItem(dataNumber: NSMutableArray(array: numbersArray[i]), color: colorArray[i])
41 | itemArray.append(item!)
42 | }
43 | let configuration = XNormalLineChartConfiguration()
44 | configuration.lineMode = XLineMode.CurveLine
45 | let lineChart = XLineChart(frame: CGRect(x: 0, y: 0, width: 375, height: 200), dataItemArray: NSMutableArray(array: itemArray), dataDiscribeArray: ["January", "February", "March", "April", "May"], topNumber: 240, bottomNumber: 0, graphMode: XLineGraphMode.MutiLineGraph, chartConfiguration: configuration)
46 | contentView.addSubview(lineChart!)
47 | selectionStyle = UITableViewCellSelectionStyle.none
48 |
49 | }
50 |
51 | required init?(coder aDecoder: NSCoder) {
52 | fatalError("init(coder:) has not been implemented")
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/SingleLineChartTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SingleLineChartTableViewCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | class SingleLineChartTableViewCell: UITableViewCell {
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(_ selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 | // Configure the view for the selected state
21 | }
22 |
23 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
24 | super.init(style: style, reuseIdentifier: reuseIdentifier)
25 |
26 | // XJYChart init Design for muti line
27 | // So @[oneitem] draw one line
28 | let numberArray = [120, 80, 160, 120, 150]
29 | let item = XLineChartItem(dataNumber: NSMutableArray(array: numberArray), color: UIColor.salmon())
30 | let configuration = XNormalLineChartConfiguration()
31 | configuration.isShowShadow = false
32 | // configuration.isEnableNumberLabel = YES;
33 | let lineChart = XLineChart(frame: CGRect(x: 0, y: 0, width: 375, height: 200), dataItemArray: [item as Any], dataDiscribeArray: ["January", "February", "March", "April", "May"], topNumber: 240, bottomNumber: 0, graphMode: XLineGraphMode.MutiLineGraph, chartConfiguration: configuration)
34 | contentView.addSubview(lineChart!)
35 | selectionStyle = UITableViewCellSelectionStyle.none
36 |
37 | }
38 |
39 | required init?(coder aDecoder: NSCoder) {
40 | fatalError("init(coder:) has not been implemented")
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/StackAreaTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StackAreaTableViewCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | class StackAreaTableViewCell :UITableViewCell {
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(_ selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 | // Configure the view for the selected state
21 | }
22 |
23 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
24 | super.init(style: style, reuseIdentifier: reuseIdentifier)
25 |
26 | var itemArray: [AnyHashable] = []
27 | // NSMutableArray* numbersArray = [NSMutableArray new];
28 | var numbersArray = [[45, 73, 155, 72, 53], [88, 97, 245, 166, 99], [81, 112, 133, 111, 90]]
29 | let colorArray = [UIColor.blueberry(), UIColor.pastelGreen(), UIColor.danger()]
30 | for i in 0..<3 {
31 | let item = XLineChartItem(dataNumber: NSMutableArray(array: numbersArray[i]), color: colorArray[i])
32 | itemArray.append(item!)
33 | }
34 | let configuration = XStackAreaLineChartConfiguration()
35 | configuration.lineMode = XLineMode.CurveLine
36 | let lineChart = XLineChart(frame: CGRect(x: 0, y: 0, width: 375, height: 200), dataItemArray: NSMutableArray(array: itemArray), dataDiscribeArray: ["January", "February", "March", "April", "May"], topNumber: 750, bottomNumber: 0, graphMode: XLineGraphMode.StackAreaLineGraph, chartConfiguration: configuration)
37 | contentView.addSubview(lineChart!)
38 | selectionStyle = UITableViewCellSelectionStyle.none
39 |
40 | }
41 |
42 | required init?(coder aDecoder: NSCoder) {
43 | fatalError("init(coder:) has not been implemented")
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/XJYTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XJYTableViewCell.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XJYChart
11 |
12 | class XJYTableViewCell : UITableViewCell {
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(_ selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 | }
21 |
22 | override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
23 | super.init(style: style, reuseIdentifier: reuseIdentifier)
24 |
25 | // self.backgroundColor = [UIColor colorWithRed:235/255.0
26 | // green:235/255.0 blue:235/255.0 alpha:1];
27 | selectionStyle = UITableViewCellSelectionStyle.none
28 | }
29 |
30 | required init?(coder aDecoder: NSCoder) {
31 | fatalError("init(coder:) has not been implemented")
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo-Swift/View/XJYViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XJYViewController.swift
3 | // XJYChartDemo-Swift
4 | //
5 | // Created by Kelly Roach on 8/17/18.
6 | // Copyright © 2018 JunyiXie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class XJYViewController : UIViewController {
12 | // tell UIKit that you are using AutoLayout
13 | class var requiresConstraintBasedLayout: Bool {
14 | return true
15 | }
16 |
17 | override public func viewDidLoad() {
18 | super.viewDidLoad()
19 | navigationController?.navigationBar.tintColor = UIColor.black
20 | }
21 |
22 | override public func didReceiveMemoryWarning() {
23 | super.didReceiveMemoryWarning()
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | // this is Apple's recommended place for adding/updating constraints
28 | override public func updateViewConstraints() {
29 | super.updateViewConstraints()
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo.xcodeproj/project.xcworkspace/xcuserdata/junyixie.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo.xcodeproj/project.xcworkspace/xcuserdata/junyixie.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo.xcodeproj/xcuserdata/junyixie.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XJYChart-Swift.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | XJYChartDemo-Swift.xcscheme
13 |
14 | orderHint
15 | 9
16 |
17 | XJYChartDemo.xcscheme
18 |
19 | orderHint
20 | 1
21 |
22 |
23 | SuppressBuildableAutocreation
24 |
25 | 3F686B301FCAA3CA00FF9B14
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo.xcodeproj/xcuserdata/xiejunyi.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XJYChartDemo-Swift.xcscheme
8 |
9 | orderHint
10 | 5
11 |
12 | XJYChartDemo.xcscheme
13 |
14 | orderHint
15 | 4
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // XJYChartDemo
4 | //
5 | // Created by JunyiXie on 2017/11/26.
6 | // Copyright © 2017年 JunyiXie. 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 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // XJYChartDemo
4 | //
5 | // Created by JunyiXie on 2017/11/26.
6 | // Copyright © 2017年 JunyiXie. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-72.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/Icon@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/ios-marketing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/XJYChartDemo/XJYChartDemo/Assets.xcassets/AppIcon.appiconset/ios-marketing.png
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/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 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/AreaLineTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AreaLineTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 09/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kAreaLineTableViewCell = @"AreaLineTableViewCell";
11 |
12 | @interface AreaLineTableViewCell : UITableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/AreaLineTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // AreaLineTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 09/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "AreaLineTableViewCell.h"
10 |
11 | #import
12 | @implementation AreaLineTableViewCell
13 |
14 | - (instancetype)initWithStyle:(UITableViewCellStyle)style
15 | reuseIdentifier:(NSString*)reuseIdentifier {
16 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
17 | NSMutableArray* itemArray = [[NSMutableArray alloc] init];
18 |
19 | NSMutableArray* numberArray =
20 | [NSMutableArray arrayWithArray:@[ @75, @63, @183, @109, @88 ]];
21 |
22 | XLineChartItem* item =
23 | [[XLineChartItem alloc] initWithDataNumberArray:numberArray
24 | color:XJYWhite];
25 | [itemArray addObject:item];
26 |
27 | XAreaLineChartConfiguration* configuration =
28 | [[XAreaLineChartConfiguration alloc] init];
29 | configuration.isShowPoint = YES;
30 | configuration.lineMode = CurveLine;
31 | configuration.ordinateDenominator = 6;
32 | configuration.gradientColors = @[
33 | (__bridge id)[UIColor colorFromHexString: @"0x42C3FF"].CGColor,
34 | (__bridge id)[UIColor whiteColor].CGColor
35 | ];
36 | configuration.lineWidth = 1.5;
37 | configuration.lineColor = [UIColor colorFromHexString: @"0x0097F5"];
38 | // configuration.isEnableNumberLabel = YES;
39 | XLineChart* lineChart =
40 | [[XLineChart alloc] initWithFrame:CGRectMake(0, 0, 375, 200)
41 | dataItemArray:itemArray
42 | dataDiscribeArray:[NSMutableArray arrayWithArray:@[
43 | @"January", @"February", @"March", @"April", @"May"
44 | ]]
45 | topNumber: @240
46 | bottomNumber: @0
47 | graphMode: AreaLineGraph
48 | chartConfiguration: configuration];
49 |
50 | [self.contentView addSubview:lineChart];
51 | self.selectionStyle = UITableViewCellSelectionStyleNone;
52 | }
53 | return self;
54 | }
55 |
56 | - (void)awakeFromNib {
57 | [super awakeFromNib];
58 | }
59 |
60 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
61 | [super setSelected:selected animated:animated];
62 | }
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/BarChartCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomeFourTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 15/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kBarChartCell = @"BarChartCell";
11 |
12 | @interface BarChartCell : UITableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/CycleTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CycleTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 01/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | static NSString* kCycleTableViewCell = @"CycleTableViewCell";
13 |
14 | @interface CycleTableViewCell : UITableViewCell
15 |
16 | @property(strong, nonatomic) IBOutlet XCycleView* cycleView;
17 | @property(strong, nonatomic) IBOutlet UILabel* moneyLabel;
18 |
19 |
20 | @property(nonatomic, assign) CGFloat min;
21 | @property(nonatomic, assign) CGFloat max;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/CycleTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CycleTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 01/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "CycleTableViewCell.h"
10 |
11 | @interface CycleTableViewCell ()
12 |
13 | @property(strong, nonatomic) IBOutlet UILabel* showMoneyRangeLabel;
14 |
15 | @property(nonatomic, strong) UITapGestureRecognizer* ges1;
16 | @property(nonatomic, strong) UITapGestureRecognizer* ges2;
17 | @property(nonatomic, strong) UITapGestureRecognizer* ges3;
18 |
19 |
20 | @end
21 |
22 | @implementation CycleTableViewCell
23 |
24 | - (void)awakeFromNib {
25 | [super awakeFromNib];
26 | self.cycleView.cycleViewDelegate = self;
27 | self.selectionStyle = UITableViewCellSelectionStyleNone;
28 | // 接口
29 | self.min = 500;
30 | self.max = 2000;
31 |
32 | //
33 | self.moneyLabel.text = [NSString stringWithFormat:@"0元"];
34 | self.moneyLabel.font = [UIFont systemFontOfSize:20];
35 |
36 | // Initialization code
37 | }
38 |
39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
40 | [super setSelected:selected animated:animated];
41 |
42 | // Configure the view for the selected state
43 | }
44 |
45 | #pragma mark 回调
46 | - (void)ratioChange:(CGFloat)ratio {
47 | //传给你比例!
48 | self.moneyLabel.text =
49 | [NSString stringWithFormat:@"%.0f元", ratio * self.max];
50 | if (ratio >= 0.95) {
51 | self.moneyLabel.text = [NSString stringWithFormat:@"%.0f元", 1 * self.max];
52 | }
53 | }
54 |
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/HomeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomeViewController.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XJYViewController.h"
10 |
11 | @interface HomeViewController : XJYViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/LineChartCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomeFiveTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kLineChartCell = @"LineChartCell";
11 |
12 | @interface LineChartCell : UITableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/LineChartCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HomeFiveTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/03/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "LineChartCell.h"
10 | #import
11 | @implementation LineChartCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 | - (instancetype)initWithStyle:(UITableViewCellStyle)style
24 | reuseIdentifier:(NSString*)reuseIdentifier {
25 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
26 | NSMutableArray* itemArray = [[NSMutableArray alloc] init];
27 |
28 | NSMutableArray* numbersArray = [NSMutableArray new];
29 |
30 | //点的数据
31 | for (int j = 0; j < 2; j++) {
32 | NSMutableArray* numberArray = [NSMutableArray new];
33 |
34 | for (int i = 0; i < 5; i++) {
35 | int num = [[XRandomNumerHelper shareRandomNumberHelper]
36 | randomNumberSmallThan:14] *
37 | [[XRandomNumerHelper shareRandomNumberHelper]
38 | randomNumberSmallThan:14];
39 | NSNumber* number = [NSNumber numberWithInt:num];
40 | [numberArray addObject:number];
41 | }
42 |
43 | [numbersArray addObject:numberArray];
44 | }
45 |
46 | NSArray* colorArray = @[
47 | [UIColor tealColor], [UIColor brickRedColor], [UIColor babyBlueColor],
48 | [UIColor bananaColor], [UIColor orchidColor]
49 | ];
50 |
51 | for (int i = 0; i < 2; i++) {
52 | XLineChartItem* item =
53 | [[XLineChartItem alloc] initWithDataNumberArray:numbersArray[i]
54 | color:colorArray[i]];
55 | [itemArray addObject:item];
56 | }
57 |
58 | XNormalLineChartConfiguration* configuration =
59 | [[XNormalLineChartConfiguration alloc] init];
60 | configuration.lineMode = CurveLine;
61 |
62 | XLineChart* lineChart =
63 | [[XLineChart alloc] initWithFrame:CGRectMake(0, 0, 375, 200)
64 | dataItemArray:itemArray
65 | dataDiscribeArray:[NSMutableArray arrayWithArray:@[
66 | @"January", @"February", @"March", @"April", @"May"
67 | ]]
68 | topNumber:@240
69 | bottomNumber:@0
70 | graphMode:MutiLineGraph
71 | chartConfiguration:configuration];
72 | [self.contentView addSubview:lineChart];
73 | self.selectionStyle = UITableViewCellSelectionStyleNone;
74 | }
75 | return self;
76 | }
77 | @end
78 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/PieChartCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomeTwoTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 22/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XJYTableViewCell.h"
10 | static NSString* kPieChartCell = @"PieChartCell";
11 | @interface PieChartCell : XJYTableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/PositiveNegativeBarChartCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomeSixTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/04/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kPositiveNegativeBarChartCell =
11 | @"PositiveNegativeBarChartCell";
12 |
13 | @interface PositiveNegativeBarChartCell : UITableViewCell
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/SingleLineChartTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SingleLineChartTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by JunyiXie on 2017/11/25.
6 | // Copyright © 2017年 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kSingleLineChartCell = @"SingleLineChartCell";
11 |
12 | @interface SingleLineChartTableViewCell : UITableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/SingleLineChartTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // SingleLineChartTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by JunyiXie on 2017/11/25.
6 | // Copyright © 2017年 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "SingleLineChartTableViewCell.h"
10 |
11 | #import
12 |
13 | @implementation SingleLineChartTableViewCell
14 |
15 | - (void)awakeFromNib {
16 | [super awakeFromNib];
17 | // Initialization code
18 | }
19 |
20 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
21 | [super setSelected:selected animated:animated];
22 |
23 | // Configure the view for the selected state
24 | }
25 | - (instancetype)initWithStyle:(UITableViewCellStyle)style
26 | reuseIdentifier:(NSString*)reuseIdentifier {
27 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
28 | // XJYChart init Design for muti line
29 | // So @[oneitem] draw one line
30 |
31 |
32 | NSMutableArray* numberArray = [@[@120,@80,@160,@120,@150] mutableCopy];
33 | XLineChartItem* item =
34 | [[XLineChartItem alloc] initWithDataNumberArray:numberArray
35 | color:[UIColor salmonColor]];
36 | XNormalLineChartConfiguration* configuration =
37 | [[XNormalLineChartConfiguration alloc] init];
38 | configuration.isShowShadow = NO;
39 | configuration.isEnableNumberAnimation = NO;
40 | // configuration.isEnableNumberLabel = YES;
41 | XLineChart* lineChart =
42 | [[XLineChart alloc] initWithFrame:CGRectMake(0, 0, 375, 200)
43 | dataItemArray:[NSMutableArray arrayWithObject:item]
44 | dataDiscribeArray:[NSMutableArray arrayWithArray:@[
45 | @"January", @"February", @"March", @"April", @"May"
46 | ]]
47 | topNumber:@240
48 | bottomNumber:@0
49 | graphMode:MutiLineGraph
50 | chartConfiguration:configuration];
51 |
52 | [self.contentView addSubview:lineChart];
53 | self.selectionStyle = UITableViewCellSelectionStyleNone;
54 | }
55 | return self;
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/StackAreaTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // StackAreaTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 | static NSString* kStackAreaTableViewCell = @"StackAreaTableViewCell";
11 |
12 | @interface StackAreaTableViewCell : UITableViewCell
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/StackAreaTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // StackAreaTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 11/05/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "StackAreaTableViewCell.h"
10 | #import
11 | @implementation StackAreaTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 | - (instancetype)initWithStyle:(UITableViewCellStyle)style
24 | reuseIdentifier:(NSString*)reuseIdentifier {
25 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
26 | NSMutableArray* itemArray = [[NSMutableArray alloc] init];
27 |
28 | // NSMutableArray* numbersArray = [NSMutableArray new];
29 |
30 | NSMutableArray* numbersArray= [@[
31 | @[@45,@73,@155,@72,@53],
32 | @[@88,@97,@245,@166,@99],
33 | @[@81,@112,@133,@111,@90],
34 | ] mutableCopy];
35 |
36 | NSArray* colorArray = @[
37 | [UIColor blueberryColor], [UIColor pastelGreenColor], [UIColor dangerColor],
38 |
39 | ];
40 |
41 | for (int i = 0; i < 3; i++) {
42 | XLineChartItem* item =
43 | [[XLineChartItem alloc] initWithDataNumberArray:numbersArray[i]
44 | color:colorArray[i]];
45 | [itemArray addObject:item];
46 | }
47 | XStackAreaLineChartConfiguration* configuration =
48 | [[XStackAreaLineChartConfiguration alloc] init];
49 | configuration.lineMode = CurveLine;
50 | XLineChart* lineChart =
51 | [[XLineChart alloc] initWithFrame:CGRectMake(0, 0, 375, 200)
52 | dataItemArray:itemArray
53 | dataDiscribeArray:[NSMutableArray arrayWithArray:@[
54 | @"January", @"February", @"March", @"April", @"May"
55 | ]]
56 | topNumber:@750
57 | bottomNumber:@0
58 | graphMode:StackAreaLineGraph
59 | chartConfiguration:configuration];
60 | [self.contentView addSubview:lineChart];
61 | self.selectionStyle = UITableViewCellSelectionStyleNone;
62 | }
63 | return self;
64 | }
65 | @end
66 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/XJYTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYTableViewCell.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XJYTableViewCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/XJYTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // XJYTableViewCell.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XJYTableViewCell.h"
10 |
11 | @implementation XJYTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 | }
21 |
22 | - (instancetype)initWithStyle:(UITableViewCellStyle)style
23 | reuseIdentifier:(NSString*)reuseIdentifier {
24 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
25 | // self.backgroundColor = [UIColor colorWithRed:235/255.0
26 | // green:235/255.0 blue:235/255.0 alpha:1];
27 | self.selectionStyle = UITableViewCellSelectionStyleNone;
28 | }
29 | return self;
30 | }
31 | @end
32 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/XJYViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // XJYViewController.h
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XJYViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/View/XJYViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // XJYViewController.m
3 | // RecordLife
4 | //
5 | // Created by 谢俊逸 on 17/01/2017.
6 | // Copyright © 2017 谢俊逸. All rights reserved.
7 | //
8 |
9 | #import "XJYViewController.h"
10 |
11 | @interface XJYViewController ()
12 |
13 | @end
14 |
15 | @implementation XJYViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.navigationController.navigationBar.tintColor = [UIColor blackColor];
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 |
28 | // this is Apple's recommended place for adding/updating constraints
29 | - (void)updateViewConstraints {
30 | [super updateViewConstraints];
31 | }
32 |
33 | // tell UIKit that you are using AutoLayout
34 | + (BOOL)requiresConstraintBasedLayout {
35 | return YES;
36 | }
37 | @end
38 |
--------------------------------------------------------------------------------
/XJYChartDemo/XJYChartDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // XJYChartDemo
4 | //
5 | // Created by JunyiXie on 2017/11/26.
6 | // Copyright © 2017年 JunyiXie. 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 |
--------------------------------------------------------------------------------
/photos/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/photos/icon.png
--------------------------------------------------------------------------------
/photos/image1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/photos/image1.PNG
--------------------------------------------------------------------------------
/photos/image4.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/photos/image4.PNG
--------------------------------------------------------------------------------
/photos/image5.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JunyiXie/XJYChart/e468a21e8c208bb22ea42cd08bdb083d3e0226a3/photos/image5.PNG
--------------------------------------------------------------------------------