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

Port ios-charts to OS X. #759

Closed
wants to merge 3 commits into from
Closed

Conversation

pixelspark
Copy link
Contributor

This commit adds a thin UIKit/Cocoa abstraction layer (Util/ChartsPlatform.swift). It also adds an OS X demo application.

With reference to #43

ioscharts

This commit adds a thin UIKit/Cocoa abstraction layer (Util/ChartsPlatform.swift). It also adds an OS X demo application.
@pixelspark
Copy link
Contributor Author

Ah, I might have inadvertently set the target platform for the 'Charts-iOS' target to OSX. Simply changing this back to iOS should fix the test.

…t properly exported from Swift to Objective-C, so just use the UI* classes from iOS code).
@pmairoldi
Copy link
Collaborator

Great work! Looks good to me. I will merge this into a separate branch so that we can work on it to make sure everything is good before it goes into a release.

@pmairoldi
Copy link
Collaborator

OS X work can be found here

@pmairoldi pmairoldi closed this Feb 20, 2016
@danielgindi
Copy link
Collaborator

Great!
It's amazing that this is actually happening. I love open source :-)

@pixelspark
Copy link
Contributor Author

Glad I could help out & good to see this is being adopted by the project!

I have been testing the charts in an OSX app and have not seen any major issues. Line, bar, radar, pie and scatter plots seem to work fine. Some things to work on:

  • Some of the default fonts are a bit small on OSX. The easy fix is to use [NSUIFont systemFontOfSize:] with a different size for OSX. Even better would be to integrate with Dynamic Type on iOS (don't know if it exists at all on OSX?).
  • The gestures need some work. A pinch gesture recognizer is most notably missing in OSX (but can probably be implemented with a custom gesture recognizer and a bit of work).
  • Animation of charts is smooth with my 'fake' timer-based implementation of CADisplayLink. We may want to look into CVDisplayLink on OS X for a 'real' implementation.

@danielgindi
Copy link
Collaborator

No Dynamic Type in OSX...

@danielgindi
Copy link
Collaborator

I'm not too much worried about defaults - those could be adjusted later... Let's get the real problems fixed first :-)

@danielgindi
Copy link
Collaborator

It turns out that there's a NSMagnificationGestureRecognizer :-)
I'm creating the bridge now...

@danielgindi
Copy link
Collaborator

There are issues with "nsuiGestureRecognizerShouldBegin" though - as it is not really mapped to anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants