Heyo! I think the issue is that you're using BarMark(x:y:) when you should be using BarMark(x:ystart:yend:) when using the chartYScale(domain:) modifier. Hope this helps!
Using your example code:
BarMark(
x: .value("name", values.name),
yStart: .value("value", values.value),
yEnd: .value("minValue", minValueYAxis)
)
.cornerRadius(5.0)
.annotation(position: .overlay, alignment: .top, spacing: 10.0) {
Text("\(values.value)")
.foregroundColor(.white)
.fontWeight(.bold)
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: