SwiftSunburstDiagram icon indicating copy to clipboard operation
SwiftSunburstDiagram copied to clipboard

Use in SwiftUI View

Open sweih opened this issue 3 years ago • 0 comments

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)
    }
}
```

sweih avatar Jul 12 '21 20:07 sweih