diff --git a/Charts/Charts.xcodeproj/project.pbxproj b/Charts/Charts.xcodeproj/project.pbxproj index a24efe23cd..5be06053ad 100644 --- a/Charts/Charts.xcodeproj/project.pbxproj +++ b/Charts/Charts.xcodeproj/project.pbxproj @@ -94,14 +94,14 @@ 5B613DE91D5A069F000F1E98 /* DefaultValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B613DE81D5A069F000F1E98 /* DefaultValueFormatter.swift */; }; 5B613DEA1D5A069F000F1E98 /* DefaultValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B613DE81D5A069F000F1E98 /* DefaultValueFormatter.swift */; }; 5B613DEB1D5A069F000F1E98 /* DefaultValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B613DE81D5A069F000F1E98 /* DefaultValueFormatter.swift */; }; - 5B6556F71AB72BA000FFBFD3 /* ChartComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ChartComponentBase.swift */; }; + 5B6556F71AB72BA000FFBFD3 /* ComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ComponentBase.swift */; }; 5B6654D91BB0A86F00890030 /* DefaultAxisValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6654D51BB0A86F00890030 /* DefaultAxisValueFormatter.swift */; }; 5B6654DA1BB0A86F00890030 /* IFillFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6654D61BB0A86F00890030 /* IFillFormatter.swift */; }; - 5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* ChartAxisBase.swift */; }; - 5B680D201A9D17C30026A057 /* ChartLegend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* ChartLegend.swift */; }; + 5B680D1F1A9D17C30026A057 /* AxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* AxisBase.swift */; }; + 5B680D201A9D17C30026A057 /* Legend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* Legend.swift */; }; 5B680D211A9D17C30026A057 /* ChartLimitLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6C1A9D151C00CE82E1 /* ChartLimitLine.swift */; }; - 5B680D221A9D17C30026A057 /* ChartXAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */; }; - 5B680D231A9D17C30026A057 /* ChartYAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */; }; + 5B680D221A9D17C30026A057 /* XAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* XAxis.swift */; }; + 5B680D231A9D17C30026A057 /* YAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* YAxis.swift */; }; 5B680D271A9D17C30026A057 /* ChartColorTemplates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC791A9D151C00CE82E1 /* ChartColorTemplates.swift */; }; 5B680D2A1A9D17C30026A057 /* ChartUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */; }; 5B680D3D1A9D1AD90026A057 /* Charts.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B680D3C1A9D1AD90026A057 /* Charts.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -243,13 +243,13 @@ 65B3F5D21C7370E5000983D0 /* PieRadarChartViewBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54A61AA66BA7000F57C2 /* PieRadarChartViewBase.swift */; }; 65B3F5D31C7370E5000983D0 /* RadarChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54A81AA66BBA000F57C2 /* RadarChartView.swift */; }; 65B3F5D41C7370E5000983D0 /* ScatterChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54AA1AA66BC8000F57C2 /* ScatterChartView.swift */; }; - 65B3F5D51C7370E5000983D0 /* ChartAxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* ChartAxisBase.swift */; }; - 65B3F5D61C7370E5000983D0 /* ChartComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ChartComponentBase.swift */; }; - 65B3F5D71C7370E5000983D0 /* ChartLegend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* ChartLegend.swift */; }; + 65B3F5D51C7370E5000983D0 /* AxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* AxisBase.swift */; }; + 65B3F5D61C7370E5000983D0 /* ComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ComponentBase.swift */; }; + 65B3F5D71C7370E5000983D0 /* Legend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* Legend.swift */; }; 65B3F5D81C7370E5000983D0 /* ChartLimitLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6C1A9D151C00CE82E1 /* ChartLimitLine.swift */; }; 65B3F5D91C7370E5000983D0 /* IMarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A546A1AA5C23F000F57C2 /* IMarker.swift */; }; - 65B3F5DA1C7370E5000983D0 /* ChartXAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */; }; - 65B3F5DB1C7370E5000983D0 /* ChartYAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */; }; + 65B3F5DA1C7370E5000983D0 /* XAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* XAxis.swift */; }; + 65B3F5DB1C7370E5000983D0 /* YAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* YAxis.swift */; }; 65B3F5DC1C7370E5000983D0 /* IBarChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F06FA91BE818AA0074498D /* IBarChartDataSet.swift */; }; 65B3F5DD1C7370E5000983D0 /* IBarLineScatterCandleBubbleChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F06F931BE812210074498D /* IBarLineScatterCandleBubbleChartDataSet.swift */; }; 65B3F5DE1C7370E5000983D0 /* IBubbleChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F06FA01BE815220074498D /* IBubbleChartDataSet.swift */; }; @@ -373,13 +373,13 @@ A52C5C4A1BAC5D1100594CDD /* PieRadarChartViewBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54A61AA66BA7000F57C2 /* PieRadarChartViewBase.swift */; }; A52C5C4B1BAC5D1100594CDD /* RadarChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54A81AA66BBA000F57C2 /* RadarChartView.swift */; }; A52C5C4C1BAC5D1100594CDD /* ScatterChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A54AA1AA66BC8000F57C2 /* ScatterChartView.swift */; }; - A52C5C4D1BAC5D1100594CDD /* ChartAxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* ChartAxisBase.swift */; }; - A52C5C4E1BAC5D1100594CDD /* ChartComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ChartComponentBase.swift */; }; - A52C5C4F1BAC5D1100594CDD /* ChartLegend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* ChartLegend.swift */; }; + A52C5C4D1BAC5D1100594CDD /* AxisBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6A1A9D151C00CE82E1 /* AxisBase.swift */; }; + A52C5C4E1BAC5D1100594CDD /* ComponentBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6556F61AB72BA000FFBFD3 /* ComponentBase.swift */; }; + A52C5C4F1BAC5D1100594CDD /* Legend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6B1A9D151C00CE82E1 /* Legend.swift */; }; A52C5C501BAC5D1100594CDD /* ChartLimitLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6C1A9D151C00CE82E1 /* ChartLimitLine.swift */; }; A52C5C511BAC5D1100594CDD /* IMarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6A546A1AA5C23F000F57C2 /* IMarker.swift */; }; - A52C5C521BAC5D1100594CDD /* ChartXAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */; }; - A52C5C531BAC5D1100594CDD /* ChartYAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */; }; + A52C5C521BAC5D1100594CDD /* XAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6D1A9D151C00CE82E1 /* XAxis.swift */; }; + A52C5C531BAC5D1100594CDD /* YAxis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC6E1A9D151C00CE82E1 /* YAxis.swift */; }; A52C5C6D1BAC5D1100594CDD /* DataApproximator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC751A9D151C00CE82E1 /* DataApproximator.swift */; }; A52C5C6F1BAC5D1100594CDD /* Highlight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0032441B6524AD00B6A2FE /* Highlight.swift */; }; A52C5C701BAC5D1100594CDD /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0032461B6524D300B6A2FE /* Range.swift */; }; @@ -473,7 +473,7 @@ 5B613DC71D5466CE000F1E98 /* XShapeRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XShapeRenderer.swift; sourceTree = ""; }; 5B613DE41D5A0582000F1E98 /* IValueFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IValueFormatter.swift; sourceTree = ""; }; 5B613DE81D5A069F000F1E98 /* DefaultValueFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultValueFormatter.swift; sourceTree = ""; }; - 5B6556F61AB72BA000FFBFD3 /* ChartComponentBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartComponentBase.swift; sourceTree = ""; }; + 5B6556F61AB72BA000FFBFD3 /* ComponentBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentBase.swift; sourceTree = ""; }; 5B6654D51BB0A86F00890030 /* DefaultAxisValueFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultAxisValueFormatter.swift; sourceTree = ""; }; 5B6654D61BB0A86F00890030 /* IFillFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IFillFormatter.swift; sourceTree = ""; }; 5B680D3C1A9D1AD90026A057 /* Charts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Charts.h; sourceTree = ""; }; @@ -513,11 +513,11 @@ 5BA8EC401A9D14DC00CE82E1 /* Charts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Charts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5BA8EC441A9D14DC00CE82E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5BA8EC671A9D151C00CE82E1 /* ChartViewBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartViewBase.swift; sourceTree = ""; }; - 5BA8EC6A1A9D151C00CE82E1 /* ChartAxisBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ChartAxisBase.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 5BA8EC6B1A9D151C00CE82E1 /* ChartLegend.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartLegend.swift; sourceTree = ""; }; + 5BA8EC6A1A9D151C00CE82E1 /* AxisBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AxisBase.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + 5BA8EC6B1A9D151C00CE82E1 /* Legend.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Legend.swift; sourceTree = ""; }; 5BA8EC6C1A9D151C00CE82E1 /* ChartLimitLine.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartLimitLine.swift; sourceTree = ""; }; - 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartXAxis.swift; sourceTree = ""; }; - 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartYAxis.swift; sourceTree = ""; }; + 5BA8EC6D1A9D151C00CE82E1 /* XAxis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XAxis.swift; sourceTree = ""; }; + 5BA8EC6E1A9D151C00CE82E1 /* YAxis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YAxis.swift; sourceTree = ""; }; 5BA8EC751A9D151C00CE82E1 /* DataApproximator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataApproximator.swift; sourceTree = ""; }; 5BA8EC791A9D151C00CE82E1 /* ChartColorTemplates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartColorTemplates.swift; sourceTree = ""; }; 5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartUtils.swift; sourceTree = ""; }; @@ -806,16 +806,16 @@ 5BA8EC691A9D151C00CE82E1 /* Components */ = { isa = PBXGroup; children = ( - 5BA8EC6A1A9D151C00CE82E1 /* ChartAxisBase.swift */, - 5B6556F61AB72BA000FFBFD3 /* ChartComponentBase.swift */, - 5BA8EC6B1A9D151C00CE82E1 /* ChartLegend.swift */, + 5BA8EC6A1A9D151C00CE82E1 /* AxisBase.swift */, + 5B6556F61AB72BA000FFBFD3 /* ComponentBase.swift */, + 5BA8EC6B1A9D151C00CE82E1 /* Legend.swift */, 5BA8EC6C1A9D151C00CE82E1 /* ChartLimitLine.swift */, 5BDFEF231D6093F0000A869A /* LegendEntry.swift */, 5B6A546A1AA5C23F000F57C2 /* IMarker.swift */, 5B613DAE1D526BBF000F1E98 /* MarkerImage.swift */, 5B613DAA1D526B60000F1E98 /* MarkerView.swift */, - 5BA8EC6D1A9D151C00CE82E1 /* ChartXAxis.swift */, - 5BA8EC6E1A9D151C00CE82E1 /* ChartYAxis.swift */, + 5BA8EC6D1A9D151C00CE82E1 /* XAxis.swift */, + 5BA8EC6E1A9D151C00CE82E1 /* YAxis.swift */, ); path = Components; sourceTree = ""; @@ -1134,7 +1134,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */, + 5B680D1F1A9D17C30026A057 /* AxisBase.swift in Sources */, 5BCAA74D1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */, 5BAAA8561BB08E1D00B20D4D /* CombinedHighlighter.swift in Sources */, 659400BC1BF463C1004F9C27 /* CombinedChartData.swift in Sources */, @@ -1161,7 +1161,7 @@ 659400B21BF463C1004F9C27 /* CandleChartDataEntry.swift in Sources */, 659400B61BF463C1004F9C27 /* ChartData.swift in Sources */, 5B613DE51D5A0582000F1E98 /* IValueFormatter.swift in Sources */, - 5B680D221A9D17C30026A057 /* ChartXAxis.swift in Sources */, + 5B680D221A9D17C30026A057 /* XAxis.swift in Sources */, 659400A21BF463C1004F9C27 /* BarChartDataEntry.swift in Sources */, 5B613DAF1D526BBF000F1E98 /* MarkerImage.swift in Sources */, 5BCAA7501C7CAD4C00F83F3B /* AnimatedViewPortJob.swift in Sources */, @@ -1169,7 +1169,7 @@ 5B6A54891AA66A1A000F57C2 /* PieChartRenderer.swift in Sources */, 5B6A54991AA66B14000F57C2 /* BarChartView.swift in Sources */, 659400B41BF463C1004F9C27 /* CandleChartDataSet.swift in Sources */, - 5B680D231A9D17C30026A057 /* ChartYAxis.swift in Sources */, + 5B680D231A9D17C30026A057 /* YAxis.swift in Sources */, 5B6A54A91AA66BBA000F57C2 /* RadarChartView.swift in Sources */, 5B378F171AD500A4009414A4 /* ChartAnimationEasing.swift in Sources */, 5B6A548F1AA66A7A000F57C2 /* HorizontalBarChartRenderer.swift in Sources */, @@ -1256,12 +1256,12 @@ 659400A61BF463C1004F9C27 /* BarLineScatterCandleBubbleChartData.swift in Sources */, 65F06FA41BE816050074498D /* ILineChartDataSet.swift in Sources */, 5B6A549F1AA66B59000F57C2 /* CombinedChartView.swift in Sources */, - 5B6556F71AB72BA000FFBFD3 /* ChartComponentBase.swift in Sources */, + 5B6556F71AB72BA000FFBFD3 /* ComponentBase.swift in Sources */, 5B680D2A1A9D17C30026A057 /* ChartUtils.swift in Sources */, 659400C81BF463C1004F9C27 /* PieChartDataSet.swift in Sources */, 5B0032451B6524AD00B6A2FE /* Highlight.swift in Sources */, 65F06F8E1BE807040074498D /* IChartDataSet.swift in Sources */, - 5B680D201A9D17C30026A057 /* ChartLegend.swift in Sources */, + 5B680D201A9D17C30026A057 /* Legend.swift in Sources */, 5BCAA7561C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */, 5B0032471B6524D300B6A2FE /* Range.swift in Sources */, 5BD8F06E1AB89AD800566E05 /* HorizontalBarChartView.swift in Sources */, @@ -1292,17 +1292,17 @@ 65B3F5D31C7370E5000983D0 /* RadarChartView.swift in Sources */, 5B613DCA1D5466CE000F1E98 /* ChevronDownShapeRenderer.swift in Sources */, 65B3F5D41C7370E5000983D0 /* ScatterChartView.swift in Sources */, - 65B3F5D51C7370E5000983D0 /* ChartAxisBase.swift in Sources */, + 65B3F5D51C7370E5000983D0 /* AxisBase.swift in Sources */, 5B613DD31D5466CE000F1E98 /* CrossShapeRenderer.swift in Sources */, - 65B3F5D61C7370E5000983D0 /* ChartComponentBase.swift in Sources */, + 65B3F5D61C7370E5000983D0 /* ComponentBase.swift in Sources */, 5B613DEB1D5A069F000F1E98 /* DefaultValueFormatter.swift in Sources */, - 65B3F5D71C7370E5000983D0 /* ChartLegend.swift in Sources */, + 65B3F5D71C7370E5000983D0 /* Legend.swift in Sources */, 65B3F5D81C7370E5000983D0 /* ChartLimitLine.swift in Sources */, 5B613DD61D5466CE000F1E98 /* IShapeRenderer.swift in Sources */, 65B3F5D91C7370E5000983D0 /* IMarker.swift in Sources */, - 65B3F5DA1C7370E5000983D0 /* ChartXAxis.swift in Sources */, + 65B3F5DA1C7370E5000983D0 /* XAxis.swift in Sources */, 5B9A0C251C83A7E200ED8ED8 /* MoveViewJob.swift in Sources */, - 65B3F5DB1C7370E5000983D0 /* ChartYAxis.swift in Sources */, + 65B3F5DB1C7370E5000983D0 /* YAxis.swift in Sources */, 65B3F5DC1C7370E5000983D0 /* IBarChartDataSet.swift in Sources */, 65B3F5DD1C7370E5000983D0 /* IBarLineScatterCandleBubbleChartDataSet.swift in Sources */, 65B3F5DE1C7370E5000983D0 /* IBubbleChartDataSet.swift in Sources */, @@ -1461,21 +1461,21 @@ 659400A51BF463C1004F9C27 /* BarChartDataSet.swift in Sources */, A52C5C4C1BAC5D1100594CDD /* ScatterChartView.swift in Sources */, 659400BB1BF463C1004F9C27 /* ChartDataSet.swift in Sources */, - A52C5C4D1BAC5D1100594CDD /* ChartAxisBase.swift in Sources */, + A52C5C4D1BAC5D1100594CDD /* AxisBase.swift in Sources */, 65F06FA81BE817560074498D /* ICandleChartDataSet.swift in Sources */, - A52C5C4E1BAC5D1100594CDD /* ChartComponentBase.swift in Sources */, + A52C5C4E1BAC5D1100594CDD /* ComponentBase.swift in Sources */, 65F06FB11BE826090074498D /* IRadarChartDataSet.swift in Sources */, 659400C71BF463C1004F9C27 /* PieChartData.swift in Sources */, - A52C5C4F1BAC5D1100594CDD /* ChartLegend.swift in Sources */, + A52C5C4F1BAC5D1100594CDD /* Legend.swift in Sources */, A52C5C501BAC5D1100594CDD /* ChartLimitLine.swift in Sources */, 65F06F9B1BE8136F0074498D /* ILineRadarChartDataSet.swift in Sources */, 65F06F951BE812210074498D /* IBarLineScatterCandleBubbleChartDataSet.swift in Sources */, A52C5C511BAC5D1100594CDD /* IMarker.swift in Sources */, 659400C31BF463C1004F9C27 /* LineRadarChartDataSet.swift in Sources */, 5BBBD9E21C80976300D01235 /* ZoomViewJob.swift in Sources */, - A52C5C521BAC5D1100594CDD /* ChartXAxis.swift in Sources */, + A52C5C521BAC5D1100594CDD /* XAxis.swift in Sources */, 5B4AC1CB1C58A2B90028D1A6 /* Fill.swift in Sources */, - A52C5C531BAC5D1100594CDD /* ChartYAxis.swift in Sources */, + A52C5C531BAC5D1100594CDD /* YAxis.swift in Sources */, A52C5C6D1BAC5D1100594CDD /* DataApproximator.swift in Sources */, 659400A11BF463C1004F9C27 /* BarChartData.swift in Sources */, 65B3F6331C739F7F000983D0 /* Platform.swift in Sources */, diff --git a/Charts/Classes/Charts/BarLineChartViewBase.swift b/Charts/Classes/Charts/BarLineChartViewBase.swift index 35842e6778..f04490f8e6 100644 --- a/Charts/Classes/Charts/BarLineChartViewBase.swift +++ b/Charts/Classes/Charts/BarLineChartViewBase.swift @@ -55,10 +55,10 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public var keepPositionOnRotation: Bool = false /// the object representing the left y-axis - internal var _leftAxis: ChartYAxis! + internal var _leftAxis: YAxis! /// the object representing the right y-axis - internal var _rightAxis: ChartYAxis! + internal var _rightAxis: YAxis! internal var _leftYAxisRenderer: YAxisRenderer! internal var _rightYAxisRenderer: YAxisRenderer! @@ -97,8 +97,8 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar { super.initialize() - _leftAxis = ChartYAxis(position: .Left) - _rightAxis = ChartYAxis(position: .Right) + _leftAxis = YAxis(position: .Left) + _rightAxis = YAxis(position: .Right) _leftAxisTransformer = Transformer(viewPortHandler: _viewPortHandler) _rightAxisTransformer = Transformer(viewPortHandler: _viewPortHandler) @@ -994,7 +994,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar scaleY: CGFloat, xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency) + axis: YAxis.AxisDependency) { let job = ZoomViewJob( viewPortHandler: viewPortHandler, @@ -1042,7 +1042,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar scaleY: CGFloat, xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easing: ChartEasingFunctionBlock?) { @@ -1084,7 +1084,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar scaleY: CGFloat, xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easingOption: ChartEasingOption) { @@ -1105,7 +1105,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar scaleY: CGFloat, xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval) { zoomAndCenterViewAnimated(scaleX: scaleX, scaleY: scaleY, xValue: xValue, yValue: yValue, axis: axis, duration: duration, easingOption: .EaseInOutSine) @@ -1174,7 +1174,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// /// - parameter yRange: /// - parameter axis: - the axis for which this limit should apply - public func setVisibleYRangeMaximum(maxYRange: Double, axis: ChartYAxis.AxisDependency) + public func setVisibleYRangeMaximum(maxYRange: Double, axis: YAxis.AxisDependency) { let yScale = getAxisRange(axis) / maxYRange _viewPortHandler.setMinimumScaleY(CGFloat(yScale)) @@ -1184,7 +1184,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// /// - parameter yRange: /// - parameter axis: - the axis for which this limit should apply - public func setVisibleYRangeMinimum(minYRange: Double, axis: ChartYAxis.AxisDependency) + public func setVisibleYRangeMinimum(minYRange: Double, axis: YAxis.AxisDependency) { let yScale = getAxisRange(axis) / minYRange _viewPortHandler.setMaximumScaleY(CGFloat(yScale)) @@ -1195,7 +1195,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// - parameter minYRange: /// - parameter maxYRange: /// - parameter axis: - public func setVisibleYRange(minYRange minYRange: Double, maxYRange: Double, axis: ChartYAxis.AxisDependency) + public func setVisibleYRange(minYRange minYRange: Double, maxYRange: Double, axis: YAxis.AxisDependency) { let minScale = getAxisRange(axis) / minYRange let maxScale = getAxisRange(axis) / maxYRange @@ -1221,7 +1221,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// /// - parameter yValue: /// - parameter axis: - which axis should be used as a reference for the y-axis - public func moveViewToY(yValue: Double, axis: ChartYAxis.AxisDependency) + public func moveViewToY(yValue: Double, axis: YAxis.AxisDependency) { let yInView = getAxisRange(axis) / Double(_viewPortHandler.scaleY) @@ -1241,7 +1241,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// - parameter xValue: /// - parameter yValue: /// - parameter axis: - which axis should be used as a reference for the y-axis - public func moveViewTo(xValue xValue: Double, yValue: Double, axis: ChartYAxis.AxisDependency) + public func moveViewTo(xValue xValue: Double, yValue: Double, axis: YAxis.AxisDependency) { let yInView = getAxisRange(axis) / Double(_viewPortHandler.scaleY) @@ -1266,7 +1266,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func moveViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easing: ChartEasingFunctionBlock?) { @@ -1301,7 +1301,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func moveViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easingOption: ChartEasingOption) { @@ -1319,7 +1319,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func moveViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval) { moveViewToAnimated(xValue: xValue, yValue: yValue, axis: axis, duration: duration, easingOption: .EaseInOutSine) @@ -1334,7 +1334,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func centerViewTo( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency) + axis: YAxis.AxisDependency) { let yInView = getAxisRange(axis) / Double(_viewPortHandler.scaleY) let xInView = xAxis.axisRange / Double(_viewPortHandler.scaleX) @@ -1359,7 +1359,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func centerViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easing: ChartEasingFunctionBlock?) { @@ -1394,7 +1394,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func centerViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval, easingOption: ChartEasingOption) { @@ -1411,7 +1411,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public func centerViewToAnimated( xValue xValue: Double, yValue: Double, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, duration: NSTimeInterval) { centerViewToAnimated(xValue: xValue, yValue: yValue, axis: axis, duration: duration, easingOption: .EaseInOutSine) @@ -1447,7 +1447,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar // MARK: - Accessors /// - returns: The range of the specified axis. - public func getAxisRange(axis: ChartYAxis.AxisDependency) -> Double + public func getAxisRange(axis: YAxis.AxisDependency) -> Double { if (axis == .Left) { @@ -1460,7 +1460,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar } /// - returns: The position (in pixels) the provided Entry has inside the chart view - public func getPosition(e: ChartDataEntry, axis: ChartYAxis.AxisDependency) -> CGPoint + public func getPosition(e: ChartDataEntry, axis: YAxis.AxisDependency) -> CGPoint { var vals = CGPoint(x: CGFloat(e.x), y: CGFloat(e.y)) @@ -1597,14 +1597,14 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// (encapsulated in a `CGPoint`). This method transforms pixel coordinates to /// coordinates / values in the chart. This is the opposite method to /// `getPixelsForValues(...)`. - public func valueForTouchPoint(pt pt: CGPoint, axis: ChartYAxis.AxisDependency) -> CGPoint + public func valueForTouchPoint(pt pt: CGPoint, axis: YAxis.AxisDependency) -> CGPoint { return getTransformer(axis).valueForTouchPoint(pt) } /// Transforms the given chart values into pixels. This is the opposite /// method to `valueForTouchPoint(...)`. - public func pixelForValues(x x: Double, y: Double, axis: ChartYAxis.AxisDependency) -> CGPoint + public func pixelForValues(x x: Double, y: Double, axis: YAxis.AxisDependency) -> CGPoint { return getTransformer(axis).pixelForValues(x: x, y: y) } @@ -1656,18 +1656,18 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// - returns: The left y-axis object. In the horizontal bar-chart, this is the /// top axis. - public var leftAxis: ChartYAxis + public var leftAxis: YAxis { return _leftAxis } /// - returns: The right y-axis object. In the horizontal bar-chart, this is the /// bottom axis. - public var rightAxis: ChartYAxis { return _rightAxis; } + public var rightAxis: YAxis { return _rightAxis; } /// - returns: The y-axis object to the corresponding AxisDependency. In the /// horizontal bar-chart, LEFT == top, RIGHT == BOTTOM - public func getAxis(axis: ChartYAxis.AxisDependency) -> ChartYAxis + public func getAxis(axis: YAxis.AxisDependency) -> YAxis { if (axis == .Left) { @@ -1775,7 +1775,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar public var isAutoScaleMinMaxEnabled : Bool { return autoScaleMinMaxEnabled; } /// Sets a minimum width to the specified y axis. - public func setYAxisMinWidth(which: ChartYAxis.AxisDependency, width: CGFloat) + public func setYAxisMinWidth(which: YAxis.AxisDependency, width: CGFloat) { if (which == .Left) { @@ -1789,7 +1789,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// **default**: 0.0 /// - returns: The (custom) minimum width of the specified Y axis. - public func getYAxisMinWidth(which: ChartYAxis.AxisDependency) -> CGFloat + public func getYAxisMinWidth(which: YAxis.AxisDependency) -> CGFloat { if (which == .Left) { @@ -1802,7 +1802,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar } /// Sets a maximum width to the specified y axis. /// Zero (0.0) means there's no maximum width - public func setYAxisMaxWidth(which: ChartYAxis.AxisDependency, width: CGFloat) + public func setYAxisMaxWidth(which: YAxis.AxisDependency, width: CGFloat) { if (which == .Left) { @@ -1818,7 +1818,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// /// **default**: 0.0 (no maximum specified) /// - returns: The (custom) maximum width of the specified Y axis. - public func getYAxisMaxWidth(which: ChartYAxis.AxisDependency) -> CGFloat + public func getYAxisMaxWidth(which: YAxis.AxisDependency) -> CGFloat { if (which == .Left) { @@ -1831,7 +1831,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar } /// - returns the width of the specified y axis. - public func getYAxisWidth(which: ChartYAxis.AxisDependency) -> CGFloat + public func getYAxisWidth(which: YAxis.AxisDependency) -> CGFloat { if (which == .Left) { @@ -1848,7 +1848,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar /// - returns: The Transformer class that contains all matrices and is /// responsible for transforming values into pixels on the screen and /// backwards. - public func getTransformer(which: ChartYAxis.AxisDependency) -> Transformer + public func getTransformer(which: YAxis.AxisDependency) -> Transformer { if (which == .Left) { @@ -1873,7 +1873,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar } } - public func isInverted(axis: ChartYAxis.AxisDependency) -> Bool + public func isInverted(axis: YAxis.AxisDependency) -> Bool { return getAxis(axis).isInverted } diff --git a/Charts/Classes/Charts/ChartViewBase.swift b/Charts/Classes/Charts/ChartViewBase.swift index eeebe239c5..a3596e6d07 100755 --- a/Charts/Classes/Charts/ChartViewBase.swift +++ b/Charts/Classes/Charts/ChartViewBase.swift @@ -42,7 +42,7 @@ public class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate /// - returns: The object representing all x-labels, this method can be used to /// acquire the XAxis object and modify it (e.g. change the position of the /// labels) - public var xAxis: ChartXAxis + public var xAxis: XAxis { return _xAxis } @@ -86,10 +86,10 @@ public class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate internal var _drawUnitInChart = false /// the object representing the labels on the x-axis - internal var _xAxis: ChartXAxis! + internal var _xAxis: XAxis! /// the legend object containing all data associated with the legend - internal var _legend: ChartLegend! + internal var _legend: Legend! /// delegate to receive chart events public weak var delegate: ChartViewDelegate? @@ -187,10 +187,10 @@ public class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate _viewPortHandler = ViewPortHandler() _viewPortHandler.setChartDimens(width: bounds.size.width, height: bounds.size.height) - _legend = ChartLegend() + _legend = Legend() _legendRenderer = LegendRenderer(viewPortHandler: _viewPortHandler, legend: _legend) - _xAxis = ChartXAxis() + _xAxis = XAxis() self.addObserver(self, forKeyPath: "bounds", options: .New, context: nil) self.addObserver(self, forKeyPath: "frame", options: .New, context: nil) @@ -768,7 +768,7 @@ public class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate } /// - returns: The Legend object of the chart. This method can be used to get an instance of the legend in order to customize the automatically generated Legend. - public var legend: ChartLegend + public var legend: Legend { return _legend } diff --git a/Charts/Classes/Charts/HorizontalBarChartView.swift b/Charts/Classes/Charts/HorizontalBarChartView.swift index 63d1e530f7..e17d1c24c7 100644 --- a/Charts/Classes/Charts/HorizontalBarChartView.swift +++ b/Charts/Classes/Charts/HorizontalBarChartView.swift @@ -127,7 +127,7 @@ public class HorizontalBarChartView: BarChartView return bounds } - public override func getPosition(e: ChartDataEntry, axis: ChartYAxis.AxisDependency) -> CGPoint + public override func getPosition(e: ChartDataEntry, axis: YAxis.AxisDependency) -> CGPoint { var vals = CGPoint(x: CGFloat(e.y), y: CGFloat(e.x)) @@ -192,19 +192,19 @@ public class HorizontalBarChartView: BarChartView viewPortHandler.setMinMaxScaleY(minScaleY: CGFloat(minScale), maxScaleY: CGFloat(maxScale)) } - public override func setVisibleYRangeMaximum(maxYRange: Double, axis: ChartYAxis.AxisDependency) + public override func setVisibleYRangeMaximum(maxYRange: Double, axis: YAxis.AxisDependency) { let yScale = getAxisRange(axis) / maxYRange viewPortHandler.setMinimumScaleX(CGFloat(yScale)) } - public override func setVisibleYRangeMinimum(minYRange: Double, axis: ChartYAxis.AxisDependency) + public override func setVisibleYRangeMinimum(minYRange: Double, axis: YAxis.AxisDependency) { let yScale = getAxisRange(axis) / minYRange viewPortHandler.setMaximumScaleX(CGFloat(yScale)) } - public override func setVisibleYRange(minYRange minYRange: Double, maxYRange: Double, axis: ChartYAxis.AxisDependency) + public override func setVisibleYRange(minYRange minYRange: Double, maxYRange: Double, axis: YAxis.AxisDependency) { let minScale = getAxisRange(axis) / minYRange let maxScale = getAxisRange(axis) / maxYRange diff --git a/Charts/Classes/Charts/PieChartView.swift b/Charts/Classes/Charts/PieChartView.swift index a283552af9..5d14a1fb1c 100755 --- a/Charts/Classes/Charts/PieChartView.swift +++ b/Charts/Classes/Charts/PieChartView.swift @@ -256,7 +256,7 @@ public class PieChartView: PieRadarChartViewBase } /// This will throw an exception, PieChart has no XAxis object. - public override var xAxis: ChartXAxis + public override var xAxis: XAxis { fatalError("PieChart has no XAxis") } diff --git a/Charts/Classes/Charts/RadarChartView.swift b/Charts/Classes/Charts/RadarChartView.swift index 52ca712d86..9fec6de6d8 100644 --- a/Charts/Classes/Charts/RadarChartView.swift +++ b/Charts/Classes/Charts/RadarChartView.swift @@ -39,7 +39,7 @@ public class RadarChartView: PieRadarChartViewBase private var _skipWebLineCount = 0 /// the object reprsenting the y-axis labels - private var _yAxis: ChartYAxis! + private var _yAxis: YAxis! internal var _yAxisRenderer: YAxisRendererRadarChart! internal var _xAxisRenderer: XAxisRendererRadarChart! @@ -58,7 +58,7 @@ public class RadarChartView: PieRadarChartViewBase { super.initialize() - _yAxis = ChartYAxis(position: .Left) + _yAxis = YAxis(position: .Left) renderer = RadarChartRenderer(chart: self, animator: _animator, viewPortHandler: _viewPortHandler) @@ -179,7 +179,7 @@ public class RadarChartView: PieRadarChartViewBase } /// - returns: The object that represents all y-labels of the RadarChart. - public var yAxis: ChartYAxis + public var yAxis: YAxis { return _yAxis } diff --git a/Charts/Classes/Components/ChartAxisBase.swift b/Charts/Classes/Components/AxisBase.swift similarity index 99% rename from Charts/Classes/Components/ChartAxisBase.swift rename to Charts/Classes/Components/AxisBase.swift index ae34062686..d0b39aa2ad 100644 --- a/Charts/Classes/Components/ChartAxisBase.swift +++ b/Charts/Classes/Components/AxisBase.swift @@ -1,5 +1,5 @@ // -// ChartAxisBase.swift +// AxisBase.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda @@ -13,7 +13,8 @@ import Foundation import CoreGraphics /// Base class for all axes -public class ChartAxisBase: ChartComponentBase +@objc(ChartAxisBase) +public class AxisBase: ComponentBase { public override init() { diff --git a/Charts/Classes/Components/ChartLimitLine.swift b/Charts/Classes/Components/ChartLimitLine.swift index ffff46affe..75a1493979 100644 --- a/Charts/Classes/Components/ChartLimitLine.swift +++ b/Charts/Classes/Components/ChartLimitLine.swift @@ -15,7 +15,7 @@ import CoreGraphics /// The limit line is an additional feature for all Line, Bar and ScatterCharts. /// It allows the displaying of an additional line in the chart that marks a certain maximum / limit on the specified axis (x- or y-axis). -public class ChartLimitLine: ChartComponentBase +public class ChartLimitLine: ComponentBase { @objc(ChartLimitLabelPosition) public enum LabelPosition: Int diff --git a/Charts/Classes/Components/ChartComponentBase.swift b/Charts/Classes/Components/ComponentBase.swift similarity index 90% rename from Charts/Classes/Components/ChartComponentBase.swift rename to Charts/Classes/Components/ComponentBase.swift index bf1fde3670..cb5def62a0 100644 --- a/Charts/Classes/Components/ChartComponentBase.swift +++ b/Charts/Classes/Components/ComponentBase.swift @@ -1,5 +1,5 @@ // -// ChartComponentBase.swift +// ComponentBase.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda @@ -14,7 +14,8 @@ import CoreGraphics /// This class encapsulates everything both Axis, Legend and LimitLines have in common -public class ChartComponentBase: NSObject +@objc(ChartComponentBase) +public class ComponentBase: NSObject { /// flag that indicates if this component is enabled or not public var enabled = true diff --git a/Charts/Classes/Components/ChartLegend.swift b/Charts/Classes/Components/Legend.swift similarity index 99% rename from Charts/Classes/Components/ChartLegend.swift rename to Charts/Classes/Components/Legend.swift index e45ff5e552..8a6506de59 100644 --- a/Charts/Classes/Components/ChartLegend.swift +++ b/Charts/Classes/Components/Legend.swift @@ -1,5 +1,5 @@ // -// ChartLegend.swift +// Legend.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda @@ -16,8 +16,8 @@ import CoreGraphics import UIKit #endif - -public class ChartLegend: ChartComponentBase +@objc(ChartLegend) +public class Legend: ComponentBase { /// This property is deprecated - Use `position`, `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`, `direction`. @available(*, deprecated=1.0, message="Use `position`, `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`, `direction`.") diff --git a/Charts/Classes/Components/LegendEntry.swift b/Charts/Classes/Components/LegendEntry.swift index ed214a6e0f..6b1f784ae1 100644 --- a/Charts/Classes/Components/LegendEntry.swift +++ b/Charts/Classes/Components/LegendEntry.swift @@ -33,7 +33,7 @@ public class LegendEntry: NSObject /// - parameter formLineDashLengths: Line dash configurationas NaN to use the legend's default. /// - parameter formColor: The color for drawing the form. public init(label: String?, - form: ChartLegend.Form, + form: Legend.Form, formSize: CGFloat, formLineWidth: CGFloat, formLineDashPhase: CGFloat, @@ -58,7 +58,7 @@ public class LegendEntry: NSObject /// `None` will avoid drawing a form, and any related space. /// `Empty` will avoid drawing a form, but keep its space. /// `Default` will use the Legend's default. - public var form: ChartLegend.Form = .Default + public var form: Legend.Form = .Default /// Form size will be considered except for when .None is used /// diff --git a/Charts/Classes/Components/ChartXAxis.swift b/Charts/Classes/Components/XAxis.swift similarity index 97% rename from Charts/Classes/Components/ChartXAxis.swift rename to Charts/Classes/Components/XAxis.swift index b60655d189..738f577f44 100644 --- a/Charts/Classes/Components/ChartXAxis.swift +++ b/Charts/Classes/Components/XAxis.swift @@ -1,5 +1,5 @@ // -// ChartXAxis.swift +// XAxis.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda @@ -12,7 +12,8 @@ import Foundation import CoreGraphics -public class ChartXAxis: ChartAxisBase +@objc(ChartXAxis) +public class XAxis: AxisBase { @objc(XAxisLabelPosition) public enum LabelPosition: Int diff --git a/Charts/Classes/Components/ChartYAxis.swift b/Charts/Classes/Components/YAxis.swift similarity index 98% rename from Charts/Classes/Components/ChartYAxis.swift rename to Charts/Classes/Components/YAxis.swift index 8263a6795c..cefe94883a 100644 --- a/Charts/Classes/Components/ChartYAxis.swift +++ b/Charts/Classes/Components/YAxis.swift @@ -1,5 +1,5 @@ // -// ChartYAxis.swift +// YAxis.swift // Charts // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda @@ -20,7 +20,8 @@ import CoreGraphics /// Class representing the y-axis labels settings and its entries. /// Be aware that not all features the YLabels class provides are suitable for the RadarChart. /// Customizations that affect the value range of the axis need to be applied before setting data for the chart. -public class ChartYAxis: ChartAxisBase +@objc(ChartYAxis) +public class YAxis: AxisBase { @objc(YAxisLabelPosition) public enum LabelPosition: Int diff --git a/Charts/Classes/Data/Implementations/ChartBaseDataSet.swift b/Charts/Classes/Data/Implementations/ChartBaseDataSet.swift index 2d58357f12..f3daa0ae36 100644 --- a/Charts/Classes/Data/Implementations/ChartBaseDataSet.swift +++ b/Charts/Classes/Data/Implementations/ChartBaseDataSet.swift @@ -183,7 +183,7 @@ public class ChartBaseDataSet: NSObject, IChartDataSet public var label: String? = "DataSet" /// The axis this DataSet should be plotted against. - public var axisDependency = ChartYAxis.AxisDependency.Left + public var axisDependency = YAxis.AxisDependency.Left /// - returns: The color at the given index of the DataSet's color array. /// This prevents out-of-bounds by performing a modulus on the color index, so colours will repeat themselves. @@ -315,7 +315,7 @@ public class ChartBaseDataSet: NSObject, IChartDataSet public var valueFont: NSUIFont = NSUIFont.systemFontOfSize(7.0) /// The form to draw for this dataset in the legend. - public var form = ChartLegend.Form.Default + public var form = Legend.Form.Default /// The form size to draw for this dataset in the legend. /// diff --git a/Charts/Classes/Data/Implementations/Standard/ChartData.swift b/Charts/Classes/Data/Implementations/Standard/ChartData.swift index 7273cd9afe..cd4d9fa721 100644 --- a/Charts/Classes/Data/Implementations/Standard/ChartData.swift +++ b/Charts/Classes/Data/Implementations/Standard/ChartData.swift @@ -126,7 +126,7 @@ public class ChartData: NSObject } } - public func calcMinMax(entry e: ChartDataEntry, axis: ChartYAxis.AxisDependency) + public func calcMinMax(entry e: ChartDataEntry, axis: YAxis.AxisDependency) { if _yMax < e.y { @@ -240,7 +240,7 @@ public class ChartData: NSObject return _yMin } - public func getYMin(axis: ChartYAxis.AxisDependency) -> Double + public func getYMin(axis: YAxis.AxisDependency) -> Double { if axis == .Left { @@ -278,7 +278,7 @@ public class ChartData: NSObject return _yMax } - public func getYMax(axis: ChartYAxis.AxisDependency) -> Double + public func getYMax(axis: YAxis.AxisDependency) -> Double { if axis == .Left { diff --git a/Charts/Classes/Data/Interfaces/IChartDataSet.swift b/Charts/Classes/Data/Interfaces/IChartDataSet.swift index 986931a063..66cf2d8f6c 100644 --- a/Charts/Classes/Data/Interfaces/IChartDataSet.swift +++ b/Charts/Classes/Data/Interfaces/IChartDataSet.swift @@ -143,7 +143,7 @@ public protocol IChartDataSet var label: String? { get } /// The axis this DataSet should be plotted against. - var axisDependency: ChartYAxis.AxisDependency { get } + var axisDependency: YAxis.AxisDependency { get } /// List representing all colors that are used for drawing the actual values for this DataSet var valueColors: [NSUIColor] { get } @@ -188,7 +188,7 @@ public protocol IChartDataSet /// The form to draw for this dataset in the legend. /// /// Return `.Default` to use the default legend form. - var form: ChartLegend.Form { get } + var form: Legend.Form { get } /// The form size to draw for this dataset in the legend. /// diff --git a/Charts/Classes/Formatters/DefaultAxisValueFormatter.swift b/Charts/Classes/Formatters/DefaultAxisValueFormatter.swift index 47ae9e68e8..78727a062b 100644 --- a/Charts/Classes/Formatters/DefaultAxisValueFormatter.swift +++ b/Charts/Classes/Formatters/DefaultAxisValueFormatter.swift @@ -71,7 +71,7 @@ public class DefaultAxisValueFormatter: NSObject, IAxisValueFormatter } public func stringForValue(value: Double, - axis: ChartAxisBase?) -> String + axis: AxisBase?) -> String { return formatter?.stringFromNumber(value) ?? "" } diff --git a/Charts/Classes/Formatters/IAxisValueFormatter.swift b/Charts/Classes/Formatters/IAxisValueFormatter.swift index f4c76190d8..9b66e6bfb3 100644 --- a/Charts/Classes/Formatters/IAxisValueFormatter.swift +++ b/Charts/Classes/Formatters/IAxisValueFormatter.swift @@ -25,6 +25,6 @@ public protocol IAxisValueFormatter : NSObjectProtocol /// - parameter axis: the axis that the value belongs to /// func stringForValue(value: Double, - axis: ChartAxisBase?) -> String + axis: AxisBase?) -> String } \ No newline at end of file diff --git a/Charts/Classes/Highlight/ChartHighlighter.swift b/Charts/Classes/Highlight/ChartHighlighter.swift index fcee06b675..d1d04ef2d0 100644 --- a/Charts/Classes/Highlight/ChartHighlighter.swift +++ b/Charts/Classes/Highlight/ChartHighlighter.swift @@ -38,7 +38,7 @@ public class ChartHighlighter : NSObject, IHighlighter else { return CGPointZero } // take any transformer to determine the values - return chart.getTransformer(ChartYAxis.AxisDependency.Left).valueForTouchPoint(x: x, y: y) + return chart.getTransformer(YAxis.AxisDependency.Left).valueForTouchPoint(x: x, y: y) } /// - returns: The corresponding ChartHighlight for a given x-value and xy-touch position in pixels. @@ -57,10 +57,10 @@ public class ChartHighlighter : NSObject, IHighlighter return nil } - let leftAxisMinDist = getMinimumDistance(closestValues, y: y, axis: ChartYAxis.AxisDependency.Left) - let rightAxisMinDist = getMinimumDistance(closestValues, y: y, axis: ChartYAxis.AxisDependency.Right) + let leftAxisMinDist = getMinimumDistance(closestValues, y: y, axis: YAxis.AxisDependency.Left) + let rightAxisMinDist = getMinimumDistance(closestValues, y: y, axis: YAxis.AxisDependency.Right) - let axis = leftAxisMinDist < rightAxisMinDist ? ChartYAxis.AxisDependency.Left : ChartYAxis.AxisDependency.Right + let axis = leftAxisMinDist < rightAxisMinDist ? YAxis.AxisDependency.Left : YAxis.AxisDependency.Right let detail = closestSelectionDetailByPixel(closestValues: closestValues, x: x, y: y, axis: axis, minSelectionDistance: chart.maxHighlightDistance) @@ -130,7 +130,7 @@ public class ChartHighlighter : NSObject, IHighlighter closestValues closestValues: [Highlight], x: CGFloat, y: CGFloat, - axis: ChartYAxis.AxisDependency?, + axis: YAxis.AxisDependency?, minSelectionDistance: CGFloat) -> Highlight? { var distance = minSelectionDistance @@ -159,7 +159,7 @@ public class ChartHighlighter : NSObject, IHighlighter internal func getMinimumDistance( closestValues: [Highlight], y: CGFloat, - axis: ChartYAxis.AxisDependency) -> CGFloat + axis: YAxis.AxisDependency) -> CGFloat { var distance = CGFloat.max diff --git a/Charts/Classes/Highlight/Highlight.swift b/Charts/Classes/Highlight/Highlight.swift index daa67d7f9b..21a13d57a4 100644 --- a/Charts/Classes/Highlight/Highlight.swift +++ b/Charts/Classes/Highlight/Highlight.swift @@ -38,7 +38,7 @@ public class Highlight: NSObject private var _stackIndex = Int(-1) /// the axis the highlighted value belongs to - private var _axis: ChartYAxis.AxisDependency = ChartYAxis.AxisDependency.Left + private var _axis: YAxis.AxisDependency = YAxis.AxisDependency.Left /// the x-position (pixels) on which this highlight object was last drawn public var drawX: CGFloat = 0.0 @@ -65,7 +65,7 @@ public class Highlight: NSObject dataIndex: Int, dataSetIndex: Int, stackIndex: Int, - axis: ChartYAxis.AxisDependency) + axis: YAxis.AxisDependency) { super.init() @@ -91,7 +91,7 @@ public class Highlight: NSObject xPx: CGFloat, yPx: CGFloat, dataSetIndex: Int, stackIndex: Int, - axis: ChartYAxis.AxisDependency) + axis: YAxis.AxisDependency) { self.init(x: x, y: y, xPx: xPx, yPx: yPx, dataIndex: 0, @@ -112,7 +112,7 @@ public class Highlight: NSObject x: Double, y: Double, xPx: CGFloat, yPx: CGFloat, dataSetIndex: Int, - axis: ChartYAxis.AxisDependency) + axis: YAxis.AxisDependency) { super.init() @@ -147,7 +147,7 @@ public class Highlight: NSObject public var yPx: CGFloat { return _yPx } public var dataSetIndex: Int { return _dataSetIndex } public var stackIndex: Int { return _stackIndex } - public var axis: ChartYAxis.AxisDependency { return _axis } + public var axis: YAxis.AxisDependency { return _axis } public var isStacked: Bool { return _stackIndex >= 0 } diff --git a/Charts/Classes/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift b/Charts/Classes/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift index c296ba1e81..2fb41ca94b 100644 --- a/Charts/Classes/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift +++ b/Charts/Classes/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift @@ -15,8 +15,8 @@ import CoreGraphics @objc public protocol BarLineScatterCandleBubbleChartDataProvider: ChartDataProvider { - func getTransformer(which: ChartYAxis.AxisDependency) -> Transformer - func isInverted(axis: ChartYAxis.AxisDependency) -> Bool + func getTransformer(which: YAxis.AxisDependency) -> Transformer + func isInverted(axis: YAxis.AxisDependency) -> Bool var lowestVisibleX: Double { get } var highestVisibleX: Double { get } diff --git a/Charts/Classes/Interfaces/LineChartDataProvider.swift b/Charts/Classes/Interfaces/LineChartDataProvider.swift index bf503f3705..c2ed81f10e 100644 --- a/Charts/Classes/Interfaces/LineChartDataProvider.swift +++ b/Charts/Classes/Interfaces/LineChartDataProvider.swift @@ -17,5 +17,5 @@ public protocol LineChartDataProvider: BarLineScatterCandleBubbleChartDataProvid { var lineData: LineChartData? { get } - func getAxis(axis: ChartYAxis.AxisDependency) -> ChartYAxis + func getAxis(axis: YAxis.AxisDependency) -> YAxis } \ No newline at end of file diff --git a/Charts/Classes/Jobs/AnimatedZoomViewJob.swift b/Charts/Classes/Jobs/AnimatedZoomViewJob.swift index eaba58918b..461eb0e30d 100644 --- a/Charts/Classes/Jobs/AnimatedZoomViewJob.swift +++ b/Charts/Classes/Jobs/AnimatedZoomViewJob.swift @@ -14,7 +14,7 @@ import CoreGraphics public class AnimatedZoomViewJob: AnimatedViewPortJob { - internal var yAxis: ChartYAxis? + internal var yAxis: YAxis? internal var xAxisRange: Double = 0.0 internal var scaleX: CGFloat = 0.0 internal var scaleY: CGFloat = 0.0 @@ -27,7 +27,7 @@ public class AnimatedZoomViewJob: AnimatedViewPortJob viewPortHandler: ViewPortHandler, transformer: Transformer, view: ChartViewBase, - yAxis: ChartYAxis, + yAxis: YAxis, xAxisRange: Double, scaleX: CGFloat, scaleY: CGFloat, diff --git a/Charts/Classes/Jobs/ZoomViewJob.swift b/Charts/Classes/Jobs/ZoomViewJob.swift index fde77035fd..9b3f522857 100644 --- a/Charts/Classes/Jobs/ZoomViewJob.swift +++ b/Charts/Classes/Jobs/ZoomViewJob.swift @@ -21,7 +21,7 @@ public class ZoomViewJob: ViewPortJob { internal var scaleX: CGFloat = 0.0 internal var scaleY: CGFloat = 0.0 - internal var axisDependency: ChartYAxis.AxisDependency = ChartYAxis.AxisDependency.Left + internal var axisDependency: YAxis.AxisDependency = YAxis.AxisDependency.Left public init( viewPortHandler: ViewPortHandler, @@ -30,7 +30,7 @@ public class ZoomViewJob: ViewPortJob xValue: Double, yValue: Double, transformer: Transformer, - axis: ChartYAxis.AxisDependency, + axis: YAxis.AxisDependency, view: ChartViewBase) { super.init( diff --git a/Charts/Classes/Renderers/AxisRendererBase.swift b/Charts/Classes/Renderers/AxisRendererBase.swift index 8d57f2c24c..eb6716a5c7 100644 --- a/Charts/Classes/Renderers/AxisRendererBase.swift +++ b/Charts/Classes/Renderers/AxisRendererBase.swift @@ -16,7 +16,7 @@ import CoreGraphics public class AxisRendererBase: Renderer { /// base axis this axis renderer works with - public var axis: ChartAxisBase? + public var axis: AxisBase? /// transformer to transform values to screen pixels and return public var transformer: Transformer? @@ -26,7 +26,7 @@ public class AxisRendererBase: Renderer super.init() } - public init(viewPortHandler: ViewPortHandler?, transformer: Transformer?, axis: ChartAxisBase?) + public init(viewPortHandler: ViewPortHandler?, transformer: Transformer?, axis: AxisBase?) { super.init(viewPortHandler: viewPortHandler) diff --git a/Charts/Classes/Renderers/LegendRenderer.swift b/Charts/Classes/Renderers/LegendRenderer.swift index 27fdf527f5..f8b465dc93 100755 --- a/Charts/Classes/Renderers/LegendRenderer.swift +++ b/Charts/Classes/Renderers/LegendRenderer.swift @@ -20,9 +20,9 @@ import CoreGraphics public class LegendRenderer: Renderer { /// the legend object this renderer renders - public var legend: ChartLegend? + public var legend: Legend? - public init(viewPortHandler: ViewPortHandler?, legend: ChartLegend?) + public init(viewPortHandler: ViewPortHandler?, legend: Legend?) { super.init(viewPortHandler: viewPortHandler) @@ -495,7 +495,7 @@ public class LegendRenderer: Renderer x: CGFloat, y: CGFloat, entry: LegendEntry, - legend: ChartLegend) + legend: Legend) { guard let formColor = entry.formColor where formColor != NSUIColor.clearColor() diff --git a/Charts/Classes/Renderers/XAxisRenderer.swift b/Charts/Classes/Renderers/XAxisRenderer.swift index aa5d4e44f9..f9cec8a6e4 100644 --- a/Charts/Classes/Renderers/XAxisRenderer.swift +++ b/Charts/Classes/Renderers/XAxisRenderer.swift @@ -19,7 +19,7 @@ import CoreGraphics @objc(ChartXAxisRenderer) public class XAxisRenderer: AxisRendererBase { - public init(viewPortHandler: ViewPortHandler?, xAxis: ChartXAxis?, transformer: Transformer?) + public init(viewPortHandler: ViewPortHandler?, xAxis: XAxis?, transformer: Transformer?) { super.init(viewPortHandler: viewPortHandler, transformer: transformer, axis: xAxis) } @@ -67,7 +67,7 @@ public class XAxisRenderer: AxisRendererBase public func computeSize() { guard let - xAxis = self.axis as? ChartXAxis + xAxis = self.axis as? XAxis else { return } let longest = xAxis.getLongestLabel() @@ -88,7 +88,7 @@ public class XAxisRenderer: AxisRendererBase public override func renderAxisLabels(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler else { return } @@ -127,7 +127,7 @@ public class XAxisRenderer: AxisRendererBase public override func renderAxisLine(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler else { return } @@ -178,7 +178,7 @@ public class XAxisRenderer: AxisRendererBase public func drawLabels(context context: CGContext, pos: CGFloat, anchor: CGPoint) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer else { return } @@ -283,7 +283,7 @@ public class XAxisRenderer: AxisRendererBase public override func renderGridLines(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, transformer = self.transformer else { return } @@ -353,7 +353,7 @@ public class XAxisRenderer: AxisRendererBase public override func renderLimitLines(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer else { return } diff --git a/Charts/Classes/Renderers/XAxisRendererHorizontalBarChart.swift b/Charts/Classes/Renderers/XAxisRendererHorizontalBarChart.swift index f79dea6ad0..5020dbb0f7 100644 --- a/Charts/Classes/Renderers/XAxisRendererHorizontalBarChart.swift +++ b/Charts/Classes/Renderers/XAxisRendererHorizontalBarChart.swift @@ -20,7 +20,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer { internal var chart: BarChartView? - public init(viewPortHandler: ViewPortHandler?, xAxis: ChartXAxis?, transformer: Transformer?, chart: BarChartView?) + public init(viewPortHandler: ViewPortHandler?, xAxis: XAxis?, transformer: Transformer?, chart: BarChartView?) { super.init(viewPortHandler: viewPortHandler, xAxis: xAxis, transformer: transformer) @@ -63,7 +63,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer public override func computeSize() { guard let - xAxis = self.axis as? ChartXAxis + xAxis = self.axis as? XAxis else { return } let longest = xAxis.getLongestLabel() as NSString @@ -84,7 +84,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer public override func renderAxisLabels(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler else { return } @@ -122,7 +122,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer public override func drawLabels(context context: CGContext, pos: CGFloat, anchor: CGPoint) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, transformer = self.transformer, viewPortHandler = self.viewPortHandler else { return } @@ -218,7 +218,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer public override func renderAxisLine(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler else { return } @@ -270,7 +270,7 @@ public class XAxisRendererHorizontalBarChart: XAxisRenderer public override func renderLimitLines(context context: CGContext) { guard let - xAxis = self.axis as? ChartXAxis, + xAxis = self.axis as? XAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer else { return } diff --git a/Charts/Classes/Renderers/XAxisRendererRadarChart.swift b/Charts/Classes/Renderers/XAxisRendererRadarChart.swift index ed64e2488c..7b3abc9747 100644 --- a/Charts/Classes/Renderers/XAxisRendererRadarChart.swift +++ b/Charts/Classes/Renderers/XAxisRendererRadarChart.swift @@ -20,7 +20,7 @@ public class XAxisRendererRadarChart: XAxisRenderer { public weak var chart: RadarChartView? - public init(viewPortHandler: ViewPortHandler?, xAxis: ChartXAxis?, chart: RadarChartView?) + public init(viewPortHandler: ViewPortHandler?, xAxis: XAxis?, chart: RadarChartView?) { super.init(viewPortHandler: viewPortHandler, xAxis: xAxis, transformer: nil) @@ -30,7 +30,7 @@ public class XAxisRendererRadarChart: XAxisRenderer public override func renderAxisLabels(context context: CGContext) { guard let - xAxis = axis as? ChartXAxis, + xAxis = axis as? XAxis, chart = chart else { return } diff --git a/Charts/Classes/Renderers/YAxisRenderer.swift b/Charts/Classes/Renderers/YAxisRenderer.swift index fb6e4b02d4..f54e945854 100644 --- a/Charts/Classes/Renderers/YAxisRenderer.swift +++ b/Charts/Classes/Renderers/YAxisRenderer.swift @@ -19,7 +19,7 @@ import CoreGraphics @objc(ChartYAxisRenderer) public class YAxisRenderer: AxisRendererBase { - public init(viewPortHandler: ViewPortHandler?, yAxis: ChartYAxis?, transformer: Transformer?) + public init(viewPortHandler: ViewPortHandler?, yAxis: YAxis?, transformer: Transformer?) { super.init(viewPortHandler: viewPortHandler, transformer: transformer, axis: yAxis) } @@ -28,7 +28,7 @@ public class YAxisRenderer: AxisRendererBase public override func renderAxisLabels(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, viewPortHandler = self.viewPortHandler else { return } @@ -88,7 +88,7 @@ public class YAxisRenderer: AxisRendererBase public override func renderAxisLine(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, viewPortHandler = self.viewPortHandler else { return } @@ -139,7 +139,7 @@ public class YAxisRenderer: AxisRendererBase textAlign: NSTextAlignment) { guard let - yAxis = self.axis as? ChartYAxis + yAxis = self.axis as? YAxis else { return } let labelFont = yAxis.labelFont @@ -166,7 +166,7 @@ public class YAxisRenderer: AxisRendererBase public override func renderGridLines(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis + yAxis = self.axis as? YAxis else { return } if !yAxis.isEnabled @@ -238,7 +238,7 @@ public class YAxisRenderer: AxisRendererBase public func transformedPositions() -> [CGPoint] { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, transformer = self.transformer else { return [CGPoint]() } @@ -261,7 +261,7 @@ public class YAxisRenderer: AxisRendererBase public func drawZeroLine(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer, zeroLineColor = yAxis.zeroLineColor @@ -297,7 +297,7 @@ public class YAxisRenderer: AxisRendererBase public override func renderLimitLines(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer else { return } diff --git a/Charts/Classes/Renderers/YAxisRendererHorizontalBarChart.swift b/Charts/Classes/Renderers/YAxisRendererHorizontalBarChart.swift index 905a11d356..340abcb293 100644 --- a/Charts/Classes/Renderers/YAxisRendererHorizontalBarChart.swift +++ b/Charts/Classes/Renderers/YAxisRendererHorizontalBarChart.swift @@ -18,7 +18,7 @@ import CoreGraphics public class YAxisRendererHorizontalBarChart: YAxisRenderer { - public override init(viewPortHandler: ViewPortHandler?, yAxis: ChartYAxis?, transformer: Transformer?) + public override init(viewPortHandler: ViewPortHandler?, yAxis: YAxis?, transformer: Transformer?) { super.init(viewPortHandler: viewPortHandler, yAxis: yAxis, transformer: transformer) } @@ -58,7 +58,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer public override func renderAxisLabels(context context: CGContext) { guard let - yAxis = axis as? ChartYAxis, + yAxis = axis as? YAxis, viewPortHandler = self.viewPortHandler else { return } @@ -114,7 +114,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer public override func renderAxisLine(context context: CGContext) { guard let - yAxis = axis as? ChartYAxis, + yAxis = axis as? YAxis, viewPortHandler = self.viewPortHandler else { return } @@ -164,7 +164,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer offset: CGFloat) { guard let - yAxis = axis as? ChartYAxis + yAxis = axis as? YAxis else { return } let labelFont = yAxis.labelFont @@ -216,7 +216,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer public override func transformedPositions() -> [CGPoint] { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, transformer = self.transformer else { return [CGPoint]() } @@ -239,7 +239,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer public override func drawZeroLine(context context: CGContext) { guard let - yAxis = self.axis as? ChartYAxis, + yAxis = self.axis as? YAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer, zeroLineColor = yAxis.zeroLineColor @@ -275,7 +275,7 @@ public class YAxisRendererHorizontalBarChart: YAxisRenderer public override func renderLimitLines(context context: CGContext) { guard let - yAxis = axis as? ChartYAxis, + yAxis = axis as? YAxis, viewPortHandler = self.viewPortHandler, transformer = self.transformer else { return } diff --git a/Charts/Classes/Renderers/YAxisRendererRadarChart.swift b/Charts/Classes/Renderers/YAxisRendererRadarChart.swift index 68e58f0610..89a9a75094 100644 --- a/Charts/Classes/Renderers/YAxisRendererRadarChart.swift +++ b/Charts/Classes/Renderers/YAxisRendererRadarChart.swift @@ -20,7 +20,7 @@ public class YAxisRendererRadarChart: YAxisRenderer { private weak var chart: RadarChartView? - public init(viewPortHandler: ViewPortHandler?, yAxis: ChartYAxis?, chart: RadarChartView?) + public init(viewPortHandler: ViewPortHandler?, yAxis: YAxis?, chart: RadarChartView?) { super.init(viewPortHandler: viewPortHandler, yAxis: yAxis, transformer: nil) @@ -30,7 +30,7 @@ public class YAxisRendererRadarChart: YAxisRenderer public override func computeAxisValues(min yMin: Double, max yMax: Double) { guard let - axis = axis as? ChartYAxis + axis = axis as? YAxis else { return } let labelCount = axis.labelCount @@ -161,7 +161,7 @@ public class YAxisRendererRadarChart: YAxisRenderer public override func renderAxisLabels(context context: CGContext) { guard let - yAxis = axis as? ChartYAxis, + yAxis = axis as? YAxis, chart = chart else { return } @@ -200,7 +200,7 @@ public class YAxisRendererRadarChart: YAxisRenderer public override func renderLimitLines(context context: CGContext) { guard let - yAxis = axis as? ChartYAxis, + yAxis = axis as? YAxis, chart = chart, data = chart.data else { return } diff --git a/ChartsDemo/Classes/Formatters/LargeValueFormatter.swift b/ChartsDemo/Classes/Formatters/LargeValueFormatter.swift index e341106177..acbec4db7e 100644 --- a/ChartsDemo/Classes/Formatters/LargeValueFormatter.swift +++ b/ChartsDemo/Classes/Formatters/LargeValueFormatter.swift @@ -51,7 +51,7 @@ public class LargeValueFormatter: NSObject, IValueFormatter, IAxisValueFormatter return r } - public func stringForValue(value: Double, axis: ChartAxisBase?) -> String + public func stringForValue(value: Double, axis: AxisBase?) -> String { return format(value) }