KPIHeader

public struct KPIHeader
extension KPIHeader: View
extension KPIHeader: _ViewEmptyChecking

KPIHeader is used to display KPIItem and KPIProgressItem. The maximum number of items that can be displayed in the header is 4. If more than 4 items are provided, then only first 4 items are displayed and the rest will be ignored. If the item is KPIProgressItem and the value of its property chartSize is .small, it will not be displayed, too.

Usage

var data: [KPIHeaderItemModel] = [
    KPIItem(kpiCaption: "small", items: [KPISubItemModelImpl(kPISubItemValue: .text("123"), kPISubItemType: .metric)], proposedViewSize: .small, alignment: .center),
    KPIProgressItem(kpiCaption: "Downloading", data: .constant(KPIItemData.percent(0.65))),
    KPIItem(kpiCaption: "Big caption and long text", items: [KPISubItemModelImpl(kPISubItemValue: .text("321"), kPISubItemType: .metric)], proposedViewSize: .large, alignment: .center),
    KPIProgressItem(kpiCaption: "Completed", data: .constant(KPIItemData.percent(1.0)), chartSize: .small)]
KPIHeader(items: data, isItemOrderForced: false)

Sets the separator for kpi header components Example usage:

KPIHeader(...)
    .headerSeparator(true) // Show separator with default style
    .headerSeparator(true, color: .red) // Show red separator
    .headerSeparator(true, color: .blue, lineWidth: 1.0) // Show thick blue separator
    .headerSeparator(false) // Hide separator