You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the chart as a part of user interface, enabling them to select the option, that interests them most. Is it possible to receive a callback with a node, after user taps on it? Also it would be nice to be able to disable focused state for nodes, so that you need to tap only once to go inside/outside note.
The text was updated successfully, but these errors were encountered:
I just noticed that in DataModel.swift @lludo made the entire configuration observable and published all the vars:
public class SunburstConfiguration: ObservableObject
So all you have to do is use .onRecieve for your SwiftUI view to monitor for any tap on an arc:
VStack {
SunburstView(configuration: configuration)
}.onReceive(configuration.$selectedNode, perform: { _ in
Print(configuration.selectedNode?.name, " is the selected node...")
})
I am using the chart as a part of user interface, enabling them to select the option, that interests them most. Is it possible to receive a callback with a node, after user taps on it? Also it would be nice to be able to disable focused state for nodes, so that you need to tap only once to go inside/outside note.
The text was updated successfully, but these errors were encountered: