feat: renamed BarChart to ColumnChart

This commit is contained in:
Serhiy Mytrovtsiy
2026-03-16 21:42:15 +01:00
parent f55bcc4f4b
commit e6bdb2df2b
3 changed files with 39 additions and 21 deletions
+4 -4
View File
@@ -69,7 +69,7 @@ internal class Popup: PopupWrapper {
private var sliderView: NSView? = nil
private var lineChart: LineChartView? = nil
private var barChart: BarChartView? = nil
private var columnChart: ColumnChartView? = nil
private var circle: PieChartView? = nil
private var temperatureCircle: HalfCircleGraphView? = nil
private var frequencyCircle: HalfCircleGraphView? = nil
@@ -244,13 +244,13 @@ internal class Popup: PopupWrapper {
box.layer?.backgroundColor = NSColor.lightGray.withAlphaComponent(0.1).cgColor
box.layer?.cornerRadius = 3
let chart = BarChartView(frame: NSRect(
let chart = ColumnChartView(frame: NSRect(
x: Constants.Popup.spacing,
y: Constants.Popup.spacing,
width: view.frame.width - (Constants.Popup.spacing*2),
height: box.frame.height - (Constants.Popup.spacing*2)
), num: Int(cores))
self.barChart = chart
self.columnChart = chart
box.addSubview(chart)
@@ -396,7 +396,7 @@ internal class Popup: PopupWrapper {
usagePerCore.append(ColorValue(value.usagePerCore[i], color: NSColor.systemBlue))
}
}
self.barChart?.setValues(usagePerCore)
self.columnChart?.setValues(usagePerCore)
self.initialized = true
}
+4 -4
View File
@@ -14,7 +14,7 @@ import Kit
public class Portal: PortalWrapper {
private var circle: PieChartView? = nil
private var barChart: BarChartView? = nil
private var columnChart: ColumnChartView? = nil
private var initialized: Bool = false
@@ -99,8 +99,8 @@ public class Portal: PortalWrapper {
box.layer?.backgroundColor = NSColor.lightGray.withAlphaComponent(0.1).cgColor
box.layer?.cornerRadius = 3
let chart = BarChartView(num: Int(cores))
self.barChart = chart
let chart = ColumnChartView(num: Int(cores))
self.columnChart = chart
box.addArrangedSubview(chart)
return box
@@ -163,7 +163,7 @@ public class Portal: PortalWrapper {
usagePerCore.append(ColorValue(value.usagePerCore[i], color: NSColor.systemBlue))
}
}
self.barChart?.setValues(usagePerCore)
self.columnChart?.setValues(usagePerCore)
self.initialized = true
}