-
-
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
Default backgroundColor (nil) displays as black instead of clear. #2222
Comments
Just saw public override init(frame: CGRect)
{
super.init(frame: frame)
#if os(iOS)
self.backgroundColor = NSUIColor.clear
#endif
initialize()
} when init, it will be clear |
@liuxuan30 Perhaps this is relevant? Maybe this should also be called from initWithCoder, e.g.: required init?(coder: NSCoder) {
super.init(coder: coder)
#if os(iOS)
self.backgroundColor = NSUIColor.clear
#endif
} |
…itWithCoder also needs it
I had a PR for this, move the color setter to initialize() |
@danielgindi please review this, I am not sure why it's just seen in |
…itWithCoder also needs it
fix #2222 move default backgroundColor to initialize()
…l/update_upstream * commit '04c5820a6cca34b98cb48b8baab1dd44f44e857d': (61 commits) add switch for clearing `lastHighlighted` in clear() (ChartsOrg#2355) update schemes, move script to file like ChartsRealm use name instead of uuid, add run script for copying missing framework for ChartsTests 1. use xcode 8.3 image 2. use Apple TV 1080p (10.2) and iPhone 7 (10.3) device id in Travis CI Fix Simple Bar Chart Demo, switch use of x and y values (ChartsOrg#2365) Converted swift 3.0 DBL_MIN leftover Removed leftover script from the combined Realm era Removed leftover scheme v3.0.2 Removed unrequited script gitignore updates Added @discardableResult to silence warnings when it’s safe to ignore result Moved Realm stuff to https://github.com/danielgindi/ChartsRealm Remove line width minimum constraint Updated build-dependencies.sh loosen realm version requirement fix Xcode 8.3 compiler warnings fix ChartsOrg#2222 move default backgroundColor to initialize() as initWithCoder also needs it Updated to use Realm version 2.4.3 Consider _yAxis.isDrawLimitLinesBehindDataEnabled for radar chart ... # Conflicts: # Source/ChartsRealm/Data/RealmBarDataSet.swift
…l/update_upstream * commit '04c5820a6cca34b98cb48b8baab1dd44f44e857d': (61 commits) add switch for clearing `lastHighlighted` in clear() (ChartsOrg#2355) update schemes, move script to file like ChartsRealm use name instead of uuid, add run script for copying missing framework for ChartsTests 1. use xcode 8.3 image 2. use Apple TV 1080p (10.2) and iPhone 7 (10.3) device id in Travis CI Fix Simple Bar Chart Demo, switch use of x and y values (ChartsOrg#2365) Converted swift 3.0 DBL_MIN leftover Removed leftover script from the combined Realm era Removed leftover scheme v3.0.2 Removed unrequited script gitignore updates Added @discardableResult to silence warnings when it’s safe to ignore result Moved Realm stuff to https://github.com/danielgindi/ChartsRealm Remove line width minimum constraint Updated build-dependencies.sh loosen realm version requirement fix Xcode 8.3 compiler warnings fix ChartsOrg#2222 move default backgroundColor to initialize() as initWithCoder also needs it Updated to use Realm version 2.4.3 Consider _yAxis.isDrawLimitLinesBehindDataEnabled for radar chart ... # Conflicts: # Source/ChartsRealm/Data/RealmBarDataSet.swift
I just updated to version 3.0.2 and still have a default black background behind my chart. I added a UIView in storyboard and set the class to I also have tried doing this:
|
This change is not in 3.0.2. Pull from master |
…itWithCoder also needs it
fix ChartsOrg#2222 move default backgroundColor to initialize()
As the title states, the default backgroundColor of a view is nil, which shows in the Storyboard as transparent.
It seems counter-intuitive that this would be
UIColor.black
rather than.clear
Obviously, it's easy to work-around with a simple
chartView.backgroundColor = .clear
.However, it seems like the "default" should match other views, which use a clear color.
The text was updated successfully, but these errors were encountered: