Ver Fonte

Minor updates for Swift 5 (#3874)

* Minor updates for Swift 5

Need FBSnapshotTestCase to be updated

* Updated testing Framework for Swift 5

bumped minimum deployment version to 8.4

* Bumped Travis Xcode version

* Fix test failures. add a new extension to only use 64bit arch. This is the companion commit that only has code change regards fixing test failures.

* delete unused test images with specific screen size. this is a companion commit to only have deleted files

* rename the in-use test images. this is a companion commit to only have renamed files.

* change image diff to 0.001 tolerance
make clipValuesToContentEnabled to true to fix BarTests:testPositiveValuesWithCustomAxisMaximum() failure

* 1. merge master to fix xBounds iterator() to match the behavior of `stride(from: _xBounds.min, through: _xBounds.range + _xBounds.min, by: 1)`
this fix issues from https://github.com/danielgindi/Charts/commit/2a1ecb4e6f175f91e91d77d039be342138fe0e3c

2. revert clipValuesToContentEnabled to false by default. but enable it for bar chart test - testPositiveValuesWithCustomAxisMaximum()

3. update tvOS test image for testPositiveValuesWithCustomAxisMaximum. After changing tolerance to 0.001, it fails while the same iOS test pass.
I looked into the image diff, it shows the intersect of bar top edge and axis line at value 50 has diff, but I suppose the image is the same. safe to merge.
Jacob Christie há 6 anos atrás
pai
commit
b155c2f64d
100 ficheiros alterados com 102 adições e 77 exclusões
  1. 3 3
      .travis.yml
  2. 0 0
      Cartfile
  3. 1 1
      Cartfile.private
  4. 1 1
      Cartfile.resolved
  5. 14 11
      Charts.xcodeproj/project.pbxproj
  6. 1 1
      Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme
  7. 1 1
      Charts.xcodeproj/xcshareddata/xcschemes/ChartsTests.xcscheme
  8. 12 9
      ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj
  9. 8 5
      ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj
  10. BIN
      ChartsDemo-macOS/PlaygroundChart.playground/Contents.o
  11. 2 2
      Source/Charts/Charts/ChartViewBase.swift
  12. 1 1
      Source/Charts/Data/Implementations/Standard/CombinedChartData.swift
  13. 6 1
      Source/Charts/Renderers/CombinedChartRenderer.swift
  14. 2 1
      Source/Charts/Utils/Platform+Accessibility.swift
  15. 27 26
      Tests/Charts/BarChartTests.swift
  16. 3 3
      Tests/Charts/CombinedChartTests.swift
  17. 6 6
      Tests/Charts/LineChartTests.swift
  18. 4 4
      Tests/Charts/PieChartTests.swift
  19. 10 1
      Tests/Charts/Snapshot.swift
  20. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_320.0_568.0@2x.png
  21. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_375.0_667.0@2x.png
  22. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_375_0_667_0@2x.png
  23. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_414.0_736.0@3x.png
  24. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_768.0_1024.0@2x.png
  25. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_834.0_1112.0@2x.png
  26. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_tvOS_1920_0_1080_0@1x.png
  27. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_320.0_568.0@2x.png
  28. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_375.0_667.0@2x.png
  29. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_375_0_667_0@2x.png
  30. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_414.0_736.0@3x.png
  31. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_768.0_1024.0@2x.png
  32. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_834.0_1112.0@2x.png
  33. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_tvOS_1920_0_1080_0@1x.png
  34. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_320.0_568.0@2x.png
  35. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_375.0_667.0@2x.png
  36. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_375_0_667_0@2x.png
  37. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_414.0_736.0@3x.png
  38. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_768.0_1024.0@2x.png
  39. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_834.0_1112.0@2x.png
  40. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_tvOS_1920_0_1080_0@1x.png
  41. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_320.0_568.0@2x.png
  42. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_375.0_667.0@2x.png
  43. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_375_0_667_0@2x.png
  44. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_414.0_736.0@3x.png
  45. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_768.0_1024.0@2x.png
  46. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_834.0_1112.0@2x.png
  47. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_tvOS_1920_0_1080_0@1x.png
  48. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_320.0_568.0@2x.png
  49. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_375.0_667.0@2x.png
  50. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_375_0_667_0@2x.png
  51. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_414.0_736.0@3x.png
  52. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_768.0_1024.0@2x.png
  53. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_834.0_1112.0@2x.png
  54. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_tvOS_1920_0_1080_0@1x.png
  55. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_320.0_568.0@2x.png
  56. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_375.0_667.0@2x.png
  57. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_375_0_667_0@2x.png
  58. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_414.0_736.0@3x.png
  59. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_768.0_1024.0@2x.png
  60. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_834.0_1112.0@2x.png
  61. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_tvOS_1920_0_1080_0@1x.png
  62. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_320.0_568.0@2x.png
  63. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_375.0_667.0@2x.png
  64. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_375_0_667_0@2x.png
  65. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_414.0_736.0@3x.png
  66. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_768.0_1024.0@2x.png
  67. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_834.0_1112.0@2x.png
  68. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_tvOS_1920_0_1080_0@1x.png
  69. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_iOS_375_0_667_0@2x.png
  70. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_tvOS_1920_0_1080_0@1x.png
  71. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_iOS_375_0_667_0@2x.png
  72. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_tvOS_1920_0_1080_0@1x.png
  73. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_320.0_568.0@2x.png
  74. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_375.0_667.0@2x.png
  75. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_375_0_667_0@2x.png
  76. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_414.0_736.0@3x.png
  77. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_768.0_1024.0@2x.png
  78. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_834.0_1112.0@2x.png
  79. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_tvOS_1920_0_1080_0@1x.png
  80. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_iOS_375_0_667_0@2x.png
  81. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_tvOS_1920_0_1080_0@1x.png
  82. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_iOS_375_0_667_0@2x.png
  83. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_tvOS_1920_0_1080_0@1x.png
  84. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_1024.0_1366.0@2x.png
  85. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_320.0_568.0@2x.png
  86. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_375_0_667_0@2x.png
  87. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_414.0_736.0@3x.png
  88. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_768.0_1024.0@2x.png
  89. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_834.0_1112.0@2x.png
  90. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_tvOS_1920_0_1080_0@1x.png
  91. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_iOS_375_0_667_0@2x.png
  92. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_tvOS_1920_0_1080_0@1x.png
  93. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_320.0_568.0@2x.png
  94. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_375.0_667.0@2x.png
  95. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_375_0_667_0@2x.png
  96. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_414.0_736.0@3x.png
  97. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_768.0_1024.0@2x.png
  98. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_834.0_1112.0@2x.png
  99. 0 0
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_tvOS_1920_0_1080_0@1x.png
  100. BIN
      Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum_iOS_1024.0_1366.0@2x.png

+ 3 - 3
.travis.yml

@@ -2,11 +2,11 @@ language: objective-c
 osx_image: xcode10
 osx_image: xcode10
 matrix:
 matrix:
   include:
   include:
-    - osx_image: xcode10
+    - osx_image: xcode10.2
       env: PLATFORM="iOS"
       env: PLATFORM="iOS"
-    - osx_image: xcode10
+    - osx_image: xcode10.2
       env: PLATFORM="tvOS"
       env: PLATFORM="tvOS"
-    - osx_image: xcode10
+    - osx_image: xcode10.2
       env: PLATFORM="macOS"
       env: PLATFORM="macOS"
 env:
 env:
   global:
   global:

+ 0 - 0
Cartfile


+ 1 - 1
Cartfile.private

@@ -1 +1 @@
-github "facebook/ios-snapshot-test-case" "master"
+github "uber/ios-snapshot-test-case"

+ 1 - 1
Cartfile.resolved

@@ -1 +1 @@
-github "facebook/ios-snapshot-test-case" "ed4e6a6e81bfb69a5223156e6c3d389a416cf6e3"
+github "uber/ios-snapshot-test-case" "6.0.3"

+ 14 - 11
Charts.xcodeproj/project.pbxproj

@@ -734,7 +734,7 @@
 			isa = PBXProject;
 			isa = PBXProject;
 			attributes = {
 			attributes = {
 				LastSwiftUpdateCheck = 0830;
 				LastSwiftUpdateCheck = 0830;
-				LastUpgradeCheck = 0930;
+				LastUpgradeCheck = 1020;
 				TargetAttributes = {
 				TargetAttributes = {
 					A58A4ED274A941CA248EA921 = {
 					A58A4ED274A941CA248EA921 = {
 						LastSwiftMigration = 0900;
 						LastSwiftMigration = 0900;
@@ -749,6 +749,7 @@
 			developmentRegion = English;
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 			knownRegions = (
+				English,
 				en,
 				en,
 			);
 			);
 			mainGroup = 865A1CF149F52850CAB7F177;
 			mainGroup = 865A1CF149F52850CAB7F177;
@@ -996,7 +997,7 @@
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
 				INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				MTL_ENABLE_DEBUG_INFO = YES;
@@ -1007,7 +1008,7 @@
 				SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
 				SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
 				VERSION_INFO_PREFIX = "";
@@ -1030,7 +1031,7 @@
 				);
 				);
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
 				INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
 				MTL_ENABLE_DEBUG_INFO = YES;
 				MTL_ENABLE_DEBUG_INFO = YES;
@@ -1040,7 +1041,7 @@
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
@@ -1049,6 +1050,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -1090,7 +1092,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = "1,2,3,4";
 				TARGETED_DEVICE_FAMILY = "1,2,3,4";
 				VALIDATE_PRODUCT = YES;
 				VALIDATE_PRODUCT = YES;
 			};
 			};
@@ -1100,6 +1102,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NONNULL = YES;
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
 				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -1149,7 +1152,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = "1,2,3,4";
 				TARGETED_DEVICE_FAMILY = "1,2,3,4";
 			};
 			};
 			name = Debug;
 			name = Debug;
