forked from ChartsOrg/Charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into eChart
* origin/master: (256 commits) Add our first super sponsor! Updated test screenshots Add option to draw grid lines in front of data Removed double spacing for labelRotatedHeight Fixes an issue with string comparison in ChartData for finding a dataset by its label (Fixes ChartsOrg#4274) Simplify code Use faster check for line whether it's inside drawing rect Corrected pie `isHighlightEnabled` - render normally when disabled Restored correct velocity sampler Deduplicate BalloonMarker code Unified styling Call chartViewDidEndPanning on when *panning* is ended Propagate file header to newer files Removed redundant minEntries > 0 labelXOffset = 10 is default for radar chart only Update README.md, added link to tutorial about Radar Charts. Changes to fix Catalyst compatibility Allowing overrides for YAxisRenderer.drawYLabels (ChartsOrg#4089) move isDrawCirclesEnabled check further up in code to avoid creating … (ChartsOrg#4050) Platform separation (ChartsOrg#4178) ... # Conflicts: # Source/Charts/Components/AxisBase.swift # Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift # Source/Charts/Highlight/Highlight.swift
- Loading branch information
Showing
509 changed files
with
16,648 additions
and
7,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
> ℹ Please fill out this template when filing an issue. | ||
> All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. | ||
> | ||
> Per our [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md), we use GitHub for | ||
> bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag [`ios-charts`.](https://stackoverflow.com/questions/tagged/ios-charts) | ||
> | ||
> Please remove this line and everything above it before submitting. | ||
* [ ] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md). | ||
|
||
## What did you do? | ||
|
||
ℹ Please replace this with what you did. | ||
|
||
## What did you expect to happen? | ||
|
||
ℹ Please replace this with what you expected to happen. | ||
|
||
## What happened instead? | ||
|
||
ℹ Please replace this with of what happened instead. | ||
|
||
## Charts Environment | ||
|
||
**Charts version/Branch/Commit Number:** | ||
**Xcode version:** | ||
**Swift version:** | ||
**Platform(s) running Charts:** | ||
**macOS version running Xcode:** | ||
|
||
## Demo Project | ||
|
||
ℹ Please link to or upload a project we can download that reproduces the issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Issue Link :link: | ||
<!-- What issue does this fix? If an issue doesn't exist, remove this section. --> | ||
|
||
### Goals :soccer: | ||
<!-- List the high-level objectives of this pull request. --> | ||
<!-- Include any relevant context. --> | ||
|
||
### Implementation Details :construction: | ||
<!-- Explain the reasoning behind any architectural changes. --> | ||
<!-- Highlight any new functionality. --> | ||
|
||
### Testing Details :mag: | ||
<!-- Describe what tests you've added for your changes. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,3 +72,4 @@ fastlane/test_output | |
Carthage | ||
Charts.framework.zip | ||
ChartsRealm.framework.zip | ||
.swiftpm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
osx_image: xcode8.3 | ||
language: objective-c | ||
rvm: | ||
- 2.2 | ||
osx_image: xcode11 | ||
matrix: | ||
include: | ||
- osx_image: xcode11 | ||
env: PLATFORM="iOS" | ||
- osx_image: xcode11 | ||
env: PLATFORM="tvOS" | ||
- osx_image: xcode11 | ||
env: PLATFORM="macOS" | ||
env: | ||
global: | ||
- LANG=en_US.UTF-8 | ||
- secure: HRl5Cg3/LmTJYCSDGtV8Fiqf6OgWXR6C5YkNviOElU9YmcCTvnmE7MCm+gK8hJNIQ2mWCBTlxTC7jJxeYlx0D+JQ6IhRc75B4zXgbtth6HCzlvhWDcBbNU/K+JPDjy2EAoVgvf8Xseq6GqM4WcVg2Pwr9PS3aaH/SKDE6yVoPXRM2wXRAxIdxayqm/RQgG88jAKgg+Ub5DKW/c9NLLbUf/WdY9SgQDJtqeZCMv7G3/IzW34KZgVPsqSrPByzZXbf7KgYkYLQlscH4mcUctk1qxhdCae//zcgUZo/utpXWbPXQqtvDpuqrg9IRvoGxa/D1I7dLSJsVnk4aP7RW18vn4HJ82C2AiEp+lU2TQE9y5lXcGssZVIa5aZNTWL90HVer3Kg6AnHffvdCSZ/UHsMZJFURUXL9fRIlWVGuEDeQOqlV6lUmEtp/BiEdV4D5PuCyT6snsmEwkc51goyqh6uS6XhJyqYEQdxdoybznwp91tVmASsRybppIGHTkcWN5csF4zQt40tEwd8LoqM+bBUo0wxKiKsNsecL4JA+YDYs2saZY9U3s8jAaIon+qDu071fPRaPEvBhYHYDhy4cTvBXibyGUYGHkrgLu0w19wDfHcJKt2In58yOmaCCLNoTGp/ZLNVRyZ8VDlj/NdJ2dWpMsL2Aj7OxU065kCL2FlvuRU= | ||
matrix: | ||
- PLATFORM="iOS" | ||
- PLATFORM="tvOS" | ||
- PLATFORM="macOS" | ||
- LANG=en_US.UTF-8 | ||
- secure: HRl5Cg3/LmTJYCSDGtV8Fiqf6OgWXR6C5YkNviOElU9YmcCTvnmE7MCm+gK8hJNIQ2mWCBTlxTC7jJxeYlx0D+JQ6IhRc75B4zXgbtth6HCzlvhWDcBbNU/K+JPDjy2EAoVgvf8Xseq6GqM4WcVg2Pwr9PS3aaH/SKDE6yVoPXRM2wXRAxIdxayqm/RQgG88jAKgg+Ub5DKW/c9NLLbUf/WdY9SgQDJtqeZCMv7G3/IzW34KZgVPsqSrPByzZXbf7KgYkYLQlscH4mcUctk1qxhdCae//zcgUZo/utpXWbPXQqtvDpuqrg9IRvoGxa/D1I7dLSJsVnk4aP7RW18vn4HJ82C2AiEp+lU2TQE9y5lXcGssZVIa5aZNTWL90HVer3Kg6AnHffvdCSZ/UHsMZJFURUXL9fRIlWVGuEDeQOqlV6lUmEtp/BiEdV4D5PuCyT6snsmEwkc51goyqh6uS6XhJyqYEQdxdoybznwp91tVmASsRybppIGHTkcWN5csF4zQt40tEwd8LoqM+bBUo0wxKiKsNsecL4JA+YDYs2saZY9U3s8jAaIon+qDu071fPRaPEvBhYHYDhy4cTvBXibyGUYGHkrgLu0w19wDfHcJKt2In58yOmaCCLNoTGp/ZLNVRyZ8VDlj/NdJ2dWpMsL2Aj7OxU065kCL2FlvuRU= | ||
cache: | ||
- bundler | ||
- bundler | ||
before_install: | ||
- brew update | ||
- brew upgrade carthage || true | ||
- carthage version | ||
- carthage bootstrap --platform $PLATFORM | ||
- brew update | ||
- brew upgrade carthage || true | ||
- carthage version | ||
- carthage bootstrap --platform $PLATFORM | ||
script: | ||
- bundle exec rake ci[$PLATFORM] | ||
- bundle exec rake ci[$PLATFORM] | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
- bash <(curl -s https://codecov.io/bash) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
github "facebook/ios-snapshot-test-case" "c1808fb4435ffc3db2203e7623935f39fc31aa8f" | ||
github "uber/ios-snapshot-test-case" "6.1.0" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.