Skip to content

Commit

Permalink
removed .rotate for foreGroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
AppPear committed May 25, 2020
1 parent aa91264 commit b5beab5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftUICharts/Charts/BarChart/BarChartRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public struct BarChartRow: View {
index: index,
width: Float(geometry.frame(in: .local).width - Constant.spacing),
numberOfDataPoints: self.data.count,
gradientColor: self.style.foregroundColor.rotate(for: index),
gradientColor: self.style.foregroundColor.first!,
touchLocation: self.$touchLocation)
.scaleEffect(self.getScaleSize(touchLocation: self.touchLocation, index: index), anchor: .bottom)
.animation(.spring())
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 @@ -38,7 +38,7 @@ public struct PieChartRow: View {
endDeg: self.slices[index].endDeg,
index: index,
backgroundColor: self.style.backgroundColor.startColor,
accentColor: self.style.foregroundColor.rotate(for: index)
accentColor: self.style.foregroundColor.first!
)
}

Expand Down

3 comments on commit b5beab5

@satan87
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do that, i believe it will show only one color for all bars and slice. no ?

@AppPear
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this error message for rotate: Value of type '[ColorGradient]' has no member 'rotate'

@AppPear
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can add this rotate function then I can revert back to it

Please sign in to comment.