Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with swift playgrounds #2335

Merged
merged 2 commits into from
Sep 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Source/Charts/Components/Description.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
import Foundation
import CoreGraphics

#if !os(OSX)
import UIKit
#endif

@objc(ChartDescription)
open class Description: ComponentBase
{
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Data/Interfaces/IChartDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//

import Foundation
import CoreGraphics
Copy link
Member

@liuxuan30 liuxuan30 Apr 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting in my Xcode, it never warns or complains missing CoreGraphics, though IChartDataSet refers CGPoint

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since UIKit and AppKit imports CoreGraphics it is not needed.

Copy link
Contributor Author

@macteo macteo Apr 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until you try to use it in a Playground

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macteo shall we consider it's playground bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so as it seems a strict requirement.


@objc
public protocol IChartDataSet
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Filters/DataApproximator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//

import Foundation
import CoreGraphics

@objc(ChartDataApproximator)
open class DataApproximator: NSObject
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Highlight/Highlight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//

import Foundation
import CoreGraphics

@objc(ChartHighlight)
open class Highlight: NSObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class ChevronDownShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class ChevronUpShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class CircleShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class CrossShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Renderers/Scatter/IShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//

import Foundation
import CoreGraphics

@objc
public protocol IShapeRenderer : NSObjectProtocol
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class SquareShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class TriangleShapeRenderer : NSObject, IShapeRenderer
{
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Renderers/Scatter/XShapeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics

open class XShapeRenderer : NSObject, IShapeRenderer
{
Expand Down