Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into eChart
Browse files Browse the repository at this point in the history
* 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
water-su committed Feb 7, 2020
2 parents c1f20b3 + 1584a8e commit 890b403
Show file tree
Hide file tree
Showing 509 changed files with 16,648 additions and 7,681 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE.md
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.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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. -->
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/
34 changes: 18 additions & 16 deletions .travis.yml
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/utpXWbPXQqtvDpuqrg9IR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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)
2,005 changes: 1,960 additions & 45 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" "c1808fb4435ffc3db2203e7623935f39fc31aa8f"
github "uber/ios-snapshot-test-case" "6.1.0"
15 changes: 0 additions & 15 deletions Carthage.xcconfig

This file was deleted.

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)
}
}

4 changes: 3 additions & 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.0.2"
s.version = "3.4.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,6 +10,8 @@ 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 = '5.0'
s.cocoapods_version = '>= 1.5.0'

s.subspec "Core" do |ss|
ss.source_files = "Source/Charts/**/*.swift"
Expand Down
Loading

0 comments on commit 890b403

Please sign in to comment.