Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/danielgindi/Charts into b…
Browse files Browse the repository at this point in the history
…ase-master-update

* 'master' of https://github.com/danielgindi/Charts:
  bump pod version
  Update project settings to support publishing pod
  Revert ChartsOrg#4271 and disable parent scroll view on dragging
  • Loading branch information
taykay08 committed Apr 18, 2022
2 parents c31d5e1 + b61fc9b commit 56236d4
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 42 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
pull_request:
branches:
- '*'
- "*"

jobs:
iOS:
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Charts.xcworkspace" -scheme "Charts" -destination "${{ matrix.destination }}" clean test | xcpretty

macOS_demo:
runs-on: macOS-latest
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
Expand All @@ -56,7 +56,7 @@ jobs:

spm:
name: Test with SPM
runs-on: macOS-latest
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
Expand Down
11 changes: 6 additions & 5 deletions Charts.podspec
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Pod::Spec.new do |s|
s.name = "Charts"
s.version = "4.0.0"
s.version = "4.0.2"
s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)"
s.homepage = "https://github.com/danielgindi/Charts"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
s.authors = "Daniel Cohen Gindi", "Philipp Jahoda"
s.ios.deployment_target = "9.0"
s.tvos.deployment_target = "9.0"
s.osx.deployment_target = "10.11"
s.ios.deployment_target = "12.0"
s.tvos.deployment_target = "12.0"
s.osx.deployment_target = "10.12"
s.source = { :git => "https://github.com/danielgindi/Charts.git", :tag => "v#{s.version}" }
s.default_subspec = "Core"
s.swift_version = '5.3'
s.cocoapods_version = '>= 1.5.0'

s.subspec "Core" do |ss|
ss.source_files = "Source/Charts/**/*.swift"
ss.dependency 'SwiftAlgorithms', '~> 1.0'
end
end
20 changes: 10 additions & 10 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1320;
TargetAttributes = {
A58A4ED274A941CA248EA921 = {
LastSwiftMigration = 1150;
Expand Down Expand Up @@ -1032,7 +1032,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand All @@ -1049,7 +1049,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -1063,7 +1063,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Tests/ChartsTests/Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1082,7 +1082,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
name = Debug;
};
Expand Down Expand Up @@ -1217,7 +1217,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand All @@ -1234,7 +1234,7 @@
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -1248,7 +1248,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Tests/ChartsTests/Resources/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1267,7 +1267,7 @@
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
name = Release;
};
Expand Down Expand Up @@ -1309,7 +1309,7 @@
repositoryURL = "https://github.com/apple/swift-algorithms";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.0.2;
minimumVersion = 1.0.0;
};
};
22BBDA0625CC4C2F00435670 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
Expand Down
2 changes: 1 addition & 1 deletion Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 4 additions & 4 deletions Charts.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/apple/swift-algorithms",
"state": {
"branch": null,
"revision": "bb3bafeca0e164ece3403a9de646b7d38c07dd49",
"version": "0.0.2"
"revision": "b14b7f4c528c942f121c8b860b9410b2bf57825e",
"version": "1.0.0"
}
},
{
"package": "swift-numerics",
"repositoryURL": "https://github.com/apple/swift-numerics",
"state": {
"branch": null,
"revision": "6b24333510e9044cf4716a07bed65eeed6bc6393",
"version": "0.0.8"
"revision": "0a5bc04095a675662cf24757cc0640aa2204253b",
"version": "1.0.2"
}
},
{
Expand Down
14 changes: 7 additions & 7 deletions ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = dcg;
TargetAttributes = {
225B361C1F6EB9A50005B3D5 = {
Expand Down Expand Up @@ -900,7 +900,7 @@
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -932,7 +932,7 @@
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -988,7 +988,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1036,7 +1036,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -1056,7 +1056,7 @@
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SOURCE_ROOT)/../Carthage/Build/iOS";
INFOPLIST_FILE = "Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ChartsDemo-iOS";
Expand All @@ -1080,7 +1080,7 @@
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SOURCE_ROOT)/../Carthage/Build/iOS";
INFOPLIST_FILE = "Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "ChartsDemo-iOS";
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import PackageDescription
let package = Package(
name: "Charts",
platforms: [
.iOS(.v9),
.tvOS(.v9),
.macOS(.v10_11),
.iOS(.v12),
.tvOS(.v12),
.macOS(.v10_12),
],
products: [
.library(
Expand All @@ -19,7 +19,7 @@ let package = Package(
targets: ["Charts"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-algorithms", from: "0.0.1")
.package(url: "https://github.com/apple/swift-algorithms", from: "1.0.0")
],
targets: [
.target(
Expand Down
8 changes: 6 additions & 2 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
// We will only handle highlights on NSUIGestureRecognizerState.Changed

_isDragging = false

// Prevent the parent scroll view from scrolling
_outerScrollView?.nsuiIsScrollEnabled = false

}
}
else if recognizer.state == NSUIGestureRecognizerState.changed
Expand Down Expand Up @@ -784,15 +788,15 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
}

_isDragging = false

delegate?.chartViewDidEndPanning?(self)
}

if _outerScrollView !== nil
{
_outerScrollView?.nsuiIsScrollEnabled = true
_outerScrollView = nil
}

delegate?.chartViewDidEndPanning?(self)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Components/Marker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
import CoreGraphics

@objc(ChartMarker)
public protocol Marker: class
public protocol Marker: AnyObject
{
/// - Returns: The desired (general) offset you wish the IMarker to have on the x-axis.
/// By returning x: -(width / 2) you will center the IMarker horizontally.
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Formatters/AxisValueFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation

/// An interface for providing custom axis Strings.
@objc(ChartAxisValueFormatter)
public protocol AxisValueFormatter: class
public protocol AxisValueFormatter: AnyObject
{

/// Called when a value from an axis is formatted before being drawn.
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Formatters/ValueFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Foundation
/// method and return whatever you want.

@objc(ChartValueFormatter)
public protocol ValueFormatter: class
public protocol ValueFormatter: AnyObject
{

/// Called when a value (from labels inside the chart) is formatted before being drawn.
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Highlight/Highlighter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
import CoreGraphics

@objc(ChartHighlighter)
public protocol Highlighter: class
public protocol Highlighter: AnyObject
{
/// - Parameters:
/// - x:
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Renderers/Scatter/ShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Foundation
import CoreGraphics

@objc
public protocol ShapeRenderer: class
public protocol ShapeRenderer: AnyObject
{
/// Renders the provided ScatterDataSet with a shape.
///
Expand Down

0 comments on commit 56236d4

Please sign in to comment.