|
|
|
@ -10,8 +10,8 @@ import Charts
|
|
|
|
|
|
|
|
|
|
struct PlayerVSPage: View {
|
|
|
|
|
private var chartData: [(key: LocalizedStringKey, color: Color, value: UInt)] = [
|
|
|
|
|
(key: "playerVs.chart.wins \("Player 1")", color: .red, value: 1),
|
|
|
|
|
(key: "playerVs.chart.wins \("Player 2")", color: .yellow, value: 2),
|
|
|
|
|
(key: "playerVs.chart.wins \("Player 1" as String)", color: .red, value: 1),
|
|
|
|
|
(key: "playerVs.chart.wins \("Player 2" as String)", color: .yellow, value: 2),
|
|
|
|
|
(key: "playerVs.chart.draws", color: .gray, value: 3),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -26,7 +26,7 @@ struct PlayerVSPage: View {
|
|
|
|
|
ForEach(chartData, id: \.color) { entry in
|
|
|
|
|
SectorMark(angle: .value(entry.key, entry.value))
|
|
|
|
|
.annotation(position: .overlay) {
|
|
|
|
|
Text("\(entry.value)").font(.caption)
|
|
|
|
|
Text(entry.value.description).font(.caption)
|
|
|
|
|
}
|
|
|
|
|
.foregroundStyle(entry.color)
|
|
|
|
|
}
|
|
|
|
@ -47,9 +47,7 @@ struct PlayerPicker: View {
|
|
|
|
|
VStack {
|
|
|
|
|
Circle().frame(width: 50, height: 50)
|
|
|
|
|
|
|
|
|
|
let text: String = "Button Idk"
|
|
|
|
|
|
|
|
|
|
Button(text) {
|
|
|
|
|
Button("Button Idk" as String) {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|