-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Plotting Realm data in Swift. RLMResults not available #898
Comments
Due to some limitations to Realm's implementation, we couldn't support the Swift |
Do we have a solution or a work-around for this issue ? |
Not at the moment. |
Does this effectively mean that Realm Charts can't currently be used with Swift? I'm having the same issue and have converted everything else to work but this one line of code. |
You can use it using Realm for objective-c. Realm for objective-c will also work in Swift. I didn’t do it, had to many adaptions anyway.
|
@bb-git I'm thinking of just using regular Charts for Swift (no Realm) and converting my existing Realm dataset into normal arrays for the data. That seems like the option with the least amount of effort. |
Yes it's what I've done too. |
I created the datasets directly iterating over the results, without using arrays
|
* added test image to demo project * all datasets via superclass: added var drawIconsEnabled, func isDrawIconsEnabled() and var iconOffset * utils: drawImage(context:image:point:expectedSize:offset:) * all renderers are drawing icon image if it is stored in entitie's data property and dataset allows * some demos updated to toggle icons * unit tests * fix: misplacement of icon. Now icon is drawn correctly centered. * allow to make vertical-only offset for icons on Pie and Radar charts (in addition to distance from center) * drawBottomYLabelEntryEnabled (Closes ChartsOrg#1006) * resetZoom() (Closes ChartsOrg#1179) * Correctly position 0 in stacked bar (Closes ChartsOrg#1195, #closes ChartsOrg#1191) * Update "Usage" section of README Updates README.md to reflect changes made to "Build Options" in Xcode 8.2+. * Removed embedded Realm leftover from repo * Use realm-cocoa 2.1.1 for ObjectiveCSupport (Closes ChartsOrg#898, resolves ChartsOrg#1594) * Updated project settings * Add support for extensions * Fix NSCopying implementation in CandleChartDataEntry * Update RealmSwift Dependency * update configurations for xcode 8.2 * fix a typo, as orientation is horizontal by default * close ChartsOrg#2066 * update rakefile for ios 10.x simulators * Adds NSPhotoLibraryUsageDescription to plist of ChartsDemo to prevent crash on iOS 10 on try to store shot of char to photo library. * 'backgroundColor' is inaccessible due to 'internal' protection level on mac OS X ChartsOrg#2135 * Fixes index out of range crash. * add github token to .travis.yml to fix builds? * Code styling * Fixed dependency of drawing values on isDrawIconsEnabled * CGPoint is more appropriate here * Do not repeat the scaling procedure if we can cache it * Docs * Deprecated weird constructor * Use a designated icon property and constructors * More refactoring to icons drawing * Disabled icons by default in examples * Fixes for icon tests * Reverted basic test images from pr (ChartsOrg#1793) * Improved feb29 formula * Fixed the inconsistency of AxisMax and AxisMin When enabled autoScale. `data.calcMinMaxY(fromX: self.lowestVisibleX, toX: self.highestVisibleX)` is called after ` _leftYAxisRenderer?.computeAxis(min: _leftAxis._axisMinimum, max: _leftAxis._axisMaximum, inverted: _leftAxis.isInverted)` `_rightYAxisRenderer?.computeAxis(min: _rightAxis._axisMinimum, max: _rightAxis._axisMaximum, inverted: _rightAxis.isInverted)` `_xAxisRenderer?.computeAxis(min: _xAxis._axisMinimum, max: _xAxis._axisMaximum, inverted: false)` that means _leftAxisRenderer and _rightAxisRenderer will render AxisLines and Values based on old values of _axisMinimum, _axisMaximum * Tell Travis to wait more time when building carthage * Always respect isEnabled * Consider _yAxis.isDrawLimitLinesBehindDataEnabled for radar chart * Updated to use Realm version 2.4.3 * fix Xcode 8.3 compiler warnings * loosen realm version requirement * Updated build-dependencies.sh * Remove line width minimum constraint * Moved Realm stuff to https://github.com/danielgindi/ChartsRealm * Added @discardableResult to silence warnings when it’s safe to ignore result * gitignore updates * Removed unrequited script * v3.0.2 * Removed leftover scheme * Removed leftover script from the combined Realm era * Converted swift 3.0 DBL_MIN leftover
I get the following error when trying to use the constructor:
Cannot convert value of 'Results<()>' to expected argument type 'RLMResults?'
Has anybody managed this? I can't find a solution
The text was updated successfully, but these errors were encountered: