Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created September 2, 2018 09:47
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 fitomad/ece02048e2d4bf1c4f3da492260c8c2c to your computer and use it in GitHub Desktop.
Save fitomad/ece02048e2d4bf1c4f3da492260c8c2c to your computer and use it in GitHub Desktop.
public func reportForStations(occupationLow low: Int, medium: Int, high: Int, unavailable: Int) -> String?
{
guard let template = self.loadTemplate(ofType: .occupation) else
{
return nil
}
let dataArray = self.makeChartDataArray(for: [ low, medium, high, unavailable ])
let content = String(format: template, "\(low)", "\(medium)", "\(high)", "\(unavailable)", dataArray)
return content
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment