From 59edac03e21c4ae2c3a1b737e17d8d5f1c348219 Mon Sep 17 00:00:00 2001 From: tomosaaan Date: Fri, 13 Dec 2024 16:40:51 +0900 Subject: [PATCH] fix: component position by stack --- Sources/GraphRangeSlider/GraphRangeSlider.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {