-
-
Save muhammadabbas001/29c6a2d261fcc17569796776bcd48d04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chartData : [LineChartData] = { | |
let sampleDate = Date().startOfDay.adding(.month, value: -10)! | |
var temp = [LineChartData]() | |
// Line 1 | |
for i in 0..<8 { | |
let value = Double.random(in: 5...20) | |
temp.append( | |
LineChartData( | |
date: sampleDate.adding(.month, value: i)!, | |
value: value, | |
type: .outside | |
) | |
) | |
} | |
// Line 2 | |
for i in 0..<8 { | |
let value = Double.random(in: 5...20) | |
temp.append( | |
LineChartData( | |
date: sampleDate.adding(.month, value: i)!, | |
value: value, | |
type: .optimal | |
) | |
) | |
} | |
return temp | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment