Posts

Post not yet marked as solved
0 Replies
724 Views
A lot of time when you plot a chart (say a bar chart here) for business you wants to emphasize the small variation between data, say daily you have roughly 5 millions messages sent but you need to visualize the 3k variations common each days. To utilize the landscape it's best for one to visualize not from zero but zooming in between 4.9m ~ 5.2m range instead of showing a slightly wiggling line. While we could likely (I haven't get to it) to customize our chart to do that it'd be a good and handy option for the standard charts and Swift Chart would auto-adjust the range. On top of it, being able to add standard axis break symbols would be a great help to keep it visualized and keep the chart honest.
Posted
by boaz C.
Last updated
.
Post not yet marked as solved
1 Replies
1.9k Views
I've written this app with SwiftUI for tvOS and is trying to add an EnvironmentObject in. Oddly,1) if I access this value in ContentVIew it crashes... no biggie, I restructured the code a bit, but odd, as I can do it with a separate sample app2) I have a View accessing this EnvObj. I need to toggle it visible/hidden on screen.- when I put it in a Group and have a Bool toggle it to show and hide, it access the EnvObj fine. But I lost the handling of Menu Button- when I put it in a .sheet(), the same code can no longer access the EnvObj! I poke around it it looks like this(lldb) po self.userSettingsFatal error: No ObservableObject of type UserSettings found.A View.environmentObject(_:) for UserSettings may be missing as an ancestor of this view.: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/Monoceros_Sim/Monoceros-39.3/Core/EnvironmentObject.swift, line 552019-11-21 09:38:18.555138-0500 TWCAppleTV[35825:1484533] Fatal error: No ObservableObject of type UserSettings found.A View.environmentObject(_:) for UserSettings may be missing as an ancestor of this view.: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/Monoceros_Sim/Monoceros-39.3/Core/EnvironmentObject.swift, line 55error: warning: couldn't get required object pointer (substituting NULL): Couldn't load 'self' because its value couldn't be evaluatederror: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).The process has been returned to the state before expression evaluation.(lldb) po $userSettingsFatal error: No ObservableObject of type UserSettings found.A View.environmentObject(_:) for UserSettings may be missing as an ancestor of this view.: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/Monoceros_Sim/Monoceros-39.3/Core/EnvironmentObject.swift, line 552019-11-21 09:38:24.548829-0500 TWCAppleTV[35825:1484533] Fatal error: No ObservableObject of type UserSettings found.A View.environmentObject(_:) for UserSettings may be missing as an ancestor of this view.: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/Monoceros_Sim/Monoceros-39.3/Core/EnvironmentObject.swift, line 55error: warning: couldn't get required object pointer (substituting NULL): Couldn't load 'self' because its value couldn't be evaluatederror: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).The process has been returned to the state before expression evaluation.(lldb) po _userSettings▿ EnvironmentObject<UserSettings> - _store : nil - _seed : 1userSetting is just not there.Anyone have any insight of what's going on? thx(This is my first try on SwiftUI, really fun)
Posted
by boaz C.
Last updated
.