FUIChartFloorplanViewController

UIViewController implementation of the FUIChartFloorplanView. Should be used when displaying the full-screen Chart Floorplan of the SAP Fiori Design Guidelines.

Extends the API of FUIChartFloorplanView.

## Usage
self.title = "Sales Chart"
self.chartView.chartType = .bar
self.chartView.numberOfGridlines = 4
self.chartView.dataSource = self

self.headerView.dataSource = self
self.titleText.text = "Total APE ($) by Salesperson"
self.status.text = "Updated 20m ago"
self.categoryAxisTitle.text = "Salesperson"
self.valuesAxisTitle.text = "Total APE ($)"

let item = FUIChartSummaryItem()
item.categoryIndex = -1
item.isEnabled = false
item.isPreservingTrendHeight = false

let values: [Double] = {
var values: [Double] = []
for series in chartView.series {
let categoriesUpperBound = series.numberOfValues - 1
if let valuesInSeries = series.valuesInCategoryRange((0...categoriesUpperBound), dimension: 0) {
values.append(valuesInSeries.flatMap({ $0 }).reduce(0.0, +))
}
}
return values
}()

let numberFormatter  = NumberFormatter()
numberFormatter.numberStyle = .currency
numberFormatter.maximumFractionDigits = 0


item.valuesText = values.map { "\(numberFormatter.string(from: $0 as NSNumber)!)k" }
item.titleText.text = "Team ($) APE"
self.headerView.addItem(item)

Theming

Supported class paths:

fdlFUIChartFloorplanViewController_title {} fdlFUIChartFloorplanViewController_subtitle {} fdlFUIChartFloorplanViewController_status {} fdlFUIChartFloorplanViewController_seriesTitles {} fdlFUIChartFloorplanViewController_valuesAxisTitle {} fdlFUIChartFloorplanViewController_secondaryValuesAxisTitle {} fdlFUIChartFloorplanViewController_categoryAxisTitle {}

Supported properties:

font-color: Color; font-style: UIFontTextStyle; text-line-clamp: Integer; text-align: NSTextAlignment;

  • Title text to display. (Is not set to UIViewController.title)

    Declaration

    Swift

    public var titleText: FUIText { get }
  • Developer formatted NSAttributedString to display as the subtitle. Will override title value, and default styling.

    Declaration

    Swift

    public var titleAttributedText: NSAttributedString! { get set }
  • NUIStyleClassPath for title property

    Declaration

    Swift

    public var titleStyleClassPath: [FioriStyle] { get set }
  • Status text to display

    Declaration

    Swift

    public var status: FUIText { get }
  • Developer formatted NSAttributedString to display as the status. Will override status value, and default styling.

    Declaration

    Swift

    public var statusAttributedText: NSAttributedString! { get set }
  • NUIStyleClassPath for status property

    Declaration

    Swift

    public var statusStyleClassPath: [FioriStyle] { get set }