set static height for homescreen graph
home screen graph start at zero
This commit is contained in:
@@ -176,11 +176,11 @@ struct ContentView: View {
|
||||
viewModel.add(mood: mood, forDate: date)
|
||||
}
|
||||
})
|
||||
.frame(minHeight: 85, maxHeight: 180)
|
||||
.frame(height: 180)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
} else {
|
||||
HeaderStatsView(fakeData: false, backDays: 30)
|
||||
.frame(minHeight: 85, maxHeight: 180)
|
||||
.frame(height: 180)
|
||||
// should match backDays above
|
||||
Text("Past \(30) days")
|
||||
.font(.body)
|
||||
|
||||
@@ -41,31 +41,32 @@ struct HeaderStatsView : UIViewRepresentable {
|
||||
let chart = BarChartView()
|
||||
chart.drawGridBackgroundEnabled = false
|
||||
chart.drawValueAboveBarEnabled = false
|
||||
|
||||
|
||||
chart.xAxis.drawAxisLineEnabled = false
|
||||
chart.xAxis.labelTextColor = .clear
|
||||
|
||||
|
||||
chart.rightAxis.drawAxisLineEnabled = false
|
||||
chart.rightAxis.labelTextColor = .clear
|
||||
|
||||
|
||||
chart.leftAxis.drawAxisLineEnabled = false
|
||||
chart.leftAxis.labelTextColor = .clear
|
||||
|
||||
|
||||
chart.xAxis.drawGridLinesEnabled = false
|
||||
chart.leftAxis.drawGridLinesEnabled = false
|
||||
chart.rightAxis.drawGridLinesEnabled = false
|
||||
|
||||
chart.leftAxis.axisLineColor = .clear
|
||||
chart.rightAxis.axisLineColor = .clear
|
||||
|
||||
|
||||
chart.legend.textColor = .clear
|
||||
chart.legend.enabled = false
|
||||
|
||||
|
||||
chart.drawBordersEnabled = false
|
||||
chart.drawMarkers = false
|
||||
chart.borderColor = .clear
|
||||
|
||||
|
||||
chart.doubleTapToZoomEnabled = false
|
||||
chart.leftAxis.axisMinimum = 0
|
||||
|
||||
let data = BarChartData()
|
||||
let dataSet = dataSet()
|
||||
|
||||
Reference in New Issue
Block a user