diff --git a/Sources/GraphRangeSlider/GraphRangeSlider.swift b/Sources/GraphRangeSlider/GraphRangeSlider.swift index c410fba..661cc4c 100644 --- a/Sources/GraphRangeSlider/GraphRangeSlider.swift +++ b/Sources/GraphRangeSlider/GraphRangeSlider.swift @@ -26,7 +26,7 @@ public struct GraphRangeSlider: View where Data: RandomAccessCollectio @Environment(\.isHiddenChart) private var isHiddenChart: Bool public var body: some View { - VStack(spacing: margin) { + ZStack(alignment: .bottom) { if !isHiddenChart { Chart(data, id: id) { data in BarMark( @@ -50,6 +50,7 @@ public struct GraphRangeSlider: View where Data: RandomAccessCollectio Status.inactive: inactiveColor ]) .padding(.horizontal, toggleRadius * 2) + .padding(.bottom, margin + toggleRadius + sliderBarHeight / 2) } if !positions.isEmpty {