Skip to content

Commit

Permalink
Merge pull request ChartsOrg#1 from danielgindi/master
Browse files Browse the repository at this point in the history
Update forked repo
  • Loading branch information
baloi91 committed Jul 8, 2020
2 parents 899fe1d + 14da743 commit 89c0690
Show file tree
Hide file tree
Showing 195 changed files with 1,540 additions and 4,029 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with username
open_collective: charts
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ fastlane/test_output
Carthage
Charts.framework.zip
ChartsRealm.framework.zip
.swiftpm/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: objective-c
osx_image: xcode10
osx_image: xcode11
matrix:
include:
- osx_image: xcode10.2
- osx_image: xcode11
env: PLATFORM="iOS"
- osx_image: xcode10.2
- osx_image: xcode11
env: PLATFORM="tvOS"
- osx_image: xcode10.2
- osx_image: xcode11
env: PLATFORM="macOS"
env:
global:
Expand Down
3,245 changes: 134 additions & 3,111 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "uber/ios-snapshot-test-case" "6.0.3"
github "uber/ios-snapshot-test-case" "6.1.0"
69 changes: 69 additions & 0 deletions ChartDataTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//
// ChartDataTests.swift
// ChartsTests
//
// Created by Peter Kaminski on 1/23/20.
//

import XCTest
@testable import Charts

class ChartDataTests: XCTestCase {

var data: ScatterChartData!

private enum SetLabels {
static let one = "label1"
static let two = "label2"
static let three = "label3"
static let badLabel = "Bad label"
}

override func setUp() {
super.setUp()

let setCount = 5
let range: UInt32 = 32
let values1 = (0..<setCount).map { (i) -> ChartDataEntry in
let val = Double(arc4random_uniform(range) + 3)
return ChartDataEntry(x: Double(i), y: val)
}
let values2 = (0..<setCount).map { (i) -> ChartDataEntry in
let val = Double(arc4random_uniform(range) + 3)
return ChartDataEntry(x: Double(i), y: val)
}
let values3 = (0..<setCount).map { (i) -> ChartDataEntry in
let val = Double(arc4random_uniform(range) + 3)
return ChartDataEntry(x: Double(i), y: val)
}

let set1 = ScatterChartDataSet(entries: values1, label: SetLabels.one)
let set2 = ScatterChartDataSet(entries: values2, label: SetLabels.two)
let set3 = ScatterChartDataSet(entries: values3, label: SetLabels.three)

data = ScatterChartData(dataSets: [set1, set2, set3])
}

func testGetDataSetByLabelCaseSensitive() {
XCTAssertTrue(data.getDataSetByLabel(SetLabels.one, ignorecase: false)?.label == SetLabels.one)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.two, ignorecase: false)?.label == SetLabels.two)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.three, ignorecase: false)?.label == SetLabels.three)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.one.uppercased(), ignorecase: false) == nil)
}

func testGetDataSetByLabelIgnoreCase() {
XCTAssertTrue(data.getDataSetByLabel(SetLabels.one, ignorecase: true)?.label == SetLabels.one)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.two, ignorecase: true)?.label == SetLabels.two)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.three, ignorecase: true)?.label == SetLabels.three)

XCTAssertTrue(data.getDataSetByLabel(SetLabels.one.uppercased(), ignorecase: true)?.label == SetLabels.one)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.two.uppercased(), ignorecase: true)?.label == SetLabels.two)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.three.uppercased(), ignorecase: true)?.label == SetLabels.three)
}

func testGetDataSetByLabelNilWithBadLabel() {
XCTAssertTrue(data.getDataSetByLabel(SetLabels.badLabel, ignorecase: true) == nil)
XCTAssertTrue(data.getDataSetByLabel(SetLabels.badLabel, ignorecase: false) == nil)
}
}

2 changes: 1 addition & 1 deletion 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.3.0"
s.version = "3.5.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 Down
26 changes: 24 additions & 2 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,18 @@
B6DCC229615EFE706F64A37D /* LineScatterCandleRadarRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 923206233CA89FD03565FF87 /* LineScatterCandleRadarRenderer.swift */; };
B85DEB06B4C1AFFC8A0E3295 /* CircleShapeRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECE1B1623D3AF69CECAE8562 /* CircleShapeRenderer.swift */; };
BEFD9518F3A74ACF8FA33308 /* Charts.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F9922F0641F7955DC6CD324 /* Charts.h */; settings = {ATTRIBUTES = (Public, ); }; };
C03E6D8123DAAB2600083010 /* ChartDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C03E6D8023DAAB2600083010 /* ChartDataTests.swift */; };
C04D269AD4A373FD2B621C43 /* LineChartData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C978F31F23C7D21197DC2A1 /* LineChartData.swift */; };
C09E91F67A4AC43C277E7D82 /* BubbleChartDataEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8ED233775EEC31243A6919 /* BubbleChartDataEntry.swift */; };
C20A62D8CB9120523D5FB650 /* LegendEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E7C673B9ED4340F550A9283 /* LegendEntry.swift */; };
C2EFB4EC8C97FA9987F1B50D /* RadarChartDataEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91EEEDE2AB8F2DA3AFCF0733 /* RadarChartDataEntry.swift */; };
C33E1AF5471A60BA42DAF52E /* RadarHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F368CF209744D8F3B85B1028 /* RadarHighlighter.swift */; };
C3F0DDB7F0A922F0BB7EDB8A /* IBarChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A53A9E42FC07FFDACA937C1 /* IBarChartDataSet.swift */; };
C7B150D740255670DEB9F455 /* Charts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65AD9E95D9ED4DC0BD73A743 /* Charts.framework */; };
C9AA360A2355F01F00C97D93 /* Platform+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9AA36092355F01F00C97D93 /* Platform+Color.swift */; };
C9F3DC262355F791000C3215 /* Platform+Graphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F3DC242355F791000C3215 /* Platform+Graphics.swift */; };
C9F3DC272355F791000C3215 /* Platform+Gestures.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F3DC252355F791000C3215 /* Platform+Gestures.swift */; };
C9F3DC292355FA2F000C3215 /* Platform+Touch Handling.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F3DC282355FA2F000C3215 /* Platform+Touch Handling.swift */; };
CB785FE9B6B312408D17BC3B /* ChartUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FDA09EF973925A110506799 /* ChartUtils.swift */; };
CC7F8198A13249B5DEBBF25E /* AnimatedViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710D7C9B2F1DB4A331EE405A /* AnimatedViewPortJob.swift */; };
CEF68F42A5390A73113F3663 /* Renderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F66B32AD8A878CBD6DB6ED2 /* Renderer.swift */; };
Expand Down Expand Up @@ -282,13 +287,18 @@
BD02157CF8CEE1189BF681DA /* PieChartDataEntry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PieChartDataEntry.swift; path = Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift; sourceTree = "<group>"; };
BD5C6D20243EC2F19069AACD /* CandleStickChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CandleStickChartRenderer.swift; path = Source/Charts/Renderers/CandleStickChartRenderer.swift; sourceTree = "<group>"; };
BFABD027DAF6851088F002AC /* LineChartDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LineChartDataProvider.swift; path = Source/Charts/Interfaces/LineChartDataProvider.swift; sourceTree = "<group>"; };
C03E6D8023DAAB2600083010 /* ChartDataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartDataTests.swift; sourceTree = "<group>"; };
C31AA65EA27776F8C653C7E8 /* BarChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BarChartDataSet.swift; path = Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift; sourceTree = "<group>"; };
C52E8344160B5E689DA3C25C /* ChevronDownShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChevronDownShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift; sourceTree = "<group>"; };
C574E1BC7E12D937A5471EF8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Tests/Supporting Files/Info.plist"; sourceTree = "<group>"; };
C58BD7B14BEA440783ED8D2B /* LineScatterCandleRadarChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LineScatterCandleRadarChartDataSet.swift; path = Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift; sourceTree = "<group>"; };
C75935E899183DDFA181E2CC /* AxisRendererBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AxisRendererBase.swift; path = Source/Charts/Renderers/AxisRendererBase.swift; sourceTree = "<group>"; };
C8C9A105A7DB64F39DDA648B /* ComponentBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ComponentBase.swift; path = Source/Charts/Components/ComponentBase.swift; sourceTree = "<group>"; };
C8FB6219B143F8F7DA762950 /* TriangleShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TriangleShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift; sourceTree = "<group>"; };
C9AA36092355F01F00C97D93 /* Platform+Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Platform+Color.swift"; path = "Source/Charts/Utils/Platform+Color.swift"; sourceTree = "<group>"; };
C9F3DC242355F791000C3215 /* Platform+Graphics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Platform+Graphics.swift"; path = "Source/Charts/Utils/Platform+Graphics.swift"; sourceTree = "<group>"; };
C9F3DC252355F791000C3215 /* Platform+Gestures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Platform+Gestures.swift"; path = "Source/Charts/Utils/Platform+Gestures.swift"; sourceTree = "<group>"; };
C9F3DC282355FA2F000C3215 /* Platform+Touch Handling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Platform+Touch Handling.swift"; path = "Source/Charts/Utils/Platform+Touch Handling.swift"; sourceTree = "<group>"; };
C9FE42E868A225C116537368 /* ChartBaseDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChartBaseDataSet.swift; path = Source/Charts/Data/Implementations/ChartBaseDataSet.swift; sourceTree = "<group>"; };
CB1DD1A0F64266A10EE94194 /* ScatterChartDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScatterChartDataSet.swift; path = Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift; sourceTree = "<group>"; };
D2E1819D72CD7B6C4A4E8048 /* LineChartTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LineChartTests.swift; path = Tests/Charts/LineChartTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -529,6 +539,7 @@
D2E1819D72CD7B6C4A4E8048 /* LineChartTests.swift */,
135F11CD20425AF600D655A3 /* PieChartTests.swift */,
064989451F5C99C7006E8BB3 /* Snapshot.swift */,
C03E6D8023DAAB2600083010 /* ChartDataTests.swift */,
);
name = Charts;
sourceTree = "<group>";
Expand Down Expand Up @@ -590,6 +601,10 @@
5A4CFFFB65819121595F06F1 /* Fill.swift */,
3ED23C354AFE81818D78E645 /* Platform.swift */,
97AD2D4520AF917100F9C24A /* Platform+Accessibility.swift */,
C9AA36092355F01F00C97D93 /* Platform+Color.swift */,
C9F3DC252355F791000C3215 /* Platform+Gestures.swift */,
C9F3DC242355F791000C3215 /* Platform+Graphics.swift */,
C9F3DC282355FA2F000C3215 /* Platform+Touch Handling.swift */,
FF475B9593B9898853814340 /* Transformer.swift */,
324C9127B53A8D39C8B49277 /* TransformerHorizontalBarChart.swift */,
72EAEBB7CF73E33565FC2896 /* ViewPortHandler.swift */,
Expand Down Expand Up @@ -749,11 +764,11 @@
};
buildConfigurationList = 493FF4FB1D40FC7C51DDDA6B /* Build configuration list for PBXProject "Charts" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = 865A1CF149F52850CAB7F177;
productRefGroup = AB2D554102718F209377399E /* Products */;
Expand Down Expand Up @@ -839,6 +854,7 @@
DBC9DB402CC9BB84B76968C4 /* Description.swift in Sources */,
03960E8148C6AEDACE4B77CC /* IMarker.swift in Sources */,
ECE7EAE7179A7F57CE9BBD8F /* Legend.swift in Sources */,
C9F3DC272355F791000C3215 /* Platform+Gestures.swift in Sources */,
C20A62D8CB9120523D5FB650 /* LegendEntry.swift in Sources */,
369DEB23452CB436A3A1A644 /* MarkerImage.swift in Sources */,
9360348A04723E653FBC8B18 /* MarkerView.swift in Sources */,
Expand All @@ -848,6 +864,7 @@
3395682A1E27756651FF6F4D /* BarChartData.swift in Sources */,
45C459FA25DFCBE62FA6A06C /* BarChartDataEntry.swift in Sources */,
17E994DA88777AA1D8CCFC58 /* BarChartDataSet.swift in Sources */,
C9AA360A2355F01F00C97D93 /* Platform+Color.swift in Sources */,
7C9CE6718D18859A35146098 /* BarLineScatterCandleBubbleChartData.swift in Sources */,
53A91F6F86740E26FE733639 /* BarLineScatterCandleBubbleChartDataSet.swift in Sources */,
E68CA3DC66EB638C956E09B8 /* BubbleChartData.swift in Sources */,
Expand Down Expand Up @@ -893,6 +910,7 @@
B6C9F450D937B87224D29D5C /* IFillFormatter.swift in Sources */,
967EE2EDDE3337C5C4337C59 /* IndexAxisValueFormatter.swift in Sources */,
A40ACF0CCE96EEE104B0463D /* IValueFormatter.swift in Sources */,
C9F3DC262355F791000C3215 /* Platform+Graphics.swift in Sources */,
3CBE95F1E9394FA08CDCF31E /* BarHighlighter.swift in Sources */,
D326491E8BCDE54A0921E137 /* ChartHighlighter.swift in Sources */,
64FA1EDB4DC1F65727D52D10 /* CombinedHighlighter.swift in Sources */,
Expand All @@ -908,6 +926,7 @@
4272DA5D44AF7DA05A5A8287 /* BubbleChartDataProvider.swift in Sources */,
30DCC4BAA5601B154ABADA13 /* CandleChartDataProvider.swift in Sources */,
FD37AAC0270F390FFC470A65 /* ChartDataProvider.swift in Sources */,
C9F3DC292355FA2F000C3215 /* Platform+Touch Handling.swift in Sources */,
65EA404AE098EBCE8D5DE04B /* CombinedChartDataProvider.swift in Sources */,
2BA03CEC36BADCF682F1328B /* LineChartDataProvider.swift in Sources */,
0511E43EF3FD2CDE7F7F15DB /* ScatterChartDataProvider.swift in Sources */,
Expand Down Expand Up @@ -969,6 +988,7 @@
B66817462241E3CC00017CF1 /* HorizontalBarChartTests.swift in Sources */,
135F11CE20425AF600D655A3 /* PieChartTests.swift in Sources */,
064989461F5C99C7006E8BB3 /* Snapshot.swift in Sources */,
C03E6D8123DAAB2600083010 /* ChartDataTests.swift in Sources */,
224EFF991FBAAC4700CF9B3B /* EquatableTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1004,6 +1024,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.5.0;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.Charts;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1180,6 +1201,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.5.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.dcg.Charts;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
6 changes: 1 addition & 5 deletions 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 = "1020"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -39,8 +39,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -68,8 +66,6 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
10 changes: 3 additions & 7 deletions Charts.xcodeproj/xcshareddata/xcschemes/ChartsTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -40,8 +40,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -69,8 +67,6 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Loading

0 comments on commit 89c0690

Please sign in to comment.