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

Updating 4.0.0 with latest changes in master #3130

Merged
merged 31 commits into from
Dec 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
37c8a77
Fix turning off drag in X and Y axes separately.
maciejtrybilo Nov 2, 2017
69d12af
Minor changes to Formatter logic
jjatie Nov 14, 2017
d1b4fcf
Resubmit of #2730
jjatie Nov 14, 2017
cd0b984
Merge branch 'master' into equatable-fixed
jjatie Nov 15, 2017
d864fb5
Made use of `==` where appropriate to simplify logic
jjatie Nov 15, 2017
48386a3
Merge remote-tracking branch 'origin/equatable-fixed' into equatable-…
jjatie Nov 15, 2017
40bb001
Merge remote-tracking branch 'upstream/master' into minor-formatter-l…
jjatie Nov 15, 2017
9ea3c20
Fixes for PR
jjatie Nov 15, 2017
6869d85
Removed @objc from internal properties
jjatie Nov 23, 2017
c7a1c04
Removed `isKind(of:)`
jjatie Nov 23, 2017
122013e
Animator non nil (#2981)
jjatie Nov 24, 2017
fb02977
View port handler nonnil (#2980)
jjatie Nov 27, 2017
0f74a25
`ChartRenderer`'s must be initialized with a chart (#2982)
jjatie Nov 27, 2017
19da2c0
Merge pull request #3044 from jjatie/iskind-of
liuxuan30 Dec 5, 2017
b87d04e
Merge pull request #3038 from jjatie/internal-drop-objc
liuxuan30 Dec 5, 2017
60829b3
Merge pull request #2949 from maciejtrybilo/master
liuxuan30 Dec 5, 2017
8c9d5f3
fileprivate -> private (#3042)
jjatie Dec 8, 2017
c6faf53
for #2745. chart should be weak.
liuxuan30 Dec 8, 2017
2ff5cb5
Merge pull request #3078 from liuxuan30/2772
liuxuan30 Dec 8, 2017
6fee51c
Fix a bug may cause infinite loop. (#3073)
JyHu Dec 9, 2017
d321093
Minor logic cleanup (#3041)
jjatie Dec 9, 2017
159e0f7
Replaced `ChartUtils.Math` in favour of an extension on `FloatingPoin…
jjatie Dec 11, 2017
3ab6706
Merge remote-tracking branch 'upstream/master' into minor-formatter-l…
jjatie Dec 11, 2017
d4a3d4f
The backing var is not necessary. (#3000)
jjatie Dec 14, 2017
f9a1456
for #3061
liuxuan30 Dec 14, 2017
f1acb2a
Merge pull request #3098 from danielgindi/3061
liuxuan30 Dec 14, 2017
ecdd295
Removed methods and properties deprecated in 1.0 (#2996)
jjatie Dec 18, 2017
5639818
Makes ChartsDemo compiling again (#3117)
valeriyvan Dec 19, 2017
8b18e76
Merge pull request #2998 from jjatie/minor-formatter-logic
jjatie Dec 24, 2017
0ef8aa1
Merge remote-tracking branch 'upstream/master' into equatable-fixed
jjatie Dec 24, 2017
428843f
Merge pull request #3002 from jjatie/equatable-fixed
jjatie Dec 24, 2017
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
4 changes: 4 additions & 0 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
17E994DA88777AA1D8CCFC58 /* BarChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31AA65EA27776F8C653C7E8 /* BarChartDataSet.swift */; };
203A39685CC96FC625F616E4 /* IHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998F2BFE318471AFC05B50AC /* IHighlighter.swift */; };
219192CA6B4895319AB49DCA /* BarLineScatterCandleBubbleRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B1C588E9DF6FFD56D7ADF8E /* BarLineScatterCandleBubbleRenderer.swift */; };
224EFF991FBAAC4700CF9B3B /* EquatableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224EFF981FBAAC4700CF9B3B /* EquatableTests.swift */; };
23649EFC635A76022F07FFA6 /* PieChartDataEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02157CF8CEE1189BF681DA /* PieChartDataEntry.swift */; };
23FA50B2730D8C7ACA091C4F /* BarChartRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F279974FE650E57A061B09 /* BarChartRenderer.swift */; };
24151B0729D77251A8494D70 /* LineRadarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 105FFC9D3773A9C7A60A897F /* LineRadarRenderer.swift */; };
Expand Down Expand Up @@ -182,6 +183,7 @@
1F3D55A7E6176D52DC957D27 /* XAxisRendererHorizontalBarChart.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = XAxisRendererHorizontalBarChart.swift; path = Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift; sourceTree = "<group>"; };
2194AA554712E6BA2677F114 /* BubbleChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BubbleChartRenderer.swift; path = Source/Charts/Renderers/BubbleChartRenderer.swift; sourceTree = "<group>"; };
219BC9CEA037F897E92E45D1 /* IScatterChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IScatterChartDataSet.swift; path = Source/Charts/Data/Interfaces/IScatterChartDataSet.swift; sourceTree = "<group>"; };
224EFF981FBAAC4700CF9B3B /* EquatableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = EquatableTests.swift; path = Tests/Charts/EquatableTests.swift; sourceTree = "<group>"; };
23D35CF6F9177D77B6B97AE1 /* XShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = XShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/XShapeRenderer.swift; sourceTree = "<group>"; };
2440DB759AB93B4A928A3F6F /* RadarChartView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RadarChartView.swift; path = Source/Charts/Charts/RadarChartView.swift; sourceTree = "<group>"; };
2465CB73738EBAFB46C57288 /* CombinedHighlighter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombinedHighlighter.swift; path = Source/Charts/Highlight/CombinedHighlighter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -510,6 +512,7 @@
isa = PBXGroup;
children = (
5C3F5E1A69EC06E86505F7B1 /* BarChartTests.swift */,
224EFF981FBAAC4700CF9B3B /* EquatableTests.swift */,
7AB9062A28AAB9469752A954 /* ChartUtilsTests.swift */,
D2E1819D72CD7B6C4A4E8048 /* LineChartTests.swift */,
064989451F5C99C7006E8BB3 /* Snapshot.swift */,
Expand Down Expand Up @@ -945,6 +948,7 @@
8E1192F7A7152E9DA92C56A9 /* ChartUtilsTests.swift in Sources */,
2BF85BEA981B359A65E9BF67 /* LineChartTests.swift in Sources */,
064989461F5C99C7006E8BB3 /* Snapshot.swift in Sources */,
224EFF991FBAAC4700CF9B3B /* EquatableTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion ChartsDemo/Objective-C/Demos/HalfPieChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleXValues"])
{
_chartView.drawSliceTextEnabled = !_chartView.isDrawSliceTextEnabled;
_chartView.drawEntryLabelsEnabled = !_chartView.drawEntryLabelsEnabled;

[_chartView setNeedsDisplay];
return;
Expand Down
9 changes: 8 additions & 1 deletion ChartsDemo/Objective-C/Demos/LineChart1ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ - (void)optionTapped:(NSString *)key
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
{
set.drawSteppedEnabled = !set.isDrawSteppedEnabled;
switch (set.mode) {
case LineChartModeLinear:
case LineChartModeCubicBezier:
case LineChartModeHorizontalBezier:
set.mode = LineChartModeStepped;
break;
case LineChartModeStepped: set.mode = LineChartModeLinear;
}
}

[_chartView setNeedsDisplay];
Expand Down
9 changes: 8 additions & 1 deletion ChartsDemo/Objective-C/Demos/LineChart2ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,14 @@ - (void)optionTapped:(NSString *)key
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
{
set.drawSteppedEnabled = !set.isDrawSteppedEnabled;
switch (set.mode) {
case LineChartModeLinear:
case LineChartModeCubicBezier:
case LineChartModeHorizontalBezier:
set.mode = LineChartModeStepped;
break;
case LineChartModeStepped: set.mode = LineChartModeLinear;
}
}

[_chartView setNeedsDisplay];
Expand Down
9 changes: 8 additions & 1 deletion ChartsDemo/Objective-C/Demos/LineChartTimeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,14 @@ - (void)optionTapped:(NSString *)key
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
{
set.drawSteppedEnabled = !set.isDrawSteppedEnabled;
switch (set.mode) {
case LineChartModeLinear:
case LineChartModeCubicBezier:
case LineChartModeHorizontalBezier:
set.mode = LineChartModeStepped;
break;
case LineChartModeStepped: set.mode = LineChartModeLinear;
}
}

[_chartView setNeedsDisplay];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ - (void)optionTapped:(NSString *)key
{
for (id<ILineChartDataSet> set in _chartView.data.dataSets)
{
set.drawSteppedEnabled = !set.isDrawSteppedEnabled;
switch (set.mode) {
case LineChartModeLinear:
case LineChartModeCubicBezier:
case LineChartModeHorizontalBezier:
set.mode = LineChartModeStepped;
break;
case LineChartModeStepped: set.mode = LineChartModeLinear;
}
}

[_chartView setNeedsDisplay];
Expand Down
2 changes: 1 addition & 1 deletion ChartsDemo/Objective-C/Demos/PieChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ - (void)optionTapped:(NSString *)key
{
if ([key isEqualToString:@"toggleXValues"])
{
_chartView.drawSliceTextEnabled = !_chartView.isDrawSliceTextEnabled;
_chartView.drawEntryLabelsEnabled = !_chartView.drawEntryLabelsEnabled;

[_chartView setNeedsDisplay];
return;
Expand Down
26 changes: 13 additions & 13 deletions Source/Charts/Animation/Animator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ open class Animator: NSObject
/// the phase that is animated and influences the drawn values on the y-axis
@objc open var phaseY: Double = 1.0

fileprivate var _startTimeX: TimeInterval = 0.0
fileprivate var _startTimeY: TimeInterval = 0.0
fileprivate var _displayLink: NSUIDisplayLink?
private var _startTimeX: TimeInterval = 0.0
private var _startTimeY: TimeInterval = 0.0
private var _displayLink: NSUIDisplayLink?

fileprivate var _durationX: TimeInterval = 0.0
fileprivate var _durationY: TimeInterval = 0.0
private var _durationX: TimeInterval = 0.0
private var _durationY: TimeInterval = 0.0

fileprivate var _endTimeX: TimeInterval = 0.0
fileprivate var _endTimeY: TimeInterval = 0.0
fileprivate var _endTime: TimeInterval = 0.0
private var _endTimeX: TimeInterval = 0.0
private var _endTimeY: TimeInterval = 0.0
private var _endTime: TimeInterval = 0.0

fileprivate var _enabledX: Bool = false
fileprivate var _enabledY: Bool = false
private var _enabledX: Bool = false
private var _enabledY: Bool = false

fileprivate var _easingX: ChartEasingFunctionBlock?
fileprivate var _easingY: ChartEasingFunctionBlock?
private var _easingX: ChartEasingFunctionBlock?
private var _easingY: ChartEasingFunctionBlock?

public override init()
{
Expand Down Expand Up @@ -119,7 +119,7 @@ open class Animator: NSObject
}
}

@objc fileprivate func animationLoop()
@objc private func animationLoop()
{
let currentTime: TimeInterval = CACurrentMediaTime()

Expand Down
4 changes: 2 additions & 2 deletions Source/Charts/Charts/BarChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import CoreGraphics
open class BarChartView: BarLineChartViewBase, BarChartDataProvider
{
/// if set to true, all values are drawn above their bars, instead of below their top
fileprivate var _drawValueAboveBarEnabled = true
private var _drawValueAboveBarEnabled = true

/// if set to true, a grey area is drawn behind each bar that indicates the maximum value
fileprivate var _drawBarShadowEnabled = false
private var _drawBarShadowEnabled = false

internal override func initialize()
{
Expand Down
Loading