HeaderChart
HeaderChart is a view that displays an object’s title, subtitle, trend, trend image and kpi.
Usage
HeaderChart {
Text("title")
} subtitle: {
Text("subtitle")
} trend: {
Text("trend")
} trendImage: {
Image(systemName: "person")
} kpi: {
Text("KPI View")
} chart: {
Text("Chart View")
}
Sets the separator for chart header components Example usage:
HeaderChart(...)
.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
-
Undocumented
Declaration
Swift
public init(@ViewBuilder title: () -> any View, @ViewBuilder subtitle: () -> any View = { EmptyView() }, @ViewBuilder trend: () -> any View = { EmptyView() }, @ViewBuilder trendImage: () -> any View = { EmptyView() }, @ViewBuilder kpi: () -> any View = { EmptyView() }, @ViewBuilder chart: () -> any View = { EmptyView() }, componentIdentifier: String? = HeaderChart.identifier) -
Convenience initializer for
HeaderChartDeclaration
Swift
init(title: String, subtitle: AttributedString? = nil, trend: AttributedString? = nil, trendImage: Image? = nil, kpi: KPIItemData? = nil, @ViewBuilder chart: () -> any View = { EmptyView() })Parameters
titleThe title string for the header chart.
subtitleThe subtitle attributed string for the header chart.
trendThe trend attributed string for the header chart.
trendImageThe trend image for the header chart.
kpiData used for
KPIItemin header chart.chartChart for header chart.
-
Convenience initializer for
HeaderChartDeclaration
Swift
init(title: String, subtitle: AttributedString? = nil, trend: AttributedString? = nil, trendImage: Image? = nil, kpi: String? = nil, @ViewBuilder chart: () -> any View = { EmptyView() })Parameters
titleThe title string for the header chart.
subtitleThe subtitle attributed string for the header chart.
trendThe trend attributed string for the header chart.
trendImageThe trend image for the header chart.
kpiThe KPI string of header chart.
chartChart for header chart.
-
Undocumented
Declaration
Swift
static let identifier: String -
Undocumented
Declaration
Swift
init(title: AttributedString, subtitle: AttributedString? = nil, trend: AttributedString? = nil, trendImage: Image? = nil, kpi: KPIItemData? = nil, @ViewBuilder chart: () -> any View = { EmptyView() }) -
Undocumented
Declaration
Swift
init(_ configuration: HeaderChartConfiguration) -
Declaration
Swift
@MainActor public var body: some View { get } -
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }