mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed zones range in the BarChart when value if more than 1 (#510)
This commit is contained in:
@@ -124,21 +124,21 @@ public extension Double {
|
||||
|
||||
if reversed {
|
||||
switch self {
|
||||
case 0...zones.orange:
|
||||
return thirdColor
|
||||
case zones.orange...zones.red:
|
||||
return secondColor
|
||||
case zones.red...1:
|
||||
return firstColor
|
||||
default:
|
||||
return thirdColor
|
||||
return firstColor
|
||||
}
|
||||
} else {
|
||||
switch self {
|
||||
case 0...zones.orange:
|
||||
return firstColor
|
||||
case zones.orange...zones.red:
|
||||
return secondColor
|
||||
case zones.red...1:
|
||||
return thirdColor
|
||||
default:
|
||||
return firstColor
|
||||
return thirdColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user