diff --git a/Sources/SwiftUICharts/LineChart/Line.swift b/Sources/SwiftUICharts/LineChart/Line.swift index d29c1874..7e752b3e 100644 --- a/Sources/SwiftUICharts/LineChart/Line.swift +++ b/Sources/SwiftUICharts/LineChart/Line.swift @@ -62,7 +62,7 @@ public struct Line: View { ZStack { if(self.showFull && self.showBackground){ self.closedPath - .fill(LinearGradient(gradient: Gradient(colors: [Colors.GradientUpperBlue, .white]), startPoint: .bottom, endPoint: .top)) + .fill(LinearGradient(gradient: Gradient(colors: [gradient.start, gradient.end]), startPoint: .bottom, endPoint: .top)) .rotationEffect(.degrees(180), anchor: .center) .rotation3DEffect(.degrees(180), axis: (x: 0, y: 1, z: 0)) .transition(.opacity) diff --git a/Sources/SwiftUICharts/LineChart/LineChartView.swift b/Sources/SwiftUICharts/LineChart/LineChartView.swift index 1e38b34f..83f6eba3 100644 --- a/Sources/SwiftUICharts/LineChart/LineChartView.swift +++ b/Sources/SwiftUICharts/LineChart/LineChartView.swift @@ -58,7 +58,7 @@ public struct LineChartView: View { ZStack(alignment: .center){ RoundedRectangle(cornerRadius: 20) .fill(self.colorScheme == .dark ? self.darkModeStyle.backgroundColor : self.style.backgroundColor) - .frame(width: frame.width, height: 240, alignment: .center) + .frame(width: frame.width, height: self.formSize.height + 30, alignment: .center) .shadow(color: self.style.dropShadowColor, radius: self.dropShadow ? 8 : 0) VStack(alignment: .leading){ if(!self.showIndicatorDot){ @@ -105,7 +105,8 @@ public struct LineChartView: View { touchLocation: self.$touchLocation, showIndicator: self.$showIndicatorDot, minDataValue: .constant(nil), - maxDataValue: .constant(nil) + maxDataValue: .constant(nil), + gradient: self.style.gradientColor ) } .frame(width: frame.width, height: frame.height)