FUIChartFloorplanViewController
open class FUIChartFloorplanViewController : FUIBaseDrawingViewController<FUIChartFloorplanView>, FUIBackgroundSchemeSupporting
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: FUIMultiLineText { get }
-
Developer formatted
NSAttributedString
to display as the subtitle. Will overridetitle
value, and default styling.Declaration
Swift
public var titleAttributedText: NSAttributedString! { get set }
-
NUIStyleClassPath for
title
propertyDeclaration
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 overridestatus
value, and default styling.Declaration
Swift
public var statusAttributedText: NSAttributedString! { get set }
-
NUIStyleClassPath for
status
propertyDeclaration
Swift
public var statusStyleClassPath: [FioriStyle] { get set }
-
Title for “values” axis. Typically the “y-axis”, except in horizontal bar charts.
Declaration
Swift
public var valuesAxisTitle: FUIText { get }
-
Title for “secondary values” axis. Except for horizontal bar charts.
Declaration
Swift
public var secondaryValuesAxisTitle: FUIText { get }
-
Developer formatted
NSAttributedString
to display as title for values axis. Will overridevaluesAxisTitle
value, and default styling.Declaration
Swift
public var valuesAxisTitleAttributedText: NSAttributedString! { get set }
-
Developer formatted
NSAttributedString
to display as title for secondary values axis. Will overridesecondaryValuesAxisTitle
value, and default styling.Declaration
Swift
public var secondaryValuesAxisTitleAttributedText: NSAttributedString! { get set }
-
NUIStyleClassPath for
valuesAxisTitle
propertyDeclaration
Swift
public var valuesAxisTitleStyleClassPath: [FioriStyle] { get set }
-
NUIStyleClassPath for
secondaryValuesAxisTitle
propertyDeclaration
Swift
public var secondaryValuesAxisTitleStyleClassPath: [FioriStyle] { get set }
-
Title for “categories” axis. Typically the “x-axis”, except in horizontal bar charts, where it is the “y-axis”.
Declaration
Swift
public var categoryAxisTitle: FUIText { get }
-
Developer formatted
NSAttributedString
to display as the category’s axis title. Will overridecategoryAxisTitle
value, and default styling.Declaration
Swift
public var categoryAxisTitleAttributedText: NSAttributedString! { get set }
-
NUIStyleClassPath for
categoryAxisTitle
propertyDeclaration
Swift
public var categoryAxisTitleStyleClassPath: [FioriStyle] { get set }
-
Titles for each of the data series.
Declaration
Swift
public var seriesTitles: [FUIText] { get set }
-
Developer formatted
NSAttributedString
to display as the series titles. Will overrideseriesTitles
values, and default styling.Declaration
Swift
public var seriesTitlesAttributedText: NSAttributedString! { get set }
-
Flag for setting whether series selection should be enabled when legend for series is tapped.
Declaration
Swift
public var allowLegendViewSeriesSelection: Bool { get set }
-
NUIStyleClassPath for
seriesTitles
propertyDeclaration
Swift
public var seriesTitlesStyleClassPath: [FioriStyle] { get set }
-
Declaration
Swift
public var backgroundColorScheme: FUIBackgroundColorScheme { get set }
-
View containing the chart and plotted points
Declaration
Swift
public var chartView: FUIChartView { get }
-
View containing the chart legend view
Declaration
Swift
public var legendView: FUIChartLegendView { get }
-
Summary view for category data
Declaration
Swift
public var summaryView: FUIChartSummaryView { get }