Skip to content

Chart Card View

FUIChartCardView

open class FUIChartCardView: FUICardBaseView, FUISeriesTitleComponent, FUISubtitleComponent, FUITrendComponent

Chart card type, where KPI values are centered in the card, inscribed within circular progress ring.

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.

Data Source

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
let view = FUIChartCardView()
view.title.text = "Completed"
view.status.text = "Updated 20 min ago"
view.kpiItems = [<#FUIKPIViewItem#>]
view.trend.text = "11.5 %"
view.trendImage = FUIIconLibrary.analytics.trendUp.withRenderingMode(.alwaysTemplate)
view.trendSemanticColor = UIColor.preferredFioriColor(forStyle: .positive)
view.chartView.chartType = .line
view.chartView.series.colors = [UIColor.preferredFioriColor(forStyle: .negative)]
view.chartView.categoryAxis.labels.isHidden = true

Theming

Supported TEXT class paths:

1
2
3
4
5
6
7
fdlFUIChartCardView_title {}
fdlFUIChartCardView_kpiUnitItem {}
fdlFUIChartCardView_kpiMetricItem {}
fdlFUIChartCardView_kpiFractionItem {}
fdlFUIChartCardView_status {}
fdlFUIChartCardView_trend {}
fdlFUIChartCardView_seriesTitles {}

Supported TEXT properties:

1
2
3
4
font-color: Color;
font-style: UIFontTextStyle;
text-line-clamp: Integer;
text-align: NSTextAlignment;

Supported IMAGE class paths:

1
2
fdlFUIChartCardView_kpiIconItem {}
fdlFUIChartCardView_trendImage {}

Supported IMAGE properties:

1
tint-color: Color;

Last update: December 8, 2020