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

Use in SwiftUI View #13

Open
sweih opened this issue Jul 12, 2021 · 0 comments
Open

Use in SwiftUI View #13

sweih opened this issue Jul 12, 2021 · 0 comments

Comments

@sweih
Copy link

sweih commented Jul 12, 2021

Hi,

guess I am doing something wrong...
Running this code on a view which is opened as sheet crashes the app.

import SwiftUI
import SunburstDiagram

struct MealBuilderView: View {
    var body: some View {
        
            let configuration = SunburstConfiguration(nodes: [
                Node(name: "Walking",
                     showName: false,
                     value: 10.0,
                     backgroundColor: .systemBlue),
                Node(name: "Restaurant",
                     showName: false,
                     value: 30.0,
                     backgroundColor: .systemRed),
                Node(name: "Home",
                     showName: false,
                     value: 75.0,
                     backgroundColor: .systemTeal)
            ])
            return SunburstView(configuration: configuration)
    }
}
```
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

No branches or pull requests

1 participant