Skip to content

Commit

Permalink
Merge pull request #5 from ar-rahimi/feature/add-label-to-piechart-sl…
Browse files Browse the repository at this point in the history
…ices

fixed issue
  • Loading branch information
ar-rahimi authored Sep 6, 2020
2 parents 72211f4 + e4150b0 commit 1cf624b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/PieChart/PieChartCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct PieSlice: Identifiable {
var startDeg: Double
var endDeg: Double
var value: Double
var label: String = ""
var label: String
var normalizedValue: Double
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/PieChart/PieChartRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public struct PieChartRow : View {
let startDeg = lastEndDeg
let endDeg = lastEndDeg + (normalized * 360)
lastEndDeg = endDeg
tempSlices.append(PieSlice(startDeg: startDeg, endDeg: endDeg, value: slice.value, normalizedValue: normalized, label: slice.label))
tempSlices.append(PieSlice(startDeg: startDeg, endDeg: endDeg, value: slice.value, label: slice.label, normalizedValue: normalized))
}
return tempSlices
}
Expand Down

0 comments on commit 1cf624b

Please sign in to comment.