@@ -1170,7 +1173,7 @@
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
 				INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_ENABLE_DEBUG_INFO = NO;
@@ -1180,7 +1183,7 @@
 				SKIP_INSTALL = YES;
 				SKIP_INSTALL = YES;
 				SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
 				SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
 				VERSION_INFO_PREFIX = "";
@@ -1203,7 +1206,7 @@
 				);
 				);
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
 				INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_ENABLE_DEBUG_INFO = NO;
@@ -1212,7 +1215,7 @@
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
 			};
 			name = Release;
 			name = Release;

+ 1 - 1
Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0930"
+   LastUpgradeVersion = "1020"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"

+ 1 - 1
Charts.xcodeproj/xcshareddata/xcschemes/ChartsTests.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0930"
+   LastUpgradeVersion = "1020"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"

+ 12 - 9
ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj

@@ -653,7 +653,7 @@
 			attributes = {
 			attributes = {
 				LastSwiftMigration = 0700;
 				LastSwiftMigration = 0700;
 				LastSwiftUpdateCheck = 0700;
 				LastSwiftUpdateCheck = 0700;
-				LastUpgradeCheck = 0930;
+				LastUpgradeCheck = 1020;
 				ORGANIZATIONNAME = dcg;
 				ORGANIZATIONNAME = dcg;
 				TargetAttributes = {
 				TargetAttributes = {
 					225B361C1F6EB9A50005B3D5 = {
 					225B361C1F6EB9A50005B3D5 = {
@@ -672,6 +672,7 @@
 			developmentRegion = English;
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 			knownRegions = (
+				English,
 				en,
 				en,
 				Base,
 				Base,
 			);
 			);
@@ -907,7 +908,7 @@
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
 				TARGETED_DEVICE_FAMILY = 1;
 			};
 			};
 			name = Debug;
 			name = Debug;
@@ -936,7 +937,7 @@
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
 				TARGETED_DEVICE_FAMILY = 1;
 			};
 			};
 			name = Release;
 			name = Release;
@@ -945,6 +946,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
@@ -986,11 +988,11 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				SDKROOT = iphoneos;
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
@@ -998,6 +1000,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
@@ -1032,11 +1035,11 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = iphoneos;
 				SDKROOT = iphoneos;
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 				VALIDATE_PRODUCT = YES;
 				VALIDATE_PRODUCT = YES;
 			};
 			};
 			name = Release;
 			name = Release;
