Open kkla320 opened 2 years ago
It kind of is, you can do this
let myCustomAngularGradient = AngularGradient(
colors: [
.red,
.purple,
.blue
],
center: .center,
startAngle: .angularGradientGaugeStart,
endAngle: .angularGradientGaugeEnd
)
and then using it in code
ProgressView(value: progressValue) {
VStack {
Text("\(throughput.formatted())s")
Text("\(name)")
}
}
.progressViewStyle(
.gauge(shape: myCustomAngularGradient, thickness: 32) {
Text(highValue.formatted())
} upperLabel: {
Text(lowValue.formatted())
}
)
That is not exactly what I meant. I mean the color for the black circle, that shows the current value on the gauge. I think of something like this
ProgressView(value: progressValue)
.progressViewStyle( .gauge(indicatorColor: .white))
or with a modifier on view
ProgressView(value: progressValue)
.progressViewStyle( .gauge)
.gaugeIndicatorColor(.white)
The color for the indicator color should be settable, so that user of the framework can change the color.