mirror of
https://github.com/exelban/stats.git
synced 2026-05-07 20:02:34 +00:00
feat: renamed BarChart to ColumnChart
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user