@@ -1057,7 +1060,7 @@
 				SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
 				SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
@@ -1076,7 +1079,7 @@
 				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
 				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
 				SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
 				SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};

+ 8 - 5
ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj

@@ -161,7 +161,7 @@
 			isa = PBXProject;
 			isa = PBXProject;
 			attributes = {
 			attributes = {
 				LastSwiftUpdateCheck = 0720;
 				LastSwiftUpdateCheck = 0720;
-				LastUpgradeCheck = 0930;
+				LastUpgradeCheck = 1020;
 				ORGANIZATIONNAME = dcg;
 				ORGANIZATIONNAME = dcg;
 				TargetAttributes = {
 				TargetAttributes = {
 					65B3F63D1C73B4F5000983D0 = {
 					65B3F63D1C73B4F5000983D0 = {
@@ -176,6 +176,7 @@
 			developmentRegion = English;
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 			knownRegions = (
+				English,
 				en,
 				en,
 				Base,
 				Base,
 			);
 			);
@@ -263,6 +264,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
@@ -310,7 +312,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
@@ -318,6 +320,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
@@ -358,7 +361,7 @@
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
-				SWIFT_VERSION = 4.0;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
@@ -376,7 +379,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				PROVISIONING_PROFILE_SPECIFIER = "";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
@@ -394,7 +397,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
 				PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				PROVISIONING_PROFILE_SPECIFIER = "";
-				SWIFT_VERSION = 4.2;
+				SWIFT_VERSION = 5.0;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};

BIN
ChartsDemo-macOS/PlaygroundChart.playground/Contents.o


+ 2 - 2
Source/Charts/Charts/ChartViewBase.swift

@@ -87,7 +87,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
     @objc open var noDataText = "No chart data available."
     @objc open var noDataText = "No chart data available."
     
     
     /// Font to be used for the no data text.
     /// Font to be used for the no data text.
-    @objc open var noDataFont: NSUIFont! = NSUIFont(name: "HelveticaNeue", size: 12.0)
+    @objc open var noDataFont = NSUIFont.systemFont(ofSize: 12)
     
     
     /// color of the no data text
     /// color of the no data text
     @objc open var noDataTextColor: NSUIColor = NSUIColor.black
     @objc open var noDataTextColor: NSUIColor = NSUIColor.black
@@ -920,7 +920,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
     
     
     @objc open func removeViewportJob(_ job: ViewPortJob)
     @objc open func removeViewportJob(_ job: ViewPortJob)
     {
     {
-        if let index = _viewportJobs.index(where: { $0 === job })
+        if let index = _viewportJobs.firstIndex(where: { $0 === job })
         {
         {
             _viewportJobs.remove(at: index)
             _viewportJobs.remove(at: index)
         }
         }

+ 1 - 1
Source/Charts/Data/Implementations/Standard/CombinedChartData.swift

@@ -201,7 +201,7 @@ open class CombinedChartData: BarLineScatterCandleBubbleChartData
     
     
     open func dataIndex(_ data: ChartData) -> Int?
     open func dataIndex(_ data: ChartData) -> Int?
     {
     {
-        return allData.index(of: data)
+        return allData.firstIndex(of: data)
     }
     }
     
     
     open override func removeDataSet(_ dataSet: IChartDataSet) -> Bool
     open override func removeDataSet(_ dataSet: IChartDataSet) -> Bool

+ 6 - 1
Source/Charts/Renderers/CombinedChartRenderer.swift

@@ -148,7 +148,12 @@ open class CombinedChartRenderer: DataRenderer
                 data = (renderer as! BubbleChartRenderer).dataProvider?.bubbleData
                 data = (renderer as! BubbleChartRenderer).dataProvider?.bubbleData
             }
             }
             
             
-            let dataIndex = data == nil ? nil : (chart?.data as? CombinedChartData)?.allData.index(of: data!)
+            let dataIndex: Int? = {
+                guard let data = data else { return nil }
+                return (chart?.data as? CombinedChartData)?
+                    .allData
+                    .firstIndex(of: data)
+            }()
             
             
             let dataIndices = indices.filter{ $0.dataIndex == dataIndex || $0.dataIndex == -1 }
             let dataIndices = indices.filter{ $0.dataIndex == dataIndex || $0.dataIndex == -1 }
             
             

+ 2 - 1
Source/Charts/Utils/Platform+Accessibility.swift

@@ -83,7 +83,8 @@ extension NSUIView
     open override func index(ofAccessibilityElement element: Any) -> Int
     open override func index(ofAccessibilityElement element: Any) -> Int
     {
     {
         guard let axElement = element as? NSUIAccessibilityElement else { return NSNotFound }
         guard let axElement = element as? NSUIAccessibilityElement else { return NSNotFound }
-        return (accessibilityChildren() as? [NSUIAccessibilityElement])?.index(of: axElement) ?? NSNotFound
+        return (accessibilityChildren() as? [NSUIAccessibilityElement])?
+            .firstIndex(of: axElement) ?? NSNotFound
     }
     }
 }
 }
 
 

+ 27 - 26
Tests/Charts/BarChartTests.swift

@@ -84,7 +84,7 @@ class BarChartTests: FBSnapshotTestCase
         let dataEntries = setupDefaultValuesDataEntries()
         let dataEntries = setupDefaultValuesDataEntries()
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testZeroValues()
     func testZeroValues()
@@ -92,7 +92,7 @@ class BarChartTests: FBSnapshotTestCase
         let dataEntries = setupZeroValuesDataEntries()
         let dataEntries = setupZeroValuesDataEntries()
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValues()
     func testPositiveValues()
@@ -100,7 +100,7 @@ class BarChartTests: FBSnapshotTestCase
         let dataEntries = setupPositiveValuesDataEntries()
         let dataEntries = setupPositiveValuesDataEntries()
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValuesWithCustomAxisMaximum()
     func testPositiveValuesWithCustomAxisMaximum()
@@ -109,8 +109,9 @@ class BarChartTests: FBSnapshotTestCase
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMaximum = 50
         chart.leftAxis.axisMaximum = 50
+        chart.clipValuesToContentEnabled = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValuesWithCustomAxisMaximum2()
     func testPositiveValuesWithCustomAxisMaximum2()
@@ -120,7 +121,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMaximum = -10
         chart.leftAxis.axisMaximum = -10
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValuesWithCustomAxisMinimum()
     func testPositiveValuesWithCustomAxisMinimum()
@@ -130,7 +131,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMinimum = 50
         chart.leftAxis.axisMinimum = 50
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValuesWithCustomAxisMinimum2()
     func testPositiveValuesWithCustomAxisMinimum2()
@@ -140,7 +141,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMinimum = 110
         chart.leftAxis.axisMinimum = 110
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum()
     func testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum()
@@ -152,7 +153,7 @@ class BarChartTests: FBSnapshotTestCase
         chart.leftAxis.axisMaximum = 200
         chart.leftAxis.axisMaximum = 200
         chart.leftAxis.axisMinimum = -10
         chart.leftAxis.axisMinimum = -10
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testNegativeValues()
     func testNegativeValues()
@@ -160,7 +161,7 @@ class BarChartTests: FBSnapshotTestCase
         let dataEntries = setupNegativeValuesDataEntries()
         let dataEntries = setupNegativeValuesDataEntries()
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries)
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testNegativeValuesWithCustomAxisMaximum()
     func testNegativeValuesWithCustomAxisMaximum()
@@ -170,7 +171,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMaximum = 10
         chart.leftAxis.axisMaximum = 10
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testNegativeValuesWithCustomAxisMaximum2()
     func testNegativeValuesWithCustomAxisMaximum2()
@@ -180,7 +181,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMaximum = -150
         chart.leftAxis.axisMaximum = -150
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
 
 
@@ -191,7 +192,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMinimum = -200
         chart.leftAxis.axisMinimum = -200
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testNegativeValuesWithCustomAxisMinimum2()
     func testNegativeValuesWithCustomAxisMinimum2()
@@ -201,7 +202,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.axisMinimum = 10
         chart.leftAxis.axisMinimum = 10
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum()
     func testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum()
@@ -213,7 +214,7 @@ class BarChartTests: FBSnapshotTestCase
         chart.leftAxis.axisMaximum = 10
         chart.leftAxis.axisMaximum = 10
         chart.leftAxis.axisMinimum = -200
         chart.leftAxis.axisMinimum = -200
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testHidesValues()
     func testHidesValues()
@@ -223,7 +224,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         dataSet.drawValuesEnabled = false
         dataSet.drawValuesEnabled = false
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHideLeftAxis()
     func testHideLeftAxis()
@@ -233,7 +234,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.enabled = false
         chart.leftAxis.enabled = false
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHideRightAxis()
     func testHideRightAxis()
@@ -243,7 +244,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.rightAxis.enabled = false
         chart.rightAxis.enabled = false
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedLeftAxis()
     func testInvertedLeftAxis()
@@ -253,7 +254,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.inverted = true
         chart.leftAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedLeftAxisWithNegativeValues()
     func testInvertedLeftAxisWithNegativeValues()
@@ -263,7 +264,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.inverted = true
         chart.leftAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedLeftAxisWithPositiveValues()
     func testInvertedLeftAxisWithPositiveValues()
@@ -273,7 +274,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.leftAxis.inverted = true
         chart.leftAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedRightAxis()
     func testInvertedRightAxis()
@@ -284,7 +285,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.rightAxis.inverted = true
         chart.rightAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedRightAxisWithNegativeValues()
     func testInvertedRightAxisWithNegativeValues()
@@ -295,7 +296,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.rightAxis.inverted = true
         chart.rightAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testInvertedRightAxisWithPositiveValues()
     func testInvertedRightAxisWithPositiveValues()
@@ -306,7 +307,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.rightAxis.inverted = true
         chart.rightAxis.inverted = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHideHorizontalGridlines()
     func testHideHorizontalGridlines()
@@ -317,7 +318,7 @@ class BarChartTests: FBSnapshotTestCase
         chart.leftAxis.drawGridLinesEnabled = false
         chart.leftAxis.drawGridLinesEnabled = false
         chart.rightAxis.drawGridLinesEnabled = false
         chart.rightAxis.drawGridLinesEnabled = false
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHideVerticalGridlines()
     func testHideVerticalGridlines()
@@ -327,7 +328,7 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         chart.xAxis.drawGridLinesEnabled = false
         chart.xAxis.drawGridLinesEnabled = false
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testDrawIcons()
     func testDrawIcons()
@@ -337,6 +338,6 @@ class BarChartTests: FBSnapshotTestCase
         let chart = setupDefaultChart(dataSets: [dataSet])
         let chart = setupDefaultChart(dataSets: [dataSet])
         dataSet.drawIconsEnabled = true
         dataSet.drawIconsEnabled = true
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 }
 }

+ 3 - 3
Tests/Charts/CombinedChartTests.swift

@@ -80,7 +80,7 @@ class CombinedChartTests: FBSnapshotTestCase
 
 
     func testDefaultAxisDependency()
     func testDefaultAxisDependency()
     {
     {
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testLeftRightAxisDependency()
     func testLeftRightAxisDependency()
@@ -89,7 +89,7 @@ class CombinedChartTests: FBSnapshotTestCase
         barDataSet.axisDependency = .right
         barDataSet.axisDependency = .right
         chart.data?.notifyDataChanged()
         chart.data?.notifyDataChanged()
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 
 
     func testAllRightAxisDependency()
     func testAllRightAxisDependency()
@@ -98,7 +98,7 @@ class CombinedChartTests: FBSnapshotTestCase
         barDataSet.axisDependency = .right
         barDataSet.axisDependency = .right
         chart.data?.notifyDataChanged()
         chart.data?.notifyDataChanged()
         chart.notifyDataSetChanged()
         chart.notifyDataSetChanged()
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 }
 }
 
 

+ 6 - 6
Tests/Charts/LineChartTests.swift

@@ -46,36 +46,36 @@ class LineChartTests: FBSnapshotTestCase
     
     
     func testDefaultValues()
     func testDefaultValues()
     {
     {
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHidesValues()
     func testHidesValues()
     {
     {
         dataSet.drawValuesEnabled = false
         dataSet.drawValuesEnabled = false
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testDoesntDrawCircles()
     func testDoesntDrawCircles()
     {
     {
         dataSet.drawCirclesEnabled = false
         dataSet.drawCirclesEnabled = false
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testIsCubic()
     func testIsCubic()
     {
     {
         dataSet.mode = LineChartDataSet.Mode.cubicBezier
         dataSet.mode = LineChartDataSet.Mode.cubicBezier
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testDoesntDrawCircleHole()
     func testDoesntDrawCircleHole()
     {
     {
         dataSet.drawCircleHoleEnabled = false
         dataSet.drawCircleHoleEnabled = false
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testDrawIcons()
     func testDrawIcons()
     {
     {
         dataSet.drawIconsEnabled = true
         dataSet.drawIconsEnabled = true
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 }
 }

+ 4 - 4
Tests/Charts/PieChartTests.swift

@@ -50,24 +50,24 @@ class PieChartTests: FBSnapshotTestCase
     
     
     func testDefaultValues()
     func testDefaultValues()
     {
     {
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHidesValues()
     func testHidesValues()
     {
     {
         dataSet.drawValuesEnabled = false
         dataSet.drawValuesEnabled = false
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testDrawIcons()
     func testDrawIcons()
     {
     {
         dataSet.drawIconsEnabled = true
         dataSet.drawIconsEnabled = true
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
     
     
     func testHideCenterLabel()
     func testHideCenterLabel()
     {
     {
         chart.drawCenterTextEnabled = false
         chart.drawCenterTextEnabled = false
-        FBSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), tolerance: Snapshot.tolerance)
+        ChartsSnapshotVerifyView(chart, identifier: Snapshot.identifier(UIScreen.main.bounds.size), overallTolerance: Snapshot.tolerance)
     }
     }
 }
 }

+ 10 - 1
Tests/Charts/Snapshot.swift

@@ -1,8 +1,9 @@
 import CoreGraphics
 import CoreGraphics
+import FBSnapshotTestCase
 
 
 public struct Snapshot
 public struct Snapshot
 {
 {
-    public static let tolerance: CGFloat = 0.01
+    public static let tolerance: CGFloat = 0.001
     
     
     public static func identifier(_ size: CGSize) -> String {
     public static func identifier(_ size: CGSize) -> String {
         #if os(tvOS)
         #if os(tvOS)
@@ -18,3 +19,11 @@ public struct Snapshot
         return "\(identifier)_\(size.width)_\(size.height)"
         return "\(identifier)_\(size.width)_\(size.height)"
     }
     }
 }
 }
+
+public extension FBSnapshotTestCase
+{
+    func ChartsSnapshotVerifyView(_ view: UIView, identifier: String = "", suffixes: NSOrderedSet = NSOrderedSet(object: "_64"), perPixelTolerance: CGFloat = 0, overallTolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line)
+    {
+        FBSnapshotVerifyView(view, identifier: identifier, suffixes: suffixes, perPixelTolerance: perPixelTolerance, overallTolerance: overallTolerance, file: file, line: line)
+    }
+}

BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDefaultValues_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testDrawIcons_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideHorizontalGridlines_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideLeftAxis_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideRightAxis_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHideVerticalGridlines_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testHidesValues_tvOS_1920_0_1080_0@1x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_iOS_375_0_667_0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithNegativeValues_tvOS_1920_0_1080_0@1x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_iOS_375_0_667_0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxisWithPositiveValues_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedLeftAxis_tvOS_1920_0_1080_0@1x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_iOS_375_0_667_0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithNegativeValues_tvOS_1920_0_1080_0@1x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_iOS_375_0_667_0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxisWithPositiveValues_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_1024.0_1366.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_320.0_568.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testInvertedRightAxis_tvOS_1920_0_1080_0@1x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_iOS_375.0_667.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_iOS_375_0_667_0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum2_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_320.0_568.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_375.0_667.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_1024.0_1366.0@2x.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_375_0_667_0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_414.0_736.0@3x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_768.0_1024.0@2x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_iOS_834.0_1112.0@2x.png


+ 0 - 0
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_tvOS_1920.0_1080.0.png → Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum_tvOS_1920_0_1080_0@1x.png


BIN
Tests/ReferenceImages_64/ChartsTests.BarChartTests/testNegativeValuesWithCustomAxisMaximum_iOS_1024.0_1366.0@2x.png


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff