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

Fix explicit .self errors in Xcode 11 #163

Open
wants to merge 1 commit into
base: new-version-beta2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/Base/Label/ChartLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public struct ChartLabel: View {
self.textToDisplay = self.title
}
.onReceive(self.chartValue.objectWillChange) { _ in
self.textToDisplay = self.chartValue.interactionInProgress ? String(format: format, self.chartValue.currentValue) : self.title
self.textToDisplay = self.chartValue.interactionInProgress ? String(format: self.format, self.chartValue.currentValue) : self.title
}
if !self.chartValue.interactionInProgress {
Spacer()
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/Charts/LineChart/Line.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public struct Line: View {
self.frame = geometry.frame(in: .local)

}
.onReceive(orientationChanged) { _ in
.onReceive(self.orientationChanged) { _ in
// When we receive notification here, the geometry is still the old value
// so delay evaluation to get the new frame!
DispatchQueue.main.async {
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftUICharts/Charts/PieChart/PieChartRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public struct PieChartRow: View {
backgroundColor: self.style.backgroundColor.startColor,
accentColor: self.style.foregroundColor.rotate(for: index)
)
.scaleEffect(currentTouchedIndex == index ? 1.1 : 1)
.scaleEffect(self.currentTouchedIndex == index ? 1.1 : 1)
.animation(Animation.spring())
}
}
Expand All @@ -55,13 +55,13 @@ public struct PieChartRow: View {
let isTouchInPie = isPointInCircle(point: value.location, circleRect: rect)
if isTouchInPie {
let touchDegree = degree(for: value.location, inCircleRect: rect)
currentTouchedIndex = slices.firstIndex(where: { $0.startDeg < touchDegree && $0.endDeg > touchDegree }) ?? -1
self.currentTouchedIndex = self.slices.firstIndex(where: { $0.startDeg < touchDegree && $0.endDeg > touchDegree }) ?? -1
} else {
currentTouchedIndex = -1
self.currentTouchedIndex = -1
}
})
.onEnded({ value in
currentTouchedIndex = -1
self.currentTouchedIndex = -1
})
)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/Charts/RingsChart/Ring.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ struct Ring: View {
// Background for the ring. Use the final color with reduced opacity
RingShape()
.stroke(style: StrokeStyle(lineWidth: self.ringWidth))
.fill(lastGradientColor.opacity(0.142857))
.fill(self.lastGradientColor.opacity(0.142857))
// Foreground
RingShape(percent: self.percent, startAngle: self.startAngle)
.stroke(style: StrokeStyle(lineWidth: self.ringWidth, lineCap: .round))
Expand Down