Skip to content

Commit

Permalink
New features for animating the viewport (Closes #318)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Feb 27, 2016
1 parent 7541040 commit 0bf57ae
Show file tree
Hide file tree
Showing 12 changed files with 839 additions and 64 deletions.
45 changes: 44 additions & 1 deletion Charts/Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@
5BA8EC891A9D151C00CE82E1 /* ChartDataBaseFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC761A9D151C00CE82E1 /* ChartDataBaseFilter.swift */; };
5BAAA8561BB08E1D00B20D4D /* CombinedHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BAAA8551BB08E1D00B20D4D /* CombinedHighlighter.swift */; };
5BB6EC1D1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */; };
5BBBD9E11C80976300D01235 /* ZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */; };
5BBBD9E21C80976300D01235 /* ZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */; };
5BCAA74A1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */; };
5BCAA74B1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */; };
5BCAA74D1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */; };
5BCAA74E1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */; };
5BCAA7501C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */; };
5BCAA7511C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */; };
5BCAA7531C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */; };
5BCAA7541C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */; };
5BCAA7561C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */; };
5BCAA7571C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */; };
5BD4C57C1BCDBF6C00462351 /* BarChartDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD4C5751BCDBF6C00462351 /* BarChartDataProvider.swift */; };
5BD4C57D1BCDBF6C00462351 /* BarLineScatterCandleBubbleChartDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD4C5761BCDBF6C00462351 /* BarLineScatterCandleBubbleChartDataProvider.swift */; };
5BD4C57E1BCDBF6C00462351 /* BubbleChartDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD4C5771BCDBF6C00462351 /* BubbleChartDataProvider.swift */; };
Expand Down Expand Up @@ -320,6 +332,12 @@
5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartUtils.swift; sourceTree = "<group>"; };
5BAAA8551BB08E1D00B20D4D /* CombinedHighlighter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CombinedHighlighter.swift; sourceTree = "<group>"; };
5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartTransformerHorizontalBarChart.swift; sourceTree = "<group>"; };
5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomViewJob.swift; sourceTree = "<group>"; };
5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewPortJob.swift; sourceTree = "<group>"; };
5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoveViewJob.swift; sourceTree = "<group>"; };
5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedJob.swift; sourceTree = "<group>"; };
5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedMoveViewJob.swift; sourceTree = "<group>"; };
5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedZoomViewJob.swift; sourceTree = "<group>"; };
5BD4C5751BCDBF6C00462351 /* BarChartDataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarChartDataProvider.swift; sourceTree = "<group>"; };
5BD4C5761BCDBF6C00462351 /* BarLineScatterCandleBubbleChartDataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarLineScatterCandleBubbleChartDataProvider.swift; sourceTree = "<group>"; };
5BD4C5771BCDBF6C00462351 /* BubbleChartDataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleChartDataProvider.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -515,6 +533,7 @@
5B6654D41BB0A86F00890030 /* Formatters */,
5B0032431B65247600B6A2FE /* Highlight */,
5BD4C5661BCD9F0600462351 /* Interfaces */,
5BCAA7481C7CAA0800F83F3B /* Jobs */,
5B759ED41A9F98A90039D97F /* Renderers */,
5BA8EC781A9D151C00CE82E1 /* Utils */,
);
Expand Down Expand Up @@ -586,6 +605,19 @@
path = Utils;
sourceTree = "<group>";
};
5BCAA7481C7CAA0800F83F3B /* Jobs */ = {
isa = PBXGroup;
children = (
5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */,
5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */,
5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */,
5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */,
5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */,
5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */,
);
path = Jobs;
sourceTree = "<group>";
};
5BD4C5661BCD9F0600462351 /* Interfaces */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -816,6 +848,7 @@
buildActionMask = 2147483647;
files = (
5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */,
5BCAA74D1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */,
5BAAA8561BB08E1D00B20D4D /* CombinedHighlighter.swift in Sources */,
659400BC1BF463C1004F9C27 /* CombinedChartData.swift in Sources */,
5B680D211A9D17C30026A057 /* ChartLimitLine.swift in Sources */,
Expand All @@ -830,6 +863,7 @@
5B6A548B1AA66A3D000F57C2 /* LineChartRenderer.swift in Sources */,
5B6A54821AA5DF34000F57C2 /* ChartYAxisRendererRadarChart.swift in Sources */,
659400B81BF463C1004F9C27 /* ChartDataEntry.swift in Sources */,
5BCAA74A1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */,
5BD4C5821BCDBF6C00462351 /* ScatterChartDataProvider.swift in Sources */,
5B6A54931AA66AAB000F57C2 /* CombinedChartRenderer.swift in Sources */,
659400C01BF463C1004F9C27 /* LineChartDataSet.swift in Sources */,
Expand All @@ -840,6 +874,7 @@
5B680D221A9D17C30026A057 /* ChartXAxis.swift in Sources */,
5BA8EC891A9D151C00CE82E1 /* ChartDataBaseFilter.swift in Sources */,
659400A21BF463C1004F9C27 /* BarChartDataEntry.swift in Sources */,
5BCAA7501C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */,
5B6654DB1BB0A86F00890030 /* ChartXAxisValueFormatter.swift in Sources */,
5B6A54A31AA66B7C000F57C2 /* LineChartView.swift in Sources */,
5B6A54891AA66A1A000F57C2 /* PieChartRenderer.swift in Sources */,
Expand Down Expand Up @@ -867,6 +902,7 @@
5BB6EC1D1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift in Sources */,
5B680D271A9D17C30026A057 /* ChartColorTemplates.swift in Sources */,
659400C21BF463C1004F9C27 /* LineRadarChartDataSet.swift in Sources */,
5BBBD9E11C80976300D01235 /* ZoomViewJob.swift in Sources */,
5B6A54951AA66AC0000F57C2 /* CandleStickChartRenderer.swift in Sources */,
5B680D291A9D17C30026A057 /* ChartSelectionDetail.swift in Sources */,
659400A01BF463C1004F9C27 /* BarChartData.swift in Sources */,
Expand All @@ -886,12 +922,12 @@
5BD8F06D1AB897D500566E05 /* ChartViewPortHandler.swift in Sources */,
5B8FE2B11B68FFF900910C9E /* LineScatterCandleRadarChartRenderer.swift in Sources */,
5B4AC1CD1C58F55B0028D1A6 /* LineRadarChartRenderer.swift in Sources */,
5BCAA7531C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */,
65F06F9E1BE814800074498D /* IScatterChartDataSet.swift in Sources */,
5BD4C57E1BCDBF6C00462351 /* BubbleChartDataProvider.swift in Sources */,
5B6A54971AA66AD2000F57C2 /* BarChartRenderer.swift in Sources */,
659400CA1BF463C2004F9C27 /* RadarChartData.swift in Sources */,
5B6A546B1AA5C23F000F57C2 /* ChartMarker.swift in Sources */,
5B88D8BB1C6352C400B54CBD /* ChartDefaultFillFormatter.swift in Sources */,
5BD4C5801BCDBF6C00462351 /* ChartDataProvider.swift in Sources */,
5BD4C57C1BCDBF6C00462351 /* BarChartDataProvider.swift in Sources */,
5B0032491B6525FC00B6A2FE /* ChartHighlighter.swift in Sources */,
Expand Down Expand Up @@ -920,6 +956,7 @@
5B0032451B6524AD00B6A2FE /* ChartHighlight.swift in Sources */,
65F06F8E1BE807040074498D /* IChartDataSet.swift in Sources */,
5B680D201A9D17C30026A057 /* ChartLegend.swift in Sources */,
5BCAA7561C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */,
5B0032471B6524D300B6A2FE /* ChartRange.swift in Sources */,
5BD8F06E1AB89AD800566E05 /* HorizontalBarChartView.swift in Sources */,
);
Expand All @@ -930,6 +967,7 @@
buildActionMask = 2147483647;
files = (
5597263C1BDABC0500E05E59 /* ChartDefaultXAxisValueFormatter.swift in Sources */,
5BCAA74E1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */,
5597263D1BDABC0500E05E59 /* ChartFillFormatter.swift in Sources */,
659400BD1BF463C1004F9C27 /* CombinedChartData.swift in Sources */,
5597263E1BDABC0500E05E59 /* ChartXAxisValueFormatter.swift in Sources */,
Expand All @@ -944,6 +982,7 @@
559726431BDABC0500E05E59 /* CandleChartDataProvider.swift in Sources */,
559726441BDABC0500E05E59 /* ChartDataProvider.swift in Sources */,
659400B91BF463C1004F9C27 /* ChartDataEntry.swift in Sources */,
5BCAA74B1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */,
559726451BDABC0500E05E59 /* LineChartDataProvider.swift in Sources */,
559726461BDABC0500E05E59 /* ScatterChartDataProvider.swift in Sources */,
659400C11BF463C1004F9C27 /* LineChartDataSet.swift in Sources */,
Expand All @@ -954,6 +993,7 @@
A52C5C3F1BAC5D1100594CDD /* ChartAnimator.swift in Sources */,
A52C5C401BAC5D1100594CDD /* ChartAnimationEasing.swift in Sources */,
659400A31BF463C1004F9C27 /* BarChartDataEntry.swift in Sources */,
5BCAA7511C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */,
A52C5C411BAC5D1100594CDD /* BarChartView.swift in Sources */,
A52C5C421BAC5D1100594CDD /* BarLineChartViewBase.swift in Sources */,
A52C5C431BAC5D1100594CDD /* BubbleChartView.swift in Sources */,
Expand Down Expand Up @@ -981,6 +1021,7 @@
65F06F951BE812210074498D /* IBarLineScatterCandleBubbleChartDataSet.swift in Sources */,
A52C5C511BAC5D1100594CDD /* ChartMarker.swift in Sources */,
659400C31BF463C1004F9C27 /* LineRadarChartDataSet.swift in Sources */,
5BBBD9E21C80976300D01235 /* ZoomViewJob.swift in Sources */,
A52C5C521BAC5D1100594CDD /* ChartXAxis.swift in Sources */,
5B4AC1CB1C58A2B90028D1A6 /* ChartFill.swift in Sources */,
A52C5C531BAC5D1100594CDD /* ChartYAxis.swift in Sources */,
Expand All @@ -1000,6 +1041,7 @@
A52C5C761BAC5D1100594CDD /* BubbleChartRenderer.swift in Sources */,
A52C5C771BAC5D1100594CDD /* CandleStickChartRenderer.swift in Sources */,
65F06F9F1BE814800074498D /* IScatterChartDataSet.swift in Sources */,
5BCAA7541C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */,
A52C5C781BAC5D1100594CDD /* CombinedChartRenderer.swift in Sources */,
A52C5C791BAC5D1100594CDD /* ChartDataRendererBase.swift in Sources */,
A52C5C7A1BAC5D1200594CDD /* HorizontalBarChartRenderer.swift in Sources */,
Expand Down Expand Up @@ -1033,6 +1075,7 @@
65F06F8F1BE807040074498D /* IChartDataSet.swift in Sources */,
A52C5C8C1BAC5D1200594CDD /* ChartTransformer.swift in Sources */,
A52C5C8D1BAC5D1200594CDD /* ChartTransformerHorizontalBarChart.swift in Sources */,
5BCAA7571C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */,
A52C5C8E1BAC5D1200594CDD /* ChartUtils.swift in Sources */,
A52C5C8F1BAC5D1200594CDD /* ChartViewPortHandler.swift in Sources */,
);
Expand Down
2 changes: 1 addition & 1 deletion Charts/Classes/Animation/ChartAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ChartAnimator: NSObject
public var updateBlock: (() -> Void)?
public var stopBlock: (() -> Void)?

/// the phase that is animated and influences the drawn values on the y-axis
/// the phase that is animated and influences the drawn values on the x-axis
public var phaseX: CGFloat = 1.0

/// the phase that is animated and influences the drawn values on the y-axis
Expand Down
Loading

0 comments on commit 0bf57ae

Please sign in to comment.