Skip to main content
FioriCharts supports 17 chart types, all driven by the same ChartModel + ChartView pattern. Set chartType in the model and the view renders the appropriate chart automatically.

Standard charts

Plots one or more series as connected line segments. nil values produce visible gaps.
let model = ChartModel(
    chartType: .line,
    data: [
        [nil, 220, nil, 250, 200, nil, 230],
        [160, nil, 130, 170, nil, 190, 180]
    ],
    titlesForCategory: [["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"]],
    selectionEnabled: true
)

ChartView(model)
    .frame(width: 360, height: 220)
Use indexesOfSecondaryValueAxis to assign one or more series to a secondary Y axis.

Micro charts

Micro charts are compact, annotation-sized charts designed for use in lists, tables, and object headers. They share the same ChartModel + ChartView API.
A compact sparkline with a filled area below the line.
let model = ChartModel(
    chartType: .micro_area,
    data: [[10, 20, 15, 30, 25, 40, 35, 50]]
)

ChartView(model)
    .frame(width: 120, height: 40)
A compact vertical bar sparkline.
let model = ChartModel(
    chartType: .micro_column,
    data: [[10, 20, 15, 30, 25, 40, 35, 50]]
)

ChartView(model)
    .frame(width: 120, height: 40)
A bullet chart that compares a primary value against a target and one or more ranges. Supply values in the order: [actual, target, range1, range2, ...].
let model = ChartModel(
    chartType: .micro_bullet,
    data: [[75, 85, 50, 100]] // actual=75, target=85, ranges=[50,100]
)

ChartView(model)
    .frame(width: 180, height: 44)
A pie-like circle that shows percentage completion. Supply a single value between 0 and 1 (or 0–100, depending on your scale).
let model = ChartModel(
    chartType: .micro_harvey_ball,
    data: [[0.75]] // 75% complete
)

ChartView(model)
    .frame(width: 44, height: 44)
An arc-style radial progress indicator.
let model = ChartModel(
    chartType: .micro_radial,
    data: [[0.6]] // 60% complete
)

ChartView(model)
    .frame(width: 44, height: 44)

No-data view

ChartView displays a default empty state when data is empty. You can supply a custom no-data view:
ChartView(model, noDataView: NoDataView {
    VStack {
        Image(systemName: "chart.bar.xaxis")
            .font(.largeTitle)
        Text("No data available")
    }
})
.frame(width: 360, height: 220)

Build docs developers (and LLMs) love