FUIChartCardCollectionViewCell

open class FUIChartCardCollectionViewCell : FUIBaseDrawingCollectionViewCell<FUIChartCardView>, FUIAttributesConsumer

UICollectionViewCell subclass for FUIChartCardView with FUIChartView plotted in cell.

Developer should use the FUIKPIViewItem API set to build KPI content, and set to the kpiItems: [FUIKPIViewItem] property.

The optional trendSemanticColor: UIColor? will be applied to the trend and trendImage properties, if not nil.

Developer should configure the chartView: FUIChartView.

Note

the default Card configuration for the FUIChartView will cause only the first and last category title to be displayed.

Extends FUIChartCardView API, by extension on FUIBaseDrawingCollectionViewCell.

Data Source

Developer should implement the FUIChartViewDataSource, to supply data to the card’s chartView property.

Usage

let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIChartCardCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIChartCardCollectionViewCell
cell.title.text = "Completed"
cell.status.text = "Updated 20 min ago"
cell.kpiItems = [<#FUIKPIViewItem#>]
cell.trend.text = "11.5 %"
cell.trendImage = FUIIconLibrary.analytics.trendUp.withRenderingMode(.alwaysTemplate)
cell.trendSemanticColor = UIColor.preferredFioriColor(forStyle: .positive)
cell.chartType = .line
cell.series.colors = [UIColor.preferredFioriColor(forStyle: .negative)]
cell.categoryAxis.labels.isHidden = true

Skeleton

view.showSkeleton()
view.hideSkeleton()

Theming

Supported TEXT class paths:

fdlFUIChartCardCollectionViewCell_title {}
fdlFUIChartCardCollectionViewCell_kpiUnitItem {}
fdlFUIChartCardCollectionViewCell_kpiMetricItem {}
fdlFUIChartCardCollectionViewCell_kpiFractionItem {}
fdlFUIChartCardCollectionViewCell_status {}
fdlFUIChartCardCollectionViewCell_trend {}
fdlFUIChartCardCollectionViewCell_seriesTitles {}

Supported TEXT properties:

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

Supported IMAGE class paths:

fdlFUIChartCardCollectionViewCell_kpiIconItem {}
fdlFUIChartCardCollectionViewCell_trendImage {}

Supported IMAGE properties:

tint-color: Color;