Commit 762a7dee by Demid Merzlyakov

AQI: better scaling for pollutants' bars.

parent 968adf41
......@@ -50,7 +50,7 @@ public struct Pollutant: Equatable, Hashable {
self.status = statusValue
if let hazardousLevelStart = self.hazardousLevelStart {
var progressValue = max(0, CGFloat(value / hazardousLevelStart))
var progressValue = max(0, CGFloat(0.1 + value * 0.9 / hazardousLevelStart))
progressValue = min(1, progressValue)
self.progress = progressValue
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment