From 64d7e4e8bf7049e5347b35f30e1c3df729955072 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sun, 7 Aug 2022 20:38:07 +0200 Subject: [PATCH] fix: quick fix for the network chart that does not fit value in the range 0-1 (charts in the Disks and Network popups) --- Kit/plugins/Charts.swift | 3 +++ Stats/Supporting Files/Info.plist | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Kit/plugins/Charts.swift b/Kit/plugins/Charts.swift index 47cba920..fdbcea74 100644 --- a/Kit/plugins/Charts.swift +++ b/Kit/plugins/Charts.swift @@ -32,6 +32,9 @@ public struct circle_segment { private func scaleValue(scale: Scale = .linear, value: Double, maxValue: Double, maxHeight: CGFloat) -> CGFloat { var value = value + if scale == .none && value > 1 && maxValue != 0 { + value /= maxValue + } var localMaxValue = maxValue var y = value * maxHeight diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist index 343e16a5..9069b5af 100755 --- a/Stats/Supporting Files/Info.plist +++ b/Stats/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 387 + 389 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType