Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve conflict for 4.0 branch and master #4456

Merged
merged 102 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
df62114
Merge pull request #3130 from danielgindi/master
jjatie Dec 24, 2017
1d245b7
Remove java interface convention (#2997)
jjatie Dec 26, 2017
e126844
Renderer protocols (#3136)
jjatie Dec 26, 2017
85573ee
Chartviewbase redundant ivar (#3045)
jjatie Jan 6, 2018
11ff349
BarChartRenderer Logic cleanup (#3008)
jjatie Jan 6, 2018
d9dba58
Syncing 4.0.0 with master (#3160)
jjatie Jan 7, 2018
9d8b76d
Moved ChartUtils drawing methods into CGContext extension (#3086)
jjatie Jan 8, 2018
28ed948
Utils Cleanup (#3054)
jjatie Jan 9, 2018
4285bbc
Chartdata collection conformance (#3023)
jjatie Jan 16, 2018
f9120d2
weak -> unowned (#3039)
jjatie Jan 21, 2018
34d2940
Removed optionality from valueFormatter where appropriate (#3106)
jjatie Jan 23, 2018
3ebee41
Chartdata collection refactor (#3024)
jjatie Jan 26, 2018
fe16641
Moved the default value formatter (#3088)
jjatie Jan 26, 2018
ef21083
Add option to rotate value text for line charts
Feb 14, 2017
5a1a46e
Add value text rotation for bar charts
Feb 21, 2018
31f7ad5
Add value text rotation for other charts
Feb 21, 2018
fa1c567
Fixed misuse/deprecation of "!" operator
jjatie Mar 10, 2018
ab79255
Updated projects for Xcode 9.3 and Swift 4.1
jjatie Mar 10, 2018
39f1550
Merge branch 'swift-4.1' of https://github.com/jjatie/Charts into 4.0.0
jjatie Mar 10, 2018
1bc15ce
pulled master
jjatie Mar 12, 2018
d957f4e
Pulled master
jjatie Mar 13, 2018
99341af
Moved travis to Xcode 9.3beta temporarily
jjatie Mar 13, 2018
2a6931f
Updated Rakefile for new project names
jjatie Mar 14, 2018
bb92e1f
Updated demo imports
jjatie Mar 14, 2018
ea87d1f
Rename valueRotationAngle -> valueLabelAngle
Mar 15, 2018
66cd435
Make function private & remove line break
Mar 15, 2018
32ef09e
pulled master
jjatie Mar 30, 2018
d74ce61
Refactored ChartData (#3169)
jjatie Apr 8, 2018
7141265
Remove unnecessary file (#3432)
larryonoff Apr 29, 2018
08bd20c
Dataset logic cleanup (#3001)
jjatie May 2, 2018
3db09d9
Added gradient line drawing to LineChartRenderer
Dec 28, 2017
8981f32
Stabilize and clean the code
larryonoff Apr 24, 2018
1c65999
Extract line drawing into function
larryonoff Apr 24, 2018
25eb164
Fix macOS build
larryonoff Apr 25, 2018
a13978f
Move `drawGradientLine` out of `drawLine` method
larryonoff Apr 25, 2018
470328a
Remove unused parameters from `drawLine` function
larryonoff Apr 25, 2018
6bd7bbd
Fix gradient location calculation
larryonoff Apr 26, 2018
9f20679
Add toggle gradient line into demo options
larryonoff Apr 27, 2018
342e088
Improvements after code review
larryonoff Apr 28, 2018
50b29b4
Code cleanup
larryonoff Apr 28, 2018
d7814af
Remove unnecessary function for generating gradient line
larryonoff Apr 28, 2018
aee20f0
Fix: gradient lines peaks are truncated when line width > 1
larryonoff Apr 28, 2018
4d2e335
Make legendRenderer property public in order to be externally customi…
nagykatalin May 7, 2018
1b387d8
Merge pull request #3415 from larryonoff/draw-gradient-line
pmairoldi Jun 10, 2018
52c06d6
Merge pull request #3445 from nagykatalin/customizable-legend
pmairoldi Jun 10, 2018
c523949
Merge branch 'master' into 4.0.0
pmairoldi Jun 10, 2018
0a7b712
fix build issue in objc demo
pmairoldi Jun 10, 2018
96345f6
Add minimum slice angle for value labels to PieChartView
mgod Jan 27, 2018
75c4fa5
Rename drawSliceTextMinimumAngle to sliceTextDrawingThreshold
mgod Mar 26, 2018
ba6bbc1
Fix sliceTextDrawingThreshold renaming in demo
mgod Mar 26, 2018
89706c0
fix build of demos
pmairoldi Jun 10, 2018
ea3cedd
Merge pull request #3500 from danielgindi/pr/3218
pmairoldi Jun 11, 2018
73183d5
Merge branch 'master' into 4.0.0
pmairoldi Jul 14, 2018
aadc3a8
Merge branch '4.0.0' into master
pmairoldi Jul 14, 2018
1d44ab3
Merge pull request #2200 from chinh-tran/master
pmairoldi Jul 14, 2018
7a5239a
Add label colors to legend entries (#3558)
pmairoldi Jul 20, 2018
68d5459
Merge branch 'master' into 4.0.0
pmairoldi Jul 29, 2018
707d627
Add Swift version 4.1 to podspec
larryonoff Aug 21, 2018
97587d0
Merge pull request #3608 from larryonoff/4.0.0
liuxuan30 Sep 6, 2018
9a7b922
Merge branch 'master' into 4.0.0
pmairoldi Oct 8, 2018
be8b386
Turned gradient components and locations into constants (#3775)
jjatie Dec 25, 2018
aa7e20a
Cleaned up `ChartDataSet` logic
jjatie Nov 14, 2017
438dae7
Added Collection conformances
jjatie Nov 18, 2017
8aba022
[#3018]
jjatie Nov 19, 2017
2ced54f
Fixed required initializers
jjatie Nov 20, 2017
7dfb59e
ChartData adopts ExressibleByArrayLiteral
jjatie Dec 1, 2017
b554fb0
Modified demos
jjatie Dec 1, 2017
51501a1
Pulled latest master
jjatie Dec 14, 2017
78fb682
Unified Style
jjatie Jan 9, 2018
bdf6f6d
Updates for PR
jjatie Jan 11, 2018
da2ff2d
Refactored ChartData
jjatie Jan 11, 2018
9aaee13
Fixed horizontal barchart bug,
jjatie Jan 12, 2018
f399bca
Removed unnecessary `get` from subscripts.
jjatie Jan 12, 2018
bd1bc8f
Disabled `remove(at:)` for CombinedChartView
jjatie Jan 15, 2018
74f28b1
Relocated `appendEntry(_:todataSet:)`
jjatie Jan 15, 2018
aec150e
Disabled Collection support for CombinedChartData
jjatie Jan 15, 2018
f606175
Removed used of dataSet(forIndex:)
jjatie Jan 16, 2018
6db01d2
Fixed merge conflicts
jjatie Jan 21, 2018
b8aa08e
updated demos
jjatie Jan 26, 2018
6d8471d
PR Fixes
jjatie Dec 25, 2018
52480db
Fixed axisLabels calculation
Jan 3, 2019
5689a1c
Merge pull request #3164 from jjatie/4.0/axis-renderer-cleanup
liuxuan30 Jan 4, 2019
4b23327
Fill rewrite (#3084)
jjatie Apr 16, 2020
9275d37
update to Swift 5, Xcode 13.5.1, and fix warnings
liuxuan30 Jul 27, 2020
84b501f
Merge branch '4.0.0' into ResolveConflict
liuxuan30 Aug 27, 2020
3f84f87
fix all compile errors and wrong symbols either by git or me.
liuxuan30 Aug 27, 2020
58ab2e0
revert back to convenience init for BarChartDataSet
liuxuan30 Aug 28, 2020
4229997
actually, I compared the old master and find this is a mistake while …
liuxuan30 Aug 28, 2020
0705a42
fix -0.0 issue in 4.0 merge. fix func calculateLegendOffsets in BarLi…
liuxuan30 Aug 28, 2020
bcbb0aa
fix pie chart UT failures. didSet will no be called in init(), so we…
liuxuan30 Aug 28, 2020
1c3891e
fix line chart UT failures
liuxuan30 Aug 28, 2020
2e60d0c
Remove `isIndirectValuesCall`
jjatie Aug 30, 2020
f7dab2f
Bump Travis to Xcode 12
jjatie Sep 23, 2020
2864cac
Remove misuse of `count` (#4461)
jjatie Sep 25, 2020
771978c
switch to source compiling swift code
liuxuan30 Oct 9, 2020
60bfc33
fix Carthage error after changing to source compile. https://github.c…
liuxuan30 Oct 9, 2020
9fc9f46
update project settings
liuxuan30 Oct 9, 2020
9d73463
recreate iOS+tvOS images due to iOS14 SDK uncertain changes.
liuxuan30 Oct 9, 2020
96ac08d
Merge pull request #4476 from danielgindi/bump-travis-ci-to-use-xcode-12
liuxuan30 Oct 19, 2020
32cc06e
Remove unnecessary ternary in boolean expression (#4435)
SixFiveSoftware Oct 19, 2020
201146d
Remove internal use of datasets (#4459)
jjatie Oct 28, 2020
05a59f7
Merge branch 'master' into ResolveConflict
liuxuan30 Oct 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: objective-c
osx_image: xcode11
osx_image: xcode12
matrix:
include:
- osx_image: xcode11
- osx_image: xcode12
env: PLATFORM="iOS"
- osx_image: xcode11
- osx_image: xcode12
env: PLATFORM="tvOS"
- osx_image: xcode11
- osx_image: xcode12
env: PLATFORM="macOS"
env:
global:
Expand All @@ -18,7 +18,7 @@ before_install:
- brew update
- brew upgrade carthage || true
- carthage version
- carthage bootstrap --platform $PLATFORM
- ./carthage.sh bootstrap --platform $PLATFORM --no-use-binaries
script:
- bundle exec rake ci[$PLATFORM]
after_success:
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "uber/ios-snapshot-test-case" "6.1.0"
github "uber/ios-snapshot-test-case" "6.2.0"
2 changes: 1 addition & 1 deletion Charts.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Charts"
s.version = "3.6.0"
s.version = "4.0.0"
s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)"
s.homepage = "https://github.com/danielgindi/Charts"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand Down
324 changes: 174 additions & 150 deletions Charts.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -656,12 +656,12 @@
TargetAttributes = {
225B361C1F6EB9A50005B3D5 = {
CreatedOnToolsVersion = 9.0;
LastSwiftMigration = 1000;
LastSwiftMigration = 1150;
};
5B57BBAE1A9B26AA0036A6CC = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 0900;
ProvisioningStyle = Manual;
LastSwiftMigration = 1150;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -897,6 +897,7 @@
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down Expand Up @@ -928,6 +929,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down Expand Up @@ -1049,12 +1051,16 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SOURCE_ROOT)/../Carthage/Build/iOS";
INFOPLIST_FILE = "Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ChartsDemo-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
Expand All @@ -1069,12 +1075,16 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SOURCE_ROOT)/../Carthage/Build/iOS";
INFOPLIST_FILE = "Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ChartsDemo-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
Expand Down
4 changes: 2 additions & 2 deletions ChartsDemo-iOS/Objective-C/Components/XYMarkerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import Charts

open class XYMarkerView: BalloonMarker
{
@objc open var xAxisValueFormatter: IAxisValueFormatter?
@objc open var xAxisValueFormatter: AxisValueFormatter?
fileprivate var yFormatter = NumberFormatter()

@objc public init(color: UIColor, font: UIFont, textColor: UIColor, insets: UIEdgeInsets,
xAxisValueFormatter: IAxisValueFormatter)
xAxisValueFormatter: AxisValueFormatter)
{
super.init(color: color, font: font, textColor: textColor, insets: insets)
self.xAxisValueFormatter = xAxisValueFormatter
Expand Down
10 changes: 5 additions & 5 deletions ChartsDemo-iOS/Objective-C/DemoBaseViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ - (void)handleOption:(NSString *)key forChartView:(ChartViewBase *)chartView
{
if ([key isEqualToString:@"toggleValues"])
{
for (id<IChartDataSet> set in chartView.data.dataSets)
for (id<ChartDataSetProtocol> set in chartView.data.dataSets)
{
set.drawValuesEnabled = !set.isDrawValuesEnabled;
}
Expand All @@ -85,7 +85,7 @@ - (void)handleOption:(NSString *)key forChartView:(ChartViewBase *)chartView

if ([key isEqualToString:@"toggleIcons"])
{
for (id<IChartDataSet> set in chartView.data.dataSets)
for (id<ChartDataSetProtocol> set in chartView.data.dataSets)
{
set.drawIconsEnabled = !set.isDrawIconsEnabled;
}
Expand All @@ -95,7 +95,7 @@ - (void)handleOption:(NSString *)key forChartView:(ChartViewBase *)chartView

if ([key isEqualToString:@"toggleHighlight"])
{
chartView.data.highlightEnabled = !chartView.data.isHighlightEnabled;
chartView.data.isHighlightEnabled = !chartView.data.isHighlightEnabled;
[chartView setNeedsDisplay];
}

Expand Down Expand Up @@ -143,9 +143,9 @@ - (void)handleOption:(NSString *)key forChartView:(ChartViewBase *)chartView

if ([key isEqualToString:@"toggleBarBorders"])
{
for (id<IBarChartDataSet, NSObject> set in chartView.data.dataSets)
for (id<BarChartDataSetProtocol, NSObject> set in chartView.data.dataSets)
{
if ([set conformsToProtocol:@protocol(IBarChartDataSet)])
if ([set conformsToProtocol:@protocol(BarChartDataSetProtocol)])
{
set.barBorderWidth = set.barBorderWidth == 1.0 ? 0.0 : 1.0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleShadowColorSameAsCandle"])
{
for (id<ICandleChartDataSet> set in _chartView.data.dataSets)
for (id<CandleChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.shadowColorSameAsCandle = !set.shadowColorSameAsCandle;
}
Expand All @@ -137,7 +137,7 @@ - (void)optionTapped:(NSString *)key
return;
} else if ([key isEqualToString:@"toggleShowCandleBar"])
{
for (id<ICandleChartDataSet> set in _chartView.data.dataSets)
for (id<CandleChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.showCandleBar = !set.showCandleBar;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ - (void)viewDidLoad

- (void)setupChart:(LineChartView *)chart data:(LineChartData *)data color:(UIColor *)color
{
[(LineChartDataSet *)[data getDataSetByIndex:0] setCircleHoleColor:color];
[(LineChartDataSet *)[data dataSetAtIndex:0] setCircleHoleColor:color];

chart.delegate = self;
chart.backgroundColor = color;
Expand Down
10 changes: 5 additions & 5 deletions ChartsDemo-iOS/Objective-C/Demos/CombinedChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define ITEM_COUNT 12

@interface CombinedChartViewController () <ChartViewDelegate, IChartAxisValueFormatter>
@interface CombinedChartViewController () <ChartViewDelegate, ChartAxisValueFormatter>
{
NSArray<NSString *> *months;
}
Expand Down Expand Up @@ -122,7 +122,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleLineValues"])
{
for (NSObject<IChartDataSet> *set in _chartView.data.dataSets)
for (NSObject<ChartDataSetProtocol> *set in _chartView.data.dataSets)
{
if ([set isKindOfClass:LineChartDataSet.class])
{
Expand All @@ -136,7 +136,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleBarValues"])
{
for (NSObject<IChartDataSet> *set in _chartView.data.dataSets)
for (NSObject<ChartDataSetProtocol> *set in _chartView.data.dataSets)
{
if ([set isKindOfClass:BarChartDataSet.class])
{
Expand All @@ -151,7 +151,7 @@ - (void)optionTapped:(NSString *)key
if ([key isEqualToString:@"removeDataSet"])
{
int rnd = (int)arc4random_uniform((float)_chartView.data.dataSetCount);
[_chartView.data removeDataSet:[_chartView.data getDataSetByIndex:rnd]];
[_chartView.data removeDataSet:[_chartView.data dataSetAtIndex:rnd]];
[_chartView.data notifyDataChanged];
[_chartView notifyDataSetChanged];
}
Expand Down Expand Up @@ -313,7 +313,7 @@ - (void)chartValueNothingSelected:(ChartViewBase * __nonnull)chartView
NSLog(@"chartValueNothingSelected");
}

#pragma mark - IAxisValueFormatter
#pragma mark - AxisValueFormatter

- (NSString *)stringForValue:(double)value
axis:(ChartAxisBase *)axis
Expand Down
12 changes: 6 additions & 6 deletions ChartsDemo-iOS/Objective-C/Demos/CubicLineChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import "CubicLineChartViewController.h"
#import "ChartsDemo_iOS-Swift.h"

@interface CubicLineSampleFillFormatter : NSObject <IChartFillFormatter>
@interface CubicLineSampleFillFormatter : NSObject <ChartFillFormatter>
{
}
@end
Expand Down Expand Up @@ -158,7 +158,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleFilled"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.drawFilledEnabled = !set.isDrawFilledEnabled;
}
Expand All @@ -169,7 +169,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleCircles"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.drawCirclesEnabled = !set.isDrawCirclesEnabled;
}
Expand All @@ -180,7 +180,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleCubic"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.mode = set.mode == LineChartModeCubicBezier ? LineChartModeLinear : LineChartModeCubicBezier;
}
Expand All @@ -191,7 +191,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleStepped"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.mode = set.mode == LineChartModeStepped ? LineChartModeLinear : LineChartModeStepped;
}
Expand All @@ -201,7 +201,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleHorizontalCubic"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.mode = set.mode == LineChartModeCubicBezier ? LineChartModeHorizontalBezier : LineChartModeCubicBezier;
}
Expand Down
18 changes: 9 additions & 9 deletions ChartsDemo-iOS/Objective-C/Demos/LineChart1ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ - (void)viewDidLoad
ChartLimitLine *llXAxis = [[ChartLimitLine alloc] initWithLimit:10.0 label:@"Index 10"];
llXAxis.lineWidth = 4.0;
llXAxis.lineDashLengths = @[@(10.f), @(10.f), @(0.f)];
llXAxis.labelPosition = ChartLimitLabelPositionBottomRight;
llXAxis.labelPosition = ChartLimitLabelPositionRightBottom;
llXAxis.valueFont = [UIFont systemFontOfSize:10.f];

//[_chartView.xAxis addLimitLine:llXAxis];
Expand All @@ -72,13 +72,13 @@ - (void)viewDidLoad
ChartLimitLine *ll1 = [[ChartLimitLine alloc] initWithLimit:150.0 label:@"Upper Limit"];
ll1.lineWidth = 4.0;
ll1.lineDashLengths = @[@5.f, @5.f];
ll1.labelPosition = ChartLimitLabelPositionTopRight;
ll1.labelPosition = ChartLimitLabelPositionRightTop;
ll1.valueFont = [UIFont systemFontOfSize:10.0];

ChartLimitLine *ll2 = [[ChartLimitLine alloc] initWithLimit:-30.0 label:@"Lower Limit"];
ll2.lineWidth = 4.0;
ll2.lineDashLengths = @[@5.f, @5.f];
ll2.labelPosition = ChartLimitLabelPositionBottomRight;
ll2.labelPosition = ChartLimitLabelPositionRightBottom;
ll2.valueFont = [UIFont systemFontOfSize:10.0];

ChartYAxis *leftAxis = _chartView.leftAxis;
Expand Down Expand Up @@ -174,7 +174,7 @@ - (void)setDataCount:(int)count range:(double)range
CGGradientRef gradient = CGGradientCreateWithColors(nil, (CFArrayRef)gradientColors, nil);

set1.fillAlpha = 1.f;
set1.fill = [ChartFill fillWithLinearGradient:gradient angle:90.f];
set1.fill = [[ChartLinearGradientFill alloc] initWithGradient:gradient angle:90.0f];
set1.drawFilledEnabled = YES;

CGGradientRelease(gradient);
Expand All @@ -192,7 +192,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleFilled"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.drawFilledEnabled = !set.isDrawFilledEnabled;
}
Expand All @@ -203,7 +203,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleCircles"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.drawCirclesEnabled = !set.isDrawCirclesEnabled;
}
Expand All @@ -214,7 +214,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleCubic"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.mode = set.mode == LineChartModeCubicBezier ? LineChartModeLinear : LineChartModeCubicBezier;
}
Expand All @@ -225,7 +225,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleStepped"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
switch (set.mode) {
case LineChartModeLinear:
Expand All @@ -242,7 +242,7 @@ - (void)optionTapped:(NSString *)key

if ([key isEqualToString:@"toggleHorizontalCubic"])
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
for (id<LineChartDataSetProtocol> set in _chartView.data.dataSets)
{
set.mode = set.mode == LineChartModeHorizontalBezier ? LineChartModeCubicBezier : LineChartModeHorizontalBezier;
}
Expand Down
Loading