I want to create a circular gauge view without dot indicator on it.
How can I hide dot indicator from swiftUI Gauge view?
What gauge style do you use ? accessoryCircular I guess.
What is the dot (more like a raindrop) ?
Could you show your code relate to the gauge ?
You can find detailed info on gauges setup here: https://sarunw.com/posts/swiftui-gauge/
Did you try to have an empty label ?
Gauge(value: fahrenheit, in: minValue...maxValue) {
Label("")
}
struct ContentView: View {
var body: some View {
ZStack {
Color.black
Gauge(value: 0.23) {
Image("droplet")
.renderingMode(.template)
.foregroundColor(.white)
} currentValueLabel: {
Text("23")
.foregroundStyle(.white)
}
.gaugeStyle(.accessoryCircular)
.tint(.white)
}
}
}
Above code shows gauge like this. But I don't want to show value indicator on ring which is showing at 23%.
It is not possible with accessoryCircular.
In fact, the dot is the only way to show where gauge stands, as the circle is drawn completely, whatever the value.
accessoryCircularCapacity has no dot, but draws a complete circle with a dimmed part.
You should probably create your custom gauge. See how in detail here: https://www.appcoda.com/swiftui-gauge/