Skip to content

Commit

Permalink
Update charts from original repository (#1)
Browse files Browse the repository at this point in the history
* Added delegate callback to detect when panning is finished, to potentially allow users to manually reset the hightlight values once panning is complete

* Changed the part of the code where the delegate gets called

* Make NSUIAccessibilityElement initializer public.

* Add Parameters Section

```
(\n[ ]+)(((/// - parameter \w+:.*\s+)(///((\s+)|( \s+.+\s+)))?)*/// - parameter \w+:.*)
```

```
$1/// - Parameters:$1$2
```

* Remove parameter prefix

```
/// - parameter (\w+):(.*)(\s+///(\n))*(\s+)
```

```
///   - $1:$2$4$5
```

* Remove property’s `returns` section

```
/// - returns: (.+\s+((override|@IBOutlet|@objc|weak|unowned|lazy|static|class|open|public|private|fileprivate|internal)(\(set\))? )*(var|let))
```

```
/// $1
```

* Add missing `-`

```
/// (note|return|parameters|throws):
```

```
/// - $1:
```

* Sort sections

```
((///)[ ]+[^-\n]+(\s+))?(((((/// - Parameters:\s+(/// (( - \w+:)|([^-]{1})).*\s+)+)\s+)|(/// - Returns:.*\s+(/// [^-]{1}.*\s+)*)|(/// - Note:.*\s+(/// [^-]{1}.*\s+)*)|(/// - Throws:.*\s+(/// [^-]{1}.*\s+)*))(///\n\s+)?)+)
```

```
$1$2$3$15$7$17$13
```

* Uppercased the section title

* fix function groupBars document error

* Remove duplicated section

* Update ChartViewBase.swift

Updated documentation in the code based on feedback

* Add missing empty line between Summary and other section manually

* fix wrong assignment to axisMaxLabels property

* Remove meaningless comment

* improvements in barRect height calculation  (ChartsOrg#3650)

* fixed barRectCaculation

* fixed offset calculation

* Fix the  mess caused by the setting the min&min value of the y-axis by error :
Just simply swap their values

* Fix the mess caused by the setting the min&min value of the y-axis by error

* Revert "Fix the mess caused by the setting the min&min value of the y-axis by error"

This reverts commit 526a73a.

* Fix the mess caused by the setting the min&min value of the y-axis by error

* update offset calculation

* update code style

* update code style

* update offset calculation

* keep barRect calculation untouched

try to simply the calculation. keep barRect calculation untouched

* After the correction of min and max ,  they should be assigned back to  _axisMinimum and _axisMaximum

* add demo for bar chart unit test

* update unit test

* revert last commit

* update unit test

* make sure max is greater than min &
turnoff record mode for barchartest

* add new UT and fix some issues.

1. add more bar chart UT
2. code style fix
3. manually add chart.notifyDataSetChanged() - some old UT and new ones forget to call this method, leading the test images to be wrong.

Notice:
some test images diff shows slight pixel shift, not sure why, but both old and new image seems drawing correctly

* update tvOS images

* update tolerance to 1% & more swift-y

* update tvOS images, removing "Description Label", (not rendered anymore)

changing tolerance will trigger "Description Label" detection

* update iOS test images, "Description Label" no longer rendered.

* fixed offset calculation in some cases.
moved those codes into the for loop. because the offset of each bar may be different.
(detail in comments)

* Update Source/Charts/Renderers/BarChartRenderer.swift

Co-Authored-By: potato04 <shiww@outlook.com>

* Add missing properties to copy(with:) methods (ChartsOrg#3715)

* ChartsOrg#3578 Add missing properties to copy(with:) methods

* Add NSCopying conformance

* Fix legend offset bug for horizontal bar chart (Fixes ChartsOrg#3301)

* Fix applying lineCap value for line chart data sets (Fixes ChartsOrg#3739)

DataSets for line chart have lineCap property which is supposed to be applied to the chart line. But it was applied only if dataSet is drawn in linear/stepped mode. This commit makes lineCap work for any existing mode.

* Update README.md (ChartsOrg#3737)

Replace a confusing sentence with a clear one. Fix grammatical errors.

* fix ChartsOrg#3719

* add call chartScaled() after double tap (ChartsOrg#3770)

* Remove delegate method call for translation when no translation really occured

* Removed use of `values` where appropriate

* Fixed `addEntry` implementation

* Deprecated direct usage of values

* BarLineScatterCandleBubbleRenderer.XBounds conformance to RangeExpression and Sequence

Sequence conformance simplifies for-in loops
Looking forward to when data types conforming to Collection, RangeExpression conformance by XBounds allows for slicing of the collections further simplifying algorithms on data/datasets.

* Draws the line chart the same way regardless of the number of colors for the data set (ChartsOrg#3764)

* Multiple colors for valueline (Fixes ChartsOrg#3480) (ChartsOrg#3709)

* Multiple colors for valueline (Fixes ChartsOrg#3480)

This change adds a flag matchValueLineColorToPieSlice to PieChartDataSet and IPieChartDataSet protocol.
When enabled, valuelines will have the same color as slices they attached to.
matchValueLineColorToPieSlice is set to false by default, so colors won't be changed in old projects that use Charts.

* Changed variable name from matchValueLineColorToPieSlice to valueLineAutoColor

* Changed variable name from valueLineAutoColor to useValueColorForLine

* Changed variable name from valueLineAutoColor to useValueColorForLine

* fix code style

fix code style

* Changed check for useValueColorForLine with suggested

* fix code style

* Added name DrawLine: to do{} section

* bump version to 3.2.2

* update change log

* Renamed `values` to `entries` to reflect the property's type

Removed arbitrary setter access to `entries` to encourage use of `Collection` mechanics
Added `replaceEntries`

* Fixed tests

* Create "chartViewDidEndAnimate" callback function in "ChartViewBase" that is called when Animator stops animating

* Update protocol function description

* Improve HorizontalBarChart offset calculation for negative value labels (Fixes ChartsOrg#3850)

* Replace AnyObject with Any

This is in line with how Objc interfaces are now imported

* Fixed target on NSUIDisplayLink

* Removed unnecessary #if statements and unified style to align with Xcode's indentation

* Velocity samples calculation (ChartsOrg#3883)

* Updated `PieRadarChartViewBase.sampleVelocity(touchLocation:)` algorithm.

* Updated `PieRadarChartViewBase.calculateVelocity` algorithm

* Updated naming for `_velocitySamples`

* A fix for ChartsOrg#3848. Use a stock iterator instead of a custom one. (ChartsOrg#3891)

* Migrating to built-in algorithms (ChartsOrg#3892)

* Align `ChartLimit.LabelPosition` naming with `UIRectCorner` (ChartsOrg#3846)

* Align `ChartLimit.LabelPosition` naming with `UIRectCorner`

* Fixed Demos

* fix indent after replacing if with guard

* reverted mistaken changes

* Removed unused #if statements

* add animator reference to animatorDidStop ChartViewBase delegate callback.

* Minor updates for Swift 5 (ChartsOrg#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 ChartsOrg@2a1ecb4

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.

* fix ChartsOrg#3860. maxHeight didn't count the last label

* Reassess convenience initializers (ChartsOrg#3862)

* Reassess convenience initializers

The only data required to initialize an entry is an x and y value (or y in the case of Pie and Radar). All other data can easily be updated by initializing and assigning properties on the entry. Therefor, those initializers should be the ones marked as convenience.
Made initializer declarations consistent.

* Modernize BarChartDataEntry internal calculations

* Style updated for PR

* Fix horizontal bar chart not drawing values and add unit tests (ChartsOrg#3906)

* fix horizontal bar chart drawValues not correctly drawing and add testNotDrawValueAboveBars UT

* add unit tests for horizontal bar chart, including default tests and drawValues and drawValuesAboveBars
default data entries included positive and negative values

* add tvOS test images

* add stacked bar tests for bar chart unit tests

* fix typo

* change to guard statement for shouldDrawValues

* update test images to match master branch

* Data as any (ChartsOrg#3863)

* `ChartEntry.data` is now of type `Any`

There is no need to restrict `ChartEntry.data` to `AnyObject`. This PR loosens that restriction. As a result we cannot compare `data`, though this should never have been the case in the first place.

* Updated `ChartDataEntry` initializers to accept `Any` for `data`

* Updated test

* bump version to 3.3

* update change log

* update gemfile

* correct 3.3 to 3.3.0.

* For ChartsOrg#3917. make init(label: String?) convenient initializer (ChartsOrg#3973)

* fix ChartsOrg#3917. make `init(label: String?)` to be a convenient init to enable auto inheritance.

* add UT for default dataSet label
  • Loading branch information
leandropjp authored Jun 5, 2019
1 parent 1f6585b commit 0fe8fd6
Show file tree
Hide file tree
Showing 375 changed files with 3,153 additions and 2,653 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ language: objective-c
osx_image: xcode10
matrix:
include:
- osx_image: xcode10
- osx_image: xcode10.2
env: PLATFORM="iOS"
- osx_image: xcode10
- osx_image: xcode10.2
env: PLATFORM="tvOS"
- osx_image: xcode10
- osx_image: xcode10.2
env: PLATFORM="macOS"
env:
global:
Expand Down
334 changes: 303 additions & 31 deletions CHANGELOG.md

Large diffs are not rendered by default.

Empty file removed Cartfile
Empty file.
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "facebook/ios-snapshot-test-case" "master"
github "uber/ios-snapshot-test-case"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "facebook/ios-snapshot-test-case" "ed4e6a6e81bfb69a5223156e6c3d389a416cf6e3"
github "uber/ios-snapshot-test-case" "6.0.3"
4 changes: 2 additions & 2 deletions Charts.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Charts"
s.version = "3.2.1"
s.version = "3.3.0"
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" }
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.11"
s.source = { :git => "https://github.com/danielgindi/Charts.git", :tag => "v#{s.version}" }
s.default_subspec = "Core"
s.swift_version = '4.2'
s.swift_version = '5.0'
s.cocoapods_version = '>= 1.5.0'

s.subspec "Core" do |ss|
Expand Down
29 changes: 18 additions & 11 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
B0D28C68BB9A958DC56EB214 /* DefaultValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 107D8F8163EE54D6D9E916B0 /* DefaultValueFormatter.swift */; };
B13C74B4FF705D7B595D01EF /* IAxisValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BD9DF16AF59680A3BB49452 /* IAxisValueFormatter.swift */; };
B539114951455C35BADAE3F3 /* PieChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4FB5E3761EF8B4D1E1E1014 /* PieChartDataSet.swift */; };
B66817462241E3CC00017CF1 /* HorizontalBarChartTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B66817452241E3CC00017CF1 /* HorizontalBarChartTests.swift */; };
B6BF9A561F91993A00E62A5D /* CombinedChartTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6BF9A551F91993A00E62A5D /* CombinedChartTests.swift */; };
B6C9F450D937B87224D29D5C /* IFillFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818AC6B12505B7C0A53D62F9 /* IFillFormatter.swift */; };
B6DCC229615EFE706F64A37D /* LineScatterCandleRadarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 923206233CA89FD03565FF87 /* LineScatterCandleRadarRenderer.swift */; };
Expand Down Expand Up @@ -273,6 +274,7 @@
B137428B41C143D5115726C4 /* Description.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Description.swift; path = Source/Charts/Components/Description.swift; sourceTree = "<group>"; };
B1BA6B21CBDF77A15848994F /* RadarChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RadarChartDataSet.swift; path = Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift; sourceTree = "<group>"; };
B44829AF0ADA583F1F0279B7 /* BubbleChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BubbleChartDataSet.swift; path = Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift; sourceTree = "<group>"; };
B66817452241E3CC00017CF1 /* HorizontalBarChartTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HorizontalBarChartTests.swift; path = Tests/Charts/HorizontalBarChartTests.swift; sourceTree = "<group>"; };
B6BF9A551F91993A00E62A5D /* CombinedChartTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CombinedChartTests.swift; path = Tests/Charts/CombinedChartTests.swift; sourceTree = "<group>"; };
BA157EFF2F952192C11DF937 /* AnimatedMoveViewJob.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedMoveViewJob.swift; path = Source/Charts/Jobs/AnimatedMoveViewJob.swift; sourceTree = "<group>"; };
BA1A58428DC4780BAB4EAADC /* CandleStickChartView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CandleStickChartView.swift; path = Source/Charts/Charts/CandleStickChartView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -520,6 +522,7 @@
isa = PBXGroup;
children = (
5C3F5E1A69EC06E86505F7B1 /* BarChartTests.swift */,
B66817452241E3CC00017CF1 /* HorizontalBarChartTests.swift */,
224EFF981FBAAC4700CF9B3B /* EquatableTests.swift */,
7AB9062A28AAB9469752A954 /* ChartUtilsTests.swift */,
B6BF9A551F91993A00E62A5D /* CombinedChartTests.swift */,
Expand Down Expand Up @@ -734,7 +737,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
TargetAttributes = {
A58A4ED274A941CA248EA921 = {
LastSwiftMigration = 0900;
Expand All @@ -749,6 +752,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 865A1CF149F52850CAB7F177;
Expand Down Expand Up @@ -962,6 +966,7 @@
8E1192F7A7152E9DA92C56A9 /* ChartUtilsTests.swift in Sources */,
B6BF9A561F91993A00E62A5D /* CombinedChartTests.swift in Sources */,
2BF85BEA981B359A65E9BF67 /* LineChartTests.swift in Sources */,
B66817462241E3CC00017CF1 /* HorizontalBarChartTests.swift in Sources */,
135F11CE20425AF600D655A3 /* PieChartTests.swift in Sources */,
064989461F5C99C7006E8BB3 /* Snapshot.swift in Sources */,
224EFF991FBAAC4700CF9B3B /* EquatableTests.swift in Sources */,
Expand Down Expand Up @@ -996,7 +1001,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
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";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
Expand All @@ -1007,7 +1012,7 @@
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1030,7 +1035,7 @@
);
GCC_NO_COMMON_BLOCKS = YES;
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[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
Expand All @@ -1040,7 +1045,7 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -1049,6 +1054,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -1090,7 +1096,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -1100,6 +1106,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -1149,7 +1156,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
};
name = Debug;
Expand All @@ -1170,7 +1177,7 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
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";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
Expand All @@ -1180,7 +1187,7 @@
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1203,7 +1210,7 @@
);
GCC_NO_COMMON_BLOCKS = YES;
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[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
Expand All @@ -1212,7 +1219,7 @@
SDKROOT = macosx;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
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 = "0930"
LastUpgradeVersion = "1020"
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 = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
21 changes: 12 additions & 9 deletions ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = dcg;
TargetAttributes = {
225B361C1F6EB9A50005B3D5 = {
Expand All @@ -672,6 +672,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -907,7 +908,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand Down Expand Up @@ -936,7 +937,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand All @@ -945,6 +946,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -986,18 +988,19 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
5B57BBD11A9B26AA0036A6CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1032,11 +1035,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -1057,7 +1060,7 @@
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1076,7 +1079,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion ChartsDemo-iOS/Objective-C/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open class BalloonMarker: MarkerImage
fileprivate var label: String?
fileprivate var _labelSize: CGSize = CGSize()
fileprivate var _paragraphStyle: NSMutableParagraphStyle?
fileprivate var _drawAttributes = [NSAttributedString.Key : AnyObject]()
fileprivate var _drawAttributes = [NSAttributedString.Key : Any]()

@objc public init(color: UIColor, font: UIFont, textColor: UIColor, insets: UIEdgeInsets)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ - (void)setDataCount:(int)count range:(double)range
if (_chartView.data.dataSetCount > 0)
{
set1 = (BarChartDataSet *)_chartView.data.dataSets[0];
set1.values = yVals;
[set1 replaceEntries:yVals];
[_chartView.data notifyDataChanged];
[_chartView notifyDataSetChanged];
}
else
{
set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@"DataSet"];
set1 = [[BarChartDataSet alloc] initWithEntries:yVals label:@"DataSet"];
set1.colors = ChartColorTemplates.vordiplom;
set1.drawValuesEnabled = NO;

Expand Down
4 changes: 2 additions & 2 deletions ChartsDemo-iOS/Objective-C/Demos/BarChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ - (void)setDataCount:(int)count range:(double)range
if (_chartView.data.dataSetCount > 0)
{
set1 = (BarChartDataSet *)_chartView.data.dataSets[0];
set1.values = yVals;
[set1 replaceEntries: yVals];
[_chartView.data notifyDataChanged];
[_chartView notifyDataSetChanged];
}
else
{
set1 = [[BarChartDataSet alloc] initWithValues:yVals label:@"The year 2017"];
set1 = [[BarChartDataSet alloc] initWithEntries:yVals label:@"The year 2017"];
[set1 setColors:ChartColorTemplates.material];
set1.drawIconsEnabled = NO;

Expand Down
6 changes: 3 additions & 3 deletions ChartsDemo-iOS/Objective-C/Demos/BubbleChartViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ - (void)setDataCount:(int)count range:(double)range
[yVals3 addObject:[[BubbleChartDataEntry alloc] initWithX:i y:val size:size]];
}

BubbleChartDataSet *set1 = [[BubbleChartDataSet alloc] initWithValues:yVals1 label:@"DS 1"];
BubbleChartDataSet *set1 = [[BubbleChartDataSet alloc] initWithEntries:yVals1 label:@"DS 1"];
set1.drawIconsEnabled = NO;
[set1 setColor:ChartColorTemplates.colorful[0] alpha:0.50f];
[set1 setDrawValuesEnabled:YES];

BubbleChartDataSet *set2 = [[BubbleChartDataSet alloc] initWithValues:yVals2 label:@"DS 2"];
BubbleChartDataSet *set2 = [[BubbleChartDataSet alloc] initWithEntries:yVals2 label:@"DS 2"];
set2.iconsOffset = CGPointMake(0, 15);
[set2 setColor:ChartColorTemplates.colorful[1] alpha:0.50f];
[set2 setDrawValuesEnabled:YES];

BubbleChartDataSet *set3 = [[BubbleChartDataSet alloc] initWithValues:yVals3 label:@"DS 3"];
BubbleChartDataSet *set3 = [[BubbleChartDataSet alloc] initWithEntries:yVals3 label:@"DS 3"];
[set3 setColor:ChartColorTemplates.colorful[2] alpha:0.50f];
[set3 setDrawValuesEnabled:YES];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ - (void)setDataCount:(int)count range:(double)range
[yVals1 addObject:[[CandleChartDataEntry alloc] initWithX:i shadowH:val + high shadowL:val - low open:even ? val + open : val - open close:even ? val - close : val + close icon: [UIImage imageNamed:@"icon"]]];
}

CandleChartDataSet *set1 = [[CandleChartDataSet alloc] initWithValues:yVals1 label:@"Data Set"];
CandleChartDataSet *set1 = [[CandleChartDataSet alloc] initWithEntries:yVals1 label:@"Data Set"];
set1.axisDependency = AxisDependencyLeft;
[set1 setColor:[UIColor colorWithWhite:80/255.f alpha:1.f]];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (LineChartData *)dataWithCount:(int)count range:(double)range
[yVals addObject:[[ChartDataEntry alloc] initWithX:i y:val]];
}

LineChartDataSet *set1 = [[LineChartDataSet alloc] initWithValues:yVals label:@"DataSet 1"];
LineChartDataSet *set1 = [[LineChartDataSet alloc] initWithEntries:yVals label:@"DataSet 1"];

set1.lineWidth = 1.75;
set1.circleRadius = 5.0;
Expand Down
Loading

0 comments on commit 0fe8fd6

Please sign in to comment.