Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SahilMutualMobile/3b4cb73c87071b0e06a4bc80c3ce0185 to your computer and use it in GitHub Desktop.
Save SahilMutualMobile/3b4cb73c87071b0e06a4bc80c3ce0185 to your computer and use it in GitHub Desktop.
SwiftChart_SalesModel
struct RestaurantSales: Identifiable {
let weekday: WeekdaysType
let itemSales: [ItemSales]
var id: String {
return weekday.rawValue
}
}
struct ItemSales: Identifiable {
let foodItemName: FoodItemType
let sales: Int
var id: String {
return foodItemName.rawValue
}
}
enum FoodItemType: String {
case Dosa, Paratha, Chaat
}
enum WeekdaysType: String {
case Mon, Tue, Wed, Thu, Fri, Sat, Sun
}
enum TimingType: String {
case Morning, Evening
}
enum ChartType: String {
case Barchart, Linechart, Pointchart, Areachart, Rulechart, Rectanglechart
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment